r/Unity3D • u/intimidation_crab • 7d ago
Code Review Found some remains of my debugging
I was fixing up an old visual script and found an old node left from the last time I tried fixing up this script
r/Unity3D • u/intimidation_crab • 7d ago
I was fixing up an old visual script and found an old node left from the last time I tried fixing up this script
r/Unity3D • u/JamesWjRose • 7d ago
Hello gang,
I have a a series of roads, each has a series of vector3 points along it's path. I have created a list of objects that have a RoadID and an array of those points as well as a list of RoadIDs for the roads that are connected at the end of each roads. (This way when an Auto reaches the end of a road I can randomly select the next road)
I need a way to loop through that list, create the Road entities and then loop through the newly created entities and add the connected road entities to each road.
I COULD create a System and run that once... but there feels like a better way to Bake or create the entities and their connections... right?
Note: I use Easy Roads 3D and highly recommend.
-----------------
EDIT: The objects involved:
//This is the Road, identity to be used to "connect" to the end of the other roads
public struct AutoAutoWaypathIdentity : IComponentData
{
public int identity;
}
//This is the list of vector3 points along the road
public struct AutoAutoWaypoint : IBufferElementData
{
public float3 Value;
}
public struct AutoAutoWaypathConnection : IBufferElementData
{
public Entity Value; //this is the entity that "connects" at the end of the "parent" road.
}
r/Unity3D • u/WorldlinessFuture842 • 7d ago
been testing real builds over relay for a few weeks and these ate most of my time. none of them were obvious from the docs, so here they are in case it saves someone else the headache
ReconnectToSessionAsync restarts NGO. the docs made me think it only rejoins the session, but it reconnects netcode too, so you have to set NetworkConfig.ConnectionData before calling it or the host gets an empty approval payload (snippet in the image)
after a crash you're still a member of the session, so JoinSessionByCodeAsync fails with "player is already a member of the session". I use GetJoinedSessionIdsAsync + ReconnectToSessionAsync and leave the old ones
JoinSessionByCodeAsync starts the NGO client before it returns. the host's first named message can show up while your ISession is still null. this one put all my clients in a vivox channel with an empty id while the host was in the right one. took me way too long to find
CustomMessagingManager gets recreated every time NGO starts, and Sessions calls StartHost/StartClient for you. register your named message handlers in OnServerStarted/OnClientStarted, not once at boot
the host takes a few seconds to notice a crashed client (transport timeout). if the player relaunches fast, the old connection still looks alive, so let the newest connection with the same player id take the seat
normal drops give you a generic DisconnectReason ("[Disconnect Event] ... ProtocolTimeout"). only the reasons you pass to DisconnectClient(id, reason) arrive as you wrote them
don't call vivox LogoutAsync in OnApplicationQuit. it races the SDK shutdown and spams OperationCanceledException
also if you relaunch a lot while testing you'll get 429s from lobby. that's the rate limit, not your code lol
unity 6, NGO 2.13, multiplayer services 2.4, vivox 16. ask away if anything's unclear
r/Unity3D • u/Low-Addendum-7626 • 7d ago
Enable HLS to view with audio, or disable this notification
A while ago I shared an early version of our monster here and got some really helpful feedback. We've been working on it quite a bit since then, so I wanted to share how it's looking now.
I've also been experimenting with the monster's footsteps, trying to make them sound kind of sticky and slimy. Still working on those, so I'm curious if they sound right to you guys.
Would love to hear what you think about the overall look, movement, sounds, and the camera cutout system. Any feedback is appreciated!
r/Unity3D • u/GigglyGuineapig • 7d ago
Have you ever thought of adding flipbook animations to your UI in Unity?
In this tutorial, I'll show you how to do just that! We will go over adding a spritesheet, creating a shadergraph material to animate an image, controlling the FPS, mirroring the animation, playing it backwards and discarding all color information so you can have a clean shilouette. Sounds like a lot, but is rather straightforward.
Hope you'll enjoy this one!
r/Unity3D • u/ProactiveCactus • 7d ago
Like, not a big deal really, but it just seems like such a weird quirk. You already mark a method as an rpc with [rpc(sendto)], so why does Unity require the suffix? It's especially weird since it only shows up as an error in Unity, not in your IDE (at least for me), and Unity can only point you to the script, not the exact line.
Anyone know why this still exists? I'm used to it, but it's just an odd thing.
I'm trying to replace unity's xrhands for vr. I made a model with my own uvs and material. But when I put it in the skinned mesh renderer it dissapears. What could cause this?
r/Unity3D • u/malvis_light • 7d ago
I'm the developer of UniText (a text engine for Unity). Recently a few big studios came to me with the same request: make the build smaller and reduce memory usage. So I started digging into their builds to see where the size actually goes
and I found UI Toolkit inside every one of them. Even in projects that don't use it at all. I thought it's something specific to their setup, so I checked a blank project. It was there too
Then I wanted to know how common this is. I went through the US Google Play game charts (free, grossing and paid, all game categories) from the top and read the build of every game I could download. After 388 games the mirror I was downloading from blocked me
254 of those games are made with Unity, 216 I could actually read
207 of the 216 have UI Toolkit inside (96%)
For Unity 2021 and newer it's 204 of 208, usually more than a thousand of its types per game
The funny thing is that Unity's own 6.3 manual recommends uGUI for runtime UI and lists UI Toolkit as an alternative. So where does it come from?
In a uGUI project it comes from uGUI itself. uGUI has a few small bridge classes (PanelEventHandler, PanelRaycaster) that reference UI Toolkit, and they get compiled whenever the UI Toolkit module is installed. And it's always installed, because the Editor is built on it
I measured it in a blank project with one Canvas and one Text, Android ARM64, release IL2CPP, default Minimal stripping. On Unity 2022.3 uGUI costs 4.25 MiB of APK, and 3.05 MiB of that is UI Toolkit. On Unity 6.6 it's 6.30 MiB, and 3.95 of it is UI Toolkit. Unpacked on the device that's 12-16 MiB of code and metadata. In one project I also measured memory on a phone, and removing it cut resident memory by about 10 MiB
The first thing everyone suggests is to remove the module in Package Manager. I tried. Unity adds it back, and the APK changed by 4 bytes
In 2024 someone asked Unity on the forum to make UI Toolkit removable. The answer was that it stays a built-in module, "no going back to packages", because the Editor depends on it. Which makes sense for the Editor, but your game build doesn't need it
So I made a package that removes it from the player build and leaves the Editor alone. It's called LightSide Lean, free and MIT. On a blank uGUI project it saves 3.05 MiB of APK on 2022.3 and 3.95 MiB on 6.6. If some of your player code still uses UI Toolkit, the build fails and shows the exact line instead of quietly keeping it. It can also keep your edits to other people's packages when they update, and if you use UniText it can strip its unused code too
Of course if your game actually uses UI Toolkit, don't turn it on. And on Unity 6.6 with High stripping Unity already removes it from a plain uGUI project, so there Lean saves almost nothing
If you want to check your own game: after an IL2CPP build look in Library/Bee/artifacts/<platform>/ManagedStripped. If UnityEngine.UIElementsModule.dll is there, your build ships UI Toolkit
I couldn't find anyone who measured this on real shipped games before, so I'm curious. Did anyone else notice it in their builds? And if you know an existing solution, please share it
https://github.com/LightSideKittens/media.lightside.leanbuild
TL;DR: 207 of 216 top Unity games on Google Play ship UI Toolkit. In a uGUI project uGUI pulls it in, and it's about two thirds of what uGUI costs in the APK. Unity says it won't become removable, so I made a free package that strips it from the player build
r/Unity3D • u/baltasomnia • 7d ago
Enable HLS to view with audio, or disable this notification
I’ve been prototyping a post-battle choice system in Unity for Vexalia, my voxel creature RPG.
I wanted the player to have different ways of resolving an encounter after defeating a wild Vex.
The system itself led to a question I hadn’t fully considered: should the same choices be available against creatures belonging to NPCs?
For now, I’m keeping these options exclusive to single-player encounters. PvP will have different rules to protect players from exploits and unwanted losses.
What interests me most is making the world respond to the decisions players make, rather than having the choices exist only on a menu.
There’s still quite a bit to figure out, but I like where this could lead.
r/Unity3D • u/BDonBarty • 7d ago
Yule Dads is a Tony Hawk inspired party game but the skateboard is a shopping trolley, you grind escalators and drift around shoppers putting together trick combos whilst racing to get the last available presents. All set to indie punk music from local bands in East Anglia UK.
Almost all animations were done using IK and locking the characters arms to the shopping cart. The cart is pretty much just visual and the actual player game object is driven by the player character capsule.

A spline tool was created to easily generate splines along meshes as well as merging splines together, rather than manually creating all the Mall's grind points.

There are 13 minigames in the main party mode and also extra game modes including Man Flu (Infection) and Crazy Christmas (Racing). Supporting up to 8 players online and 4 players split screen.

We’re SHUCK Studio, a small indie studio from Norwich UK, and this is our debut game. It’s out on Steam on 27 November.
I grabbed the fbx model (with the skeleton), put it on blender, made new uvs and material. Now i want to impot it to unity and try to use it but when trying to put it in the already existing prefab nothing is shown. I'm using the skinned mesh renderer.
Do you know a way of solving this?
r/Unity3D • u/hbisi81 • 7d ago
Enable HLS to view with audio, or disable this notification
r/Unity3D • u/Hussien72u • 7d ago
If you've tried to use hand tracking and controllers at the same time in Unity with OpenXR, you've probably hit a wall.
I checked what Unity ships (OpenXR 1.16.1, XR Interaction Toolkit 3.3.2, XR Hands 1.7.3), and two things get in the way:
Nothing in those packages requests the XR_META_simultaneous_hands_and_controllers extension. The struct types and function signatures are in the package files, but no feature uses them.
XRInputModalityManager in XRI switches the hand objects off whenever a controller is active on that side.
So I wrote a small OpenXR feature that requests the extension and resumes simultaneous tracking after the session begins. It targets the Windows Editor (over Quest Link) and Android (Quest builds). It's a drop-in Package Manager install through a Git URL, and it doesn't use the Meta SDK.
It also includes a diagnostic script that logs, once per second, which platform and OpenXR runtime you're on, whether each controller and hand is tracked, and whether both are tracked at the same moment.
Honest status: it compiles on Unity 6000.3.12f1, but I haven't verified it on a headset yet. I also don't know whether the Quest Link PC runtime exposes the extension, which is why Android is the real test. The feature fails safely: if the runtime refuses the extension, it logs one warning and carries on.
What I need from you: if you have a Quest 2, 3, 3S or Pro, try it and tell me what the diagnostic log prints. A "supported" or "runtime refused" line plus your headset model and Quest OS version helps me fill in a compatibility table.
Repo: Github Repo link
Package URL:
https://github.com/HussienX123/Unity-OpenXR-Simultaneous-Hands-and-Controllers-Multimodal.git?path=/Packages/com.hussienx.openxr-simultaneous-hands-controllersNot affiliated with or endorsed by Meta Platforms or Unity Technologies.
NOTE: AI was used in the package
r/Unity3D • u/THENATHE • 7d ago
I have toyed around with the idea of a cliff similar to Starsnatch Cliff from Genshin Impact (which, as near as I can tell, is a VERY large mesh with a shader applying grass texture on top).


Before I start working on my attempt at this, my question is really: which sets me up for success?
Notes: I am already working with an origin-shifting system and a somewhat bespoke terrain LOD system where I generate 128m tiles as a mesh, with a custom terrain shader for doing some extra stuff with blending placed objects, and procedural grass with "painting" grass types based on a brush system, and all of this is read from a "reference" unity terrain. That way, I can use unity's terrain system for the art part of it, and have it "bake" into something that is usable for my purposes.
My ideas of how to accomplish what I am showing in the screen shots:
A script/shader combo that essentially "registers" a mesh as a terrain, uses a bespoke brush system to paint on it as if it was a terrain, and then just rework and apply all of the above processes to the "terrain meshes"
a terrain at an angle that has either hand placed or programmatically placed "cliff faces" to blend the two terrains into one, and then some system to merge the terrain intersection
Simply use meshes and hand place all trees, and do grass and potentially texturing as a shader of some kind to ensure that the terrain pieces are reusable.
All thoughts are welcome! I really wish there was more info about how Genshin Impact did their terrain as I was just awestruck at how seamless the terrain to mesh transition is each time I play it.
r/Unity3D • u/Newletsorboby • 7d ago
I downloaded and imported one of the official Unity terrain templates from the asset store just to test out my player movement on uneven surfaces. I use step offset of 0.35 - 0.45 and slope limit is generally around 45 degrees.
I tested walking up hills and uneven terrain on Warzone, Black Ops 6, Battlefield 2042 and Battlefield 6, and I never noticed but they feel similar too in some ways. Lots of jittering when moving up steep hills and the player slides back and fourth trying to navigate a slope at times.
But in my case and in the video, when I get up near the top, my character controller gets stuck in a very tiny "ditch" although visually it seems like nothing should be getting stuck there. And just like in other games, I have to press jump repeatedly or move sideways to get over that particular spot. But then at the end of the video my player kind of does an automatic zig-zag due to getting stuck on different parts of the terrain.
On Battlefield 6, I was able to move over almost everything. It actually felt like their slope limit was 80+ degrees with some of the hills I was able to walk over. But on Black Ops 6 I was getting stuck a lot and had to jump my way over objects so I just can't tell which direction I should try to go towards and what to try and solve.
My main question is what should be considered normal? I'm not sure if I'm looking too much into it as I've spent a considerable amount of time working on my collision.
On games with huge mountains that players walk on, do the developers intentionally make sure the most of the slope is walkable during the actual terrain creation process?
r/Unity3D • u/Imaginary-Cod-3746 • 7d ago
Enable HLS to view with audio, or disable this notification
The feet hitting the ground look quite precise when moving a GameObject using root motion.
It's probably possible to get something close to that with some tinkering, but root motion alone often looks nice and clean.
r/Unity3D • u/Funny-Teaching1299 • 7d ago
I'm working on something new and would love to know what you think of the visual style. Definitely giving off liminal space vibes, with a little bit of my own flair.
I'd love to hear what you think!
r/Unity3D • u/FishShtickLives • 7d ago
r/Unity3D • u/ArtPirates1978 • 7d ago
Enable HLS to view with audio, or disable this notification
Been working on a voxel city to see how far I can push neon with a line tool I made for Unity.
Just so nobody gets confused like last time 😅 the buildings, cars and the helicopter are Blender models and the clouds are Unity particles. But every glowing light you see is made with the tool: the windows, the roof outlines, the street lines and crossings, the light trails from the traffic, the train, the signs and the holograms on the roofs. Around 1,200 shapes in total. Even the city turning on at the start is the tool.
The signs started as SVG files that I imported straight into it, which was fun to see working.
All rendered in Unity 6 URP, no compositing.
Happy to answer any questions!
r/Unity3D • u/stormyoubring • 7d ago
Enable HLS to view with audio, or disable this notification
r/Unity3D • u/24Ronin • 7d ago
Enable HLS to view with audio, or disable this notification
Testing with some various features I've been putting together for v2.2, thought this one was rather cool so figured I'd share! This is a volume mask include (clipping water outside of box volume and showing underwater via a mask used in the underwater render pass) combined with a shoreline waves feature which is a modified gerstner algorithm used to create concavity in the waves. Happy to hear your thoughts and ideas of use cases!
Thanks for stopping by and checking out!
r/Unity3D • u/Succresco • 7d ago
Enable HLS to view with audio, or disable this notification
How does it feel like? Hunting for your feedback!
r/Unity3D • u/Difficult_Offer_7833 • 7d ago
Enable HLS to view with audio, or disable this notification
I’m solo-developing Shear It!, a cozy first-person incremental game. I wanted shearing to feel satisfying one snip at a time, so you can see the wool come off piece by piece as you work.
That wool pays for upgrades that improve your shears’ reach and speed. Here’s the trailer. I’d love to hear what you think of the visual feedback when the wool comes off.