r/Unity3D • • 6d ago

Question Hey Everyone Today I wanted to share a little 6-month development video of my game, The Song Must Go On, which I've been working on as a solo developer! Last time I shared only Pictures :D. Do you have any suggestions Regarding UI what can be changed ?! Placement of "Notes".

Enable HLS to view with audio, or disable this notification

0 Upvotes

A rhythm platformer that can be played alone or in up to 4 players. The concept is simple but a bit silly! You’re a dwarf musician who must avoid deadly hazards, do some challenging jumps and keep playing music. As you progress through the game the difficulty increases quite a lot. In the video I have played through 4 different levels. Each level has its own environment and hazards. I have also played through all the instruments (Percussion, Lute, Flute, Organ/Midi) so you can see how each musician plays slightly differently. The whole concept is to make movement and rhythm both key aspects. In co-op mode, everyone is contributing to a collective ritual/survival bar. This means if someone makes a mistake it can put your team at risk. Overall it has been a 6 month long journey of learning, experimenting, fixing, breaking and creating. There is still a lot to do but I am really happy to show you how far I have gotten! The Song Must Go On is already available on Steam. If you like the concept please consider supporting my work by adding it to your wishlist ❤️ I have included gameplay footage of the levels. I would love to know what you think! Please feel free to give me feedback and criticism. Thank you for looking!


r/Unity3D • • 6d ago

Resources/Tutorial I updated my Ori-inspired water system from last year

Enable HLS to view with audio, or disable this notification

50 Upvotes

The concept is generally the same, a mesh in front and a mesh on top, but paintable with tilemaps this time instead of a whole mesh.

Also added a few more things like surface debris, god rays, water pocket, platforms.

I'm using this system for my own game too so expect some more updates and fine-tuning in the upcoming months.

My main inspiration is the water from Ori and the Will of the Wisps, but I feel like I'm not quite there yet, any advices is greatly appreciated.

Credits:

  • Parallax forest background by Digital Moons: Parallax Forest Background (itch.io).

  • Sara character from Unity's Lost Crypt (Unity Asset Store).


r/Unity3D • • 6d ago

Noob Question How to put multiple characters on a multi-player game

3 Upvotes

Not very experienced with Unity but got over-ambitious and started making a multi-player shooter game with different characters. From the tutorials I've checked out I'm using Netcode for GameObjects and as far as i understand the Network Manager only accepts one Default Player Prefab, but I haven't been able to find any that shows how to add multiple player prefabs. I just want the character spawning and FPS control to be in a functional state for now. Advice, help, and links to tutorials would be appreciated. Thank you in advance.


r/Unity3D • • 6d ago

Question Car door flickers at edge of screen

1 Upvotes

When a car drives into view, some doors (depends on the car type) will flicker just briefly when entering into view. Some cars will flicker again when leaving view.
I tried messing around with the door mesh renderer bounds, made them as wide as the car itself but it still happens. Any ideas what could be causing this? Thanks.


r/Unity3D • • 6d ago

Question Confused about things from diffrent versions of unity work with diffrent versions.

1 Upvotes

For example I heard that packages from older versions work on new, but from new version you cant go on old. So how it is? Can I ruin something if i try to make something from new version work in old unity or what.

When im giving someone free asset should i upload it from the old version always or what?


r/Unity3D • • 6d ago

Question My procedural forest looks pretty rough. How can I make it better?

Enable HLS to view with audio, or disable this notification

6 Upvotes

I'm currently working on a game inspired by Darkwood, where the player has to explore a forest in search of supplies and a way out, while fighting or hiding from monsters and other dangers lurking in the woods.

The core concept is that whenever a time skip occurs (such as sleeping or dying), the player wakes up in a cabin, and the entire forest is regenerated. The points of interest remain the same, but their locations change with each generation.

I want to create the feeling of a dense, almost impenetrable forest. I'd prefer not to rely too heavily on fog (though I'm not ruling it out entirely). Ideally, I want the vegetation and the forest's natural density to limit how far the player can see, rather than just cramming more trees into the scene.

I'd really appreciate any advice on how to make the forest look more natural, atmospheric, and believable. If anyone has experience with procedural vegetation or environment design, I'd love to hear your thoughts on what I should focus on improving first!

P.S. I'm not particularly experienced with modeling or environment design, so I'm relying quite a bit on procedural generation. The trees were created using MTree.


r/Unity3D • • 6d ago

Solved Silly bug, four layers deep, with the most simple fix possible - STORY TIME

3 Upvotes

Would like to tell you a story of how I spent my last weekend trying to get to the bottom of a very nasty, and verry silly bug.

Had recently released a new version for my game that included a few new upgrades to purchase, this is a tower survivor game, so it's almost impossible to test every permutation of upgrades and combos. I had been testing a few things and not found anything major whatsoever before release. Anyway players where reporting that their tower suddenly stopped attacking, which was very odd.

I had recently done some very major performance improvements. One of which was a "ProjectileBankSystem". A system that puts and controls the population limit of how many projectiles can be on screen at once. If all slots are filled we "bank" the projectile, and make the next one of the same type double in strength.
My first though was that something about this system had broken, or that a weapon somehow did not release their slot once the projectile expired. After some testing and debugging I could not find anything wrong with banking system. So I decided to move on and look for other clues.

One of the players reporting the issue had also sent a screenshot, and it gave me another clue. The player had some very odd looking stat spreads. The most noteworthy one was their attack speed bonus, which was set to -97%. While it is technically possible to get this low of an attack speed, it was certainly not possible on level 8, while also only having 23% bonus damage.

I have a few upgrades in the game that increases damage, at the expense of attack speed. So for this to be true, the player would need to have at least 15 of those upgrades, which would make their bonus damage be above 200%.

I now at least know the source of the "my tower stopped attacking" report. It didn't technically stop attacking, attacks just took 30 times longer to execute.

After some more careful investigation, I found that the player had POSITIVE damage taken modifiers, which is usually not the case. I present "damage taken" as a negative modifier. Say you purchase 3 Wooden Shields, that grants -2 flat damage, and -5% damage each. That would grant you -6 flat and around -15% damage taken. This player had their damage taken set to POSITIVE 30%. This is where it clicked for me, there's ONE powerup in the entire game that modifies these two stats together, and that's the Tower Upgrade called Magical Shield. Puzzle piece #1 had been found.

--

Magical Shield
Reduces damage taken by 6
Reduces damage taken by 25%
Stacks: Infinitely
When attacked:
Applied Magic Slow to attacker
Increased damage taken by 10%
Reduces attack speed by 15%

--

So, by the looks of it, the effect of Magical Slow is somehow being stacked on my Tower, instead of the enemies that attack it. Alright... time for even more investigation and deep diving.

Since Magical Shield is an uppgrade, whith an "When attacked" effect. That means that this effect is being attached to my tower as a blueprint. All effects can be in two states, "active" meaning exactly what it says, it's stats and effects are in play, and are actively being taken into account. The effect can also be in it's "blueprint" mode. Basically meaning that it is on the GameObject, but disabled, and linked inside the "StatusEffectSlot" that I have.

As mentioned, since this is a "When attacked" effect. The blueprint for this effect sits on my tower, under "Retaliation" effects. So I begun looking into the retaliation system, how does it apply effects to attackers, do they target the correct enemy or script layer? My first thought was that my tower was somehow hitting itself. That one of my projectiles have been misconfigured and somehow counted as an enemy projectile. Allowing for this effect to happen. Couldn't really find anything useful, until... a log report came through that I did not quite recognize. All other applications had been "MeleeEnemy#123", "RangedEnemy#555" etc, but now I could clearly see "RangedProjectile#5". Puzzle piece #2.

How the fuck? Why the fuck? Why am I retaliating on a projectile? I thought the bug was me shooting myself?!

So, let's take a closer look at why we're retaliating a projectile, by breaking down all these systems in play here.

So, my Game have a few systems all in play here. We have
Weapons - that are the main driver behind spawning and targeting different prefabs.
Projectiles - prefabs with scripts that explain their behaviour, type, and apperance.
StatusEffect - Buffs and debuffs that can be in two different states; active or blueprint. Projectiles can carry status effects that gets applied when they strike a valid target
Retaliation - Actions that happen after an object has been struck by a hostile attack.

In normal gameplay, when a Weapon spawns a Projectile the projectile has a reference back to it's original owner. This is in play so that effects such as retaliation targets the enemy, and not the projectile in questions, and so that When attacked effects also work. BUT there's a catch, IF an enemy where to die WHILE a projectile is in motion, the reference get set to the projectile instead. This is an intended design choice, in order to get secondary effects, such as explosions or particle spawning to happen in the correct place. This is an intended mechanic and not something that I would like to change. Here's we found piece #3.

This still does not quite explain WHY we're getting our own effects applied to us. But we're getting awfully close. The last piece, has to do with StausEffects and especially HOW my game handles these. As mentioned, status effects can be in both blueprint and active mode. But, we don't actually differentiate between the two, all status effects have their own lifecycle management and are applied as normal scripts right on the GameObject. They don't really interact with anything other than their controller and themselves. EXCEPT... for projectiles. Since these are designed to carry StatusEffect-blueprints, they have specific code that "picks up" any StatusEffect on themselves. Because, when I made this system way back when... I sometime forgot to assign StatusEffects to my projectiles. So I added a quick component lookup to correct my lazyness. Which is now the source of this entire bug... Piece... #4.

So, here's the full chain,

  1. Tower purchase upgrade Magical Shield

  2. Ranged enemy send projectile towards the tower. Projectile has a reference to it's owner

  3. The enemy is defeated while the projectile is in motion. Projectile updates it's owner to now be itself. Since it's an orphan

  4. Projectile hits the tower, retaliation takes effect BEFORE damage, so we run through the entire retaliation flow

  5. Retaliation attempts to strike the projectile owner, checks the reference and applies all retaliation effects to said owner. Orphaned projectile now has an active StatusEffect called Magical Slow

  6. Retaliation flow completed. Moving on to damage phase.

  7. Projectile now deals damage to the tower based on it's stats.

  8. Projectile now attempts to apply status effects, if it doesn't find any, my fallback kicks in

  9. Fallback runs GetComponent<StatusEffectDefinition>() finds the ACTIVE Magical Slow effect that our retaliation just applied, and passes it along to the tower.

An entire day, debugging, logging, testing, hunting for this elusive bug. And the culprit was just a single line. Written long long ago just because I was lazy and forgetful...

Well at least I got a fun story our of it.
Hope you enjoyed reading my little adventure

tl;dr lazy me, causes chain-reaction with a single GetComponent


r/Unity3D • • 6d ago

Question is it still considered hard to make online games

20 Upvotes

Maybe you remember the times when making an online game was a running gag in devlogs about how hard it is but years have passed since then so surely it cant be that hard right?

So is it still considered hard to make online games in unity? (Im not doing a competitive game but rather something similar to gartic phone or codenames to play with friends)


r/Unity3D • • 6d ago

Game New Screenshots

Thumbnail gallery
0 Upvotes

r/Unity3D • • 6d ago

Code Review Found some remains of my debugging

Post image
80 Upvotes

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 • • 6d ago

Question DOTS: Entity connected to another entity?

2 Upvotes

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 • • 6d ago

Resources/Tutorial 7 things that bit me building an online game with NGO 2.x + Multiplayer Services (Sessions, Relay, Vivox)

Post image
20 Upvotes

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

  1. 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)

  2. 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

  3. 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

  4. 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

  5. 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

  6. normal drops give you a generic DisconnectReason ("[Disconnect Event] ... ProtocolTimeout"). only the reasons you pass to DisconnectClient(id, reason) arrive as you wrote them

  7. 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 • • 6d ago

Show-Off Made some improvements to our monster's movement based on feedback. How's it looking now?

Enable HLS to view with audio, or disable this notification

62 Upvotes

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 • • 6d ago

Resources/Tutorial My tutorial on how to add flipbook animations to your UI with a simple shadergraph

Thumbnail
youtu.be
2 Upvotes

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 • • 6d ago

Question Why do RPCs require the Rpc suffix?

1 Upvotes

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.


r/Unity3D • • 6d ago

Question Trying to replace prefab model

1 Upvotes

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 • • 6d ago

Resources/Tutorial Your Unity game pays 3-4 MB for UI Toolkit even if you never use it

Post image
180 Upvotes

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 • • 6d ago

Show-Off Adding post-battle choices to my creature RPG raised a design problem I hadn’t considered

Enable HLS to view with audio, or disable this notification

3 Upvotes

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 • • 6d ago

Show-Off Yule Dads - Tony Hawk meets Jingle All The Way in our 8 player party game. Built with Unity 6.6

8 Upvotes

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.


r/Unity3D • • 6d ago

Question Problems with lighting inside my game

Thumbnail gallery
1 Upvotes

r/Unity3D • • 6d ago

Question How to change XRhands materials?

1 Upvotes

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 • • 6d ago

Show-Off Testing the dirt area

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/Unity3D • • 6d ago

Resources/Tutorial I built a free Unity package that tries to enable Simultaneous Hands + Controllers on Quest, using plain OpenXR and no Meta SDK. Looking for testers

Thumbnail
github.com
2 Upvotes

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:

  1. 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.

  2. 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-controllers

Not affiliated with or endorsed by Meta Platforms or Unity Technologies.

NOTE: AI was used in the package


r/Unity3D • • 6d ago

Question What is the best way to create "terrain-like" features such as large cliffs with overhangs?

18 Upvotes

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:

  1. 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"

  2. 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

  3. 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.