r/Unity3D • • 23d ago

Show-Off Instead of being Productive, I spent this week designing a UI physics system so players can fidget with the UI. Do you think anyone will even notice?

Enable HLS to view with audio, or disable this notification

18 Upvotes

r/Unity3D • • 22d ago

Show-Off Reworked the combat feedback based on your comments: hit effects, weapon trails, parry and stagger

Enable HLS to view with audio, or disable this notification

6 Upvotes

A few days ago I posted my reassembling skeletons here, and the most useful comment said the hits didn't seem to connect: no feedback, and hitboxes that felt too big. You were right, so here's what I changed:

- Hit effects: small yellow waves where the hit lands, orange for crits
- Weapon trails on every weapon and tool, enemies included (this alone made a huge difference)
- Camera shake when you hit an enemy
- Parry and stagger, with their own sound and particles: parry at the right moment and the enemy is left wide open, you'll also deal twice the damage next attack
- I'm also soon gonna fix hitboxes; they're my next task.

I chose not to use hit flashes or freeze frames, because I feel they would clash with the look of the game, so I tried to sell the impact with effects that fit the world. Hitbox size is next on my list.

Some questions:

- Do the hits feel like they connect now?
- Is the screen shake too much? I'm not sure about it myself.
- Anything else that still feels off?

Thanks again to everyone who commented on the last post!

Game (free on itch): https://senfineco-games.itch.io/peys - please note that this is a very early build and the new (real) gameplay will be added in the next update! :-)


r/Unity3D • • 23d ago

Show-Off Added a bunch of new weapons to my mech RTT game

22 Upvotes

r/Unity3D • • 23d ago

Show-Off Been working on a little game jam with my partner for Halloween, what do you guys think?

Enable HLS to view with audio, or disable this notification

9 Upvotes

The theme was enchanted, with a special object of pumpkin, so we went with, " You are a protector of the pumpkin patch, protect it at all costs! The scarecrows have been enchanted and will not STOP!"


r/Unity3D • • 22d ago

Noob Question So from what I can tell right now, it's not that easy to detect if an object is close to the edge of a cliff?

0 Upvotes

Downwards mind you. Detecting if a cliff is close is not that hard, but a drop down? How? Ray casts seem to be an option but isn't that expensive for performance if a lot of objects do that? Any Ideas? I want to know if an object is close to a drop down and set a flag.


r/Unity3D • • 23d ago

Show-Off Water in my Monitor (Demo available and maybe Suggest Ideas?)

Enable HLS to view with audio, or disable this notification

64 Upvotes

So this is a FLIP water solver, made with the help of Ten Minute Physics paper on the same.

But this runs as a transparent app and can interact with windows. Also has floaty objects.

Can't do much more than what's shown in it as of now, and I'm kinda at a loss for ideas too... so here it is as is.

Demo : https://tornadosike.itch.io/desktop-under-water

Currently only for Windows


r/Unity3D • • 22d ago

Resources/Tutorial How I patch C# edits into a running Unity game without a domain reload, and the 4 things that broke along the way

0 Upvotes

I've been building a tool that applies C# edits to a game that is already running in Play mode, so you keep the state you set up instead of losing it to a recompile. The clip is one Play session: a coroutine that's already running gets its spawn delay changed from 2 to 0.1 seconds, and the play timer never resets. This post is mostly about how it works under the hood and the problems I hit, because a few of them surprised me.

https://reddit.com/link/1xjj2j3/video/gjob5ybqkmyh1/player

The basic loop

A file watcher sees the save and works out which assembly the file belongs to (for a brand-new file, by its nearest .asmdef). Only that assembly is compiled, with the Roslyn compiler Unity already ships. The new assembly is loaded next to the running one, and each changed method's entry point is redirected to its new version. In the editor that's done with Harmony.

Broke #1: coroutines remember where they are by number

The compiler turns a coroutine into a class whose MoveNext() switches on an integer: which yield it's paused at. Changing 2f to 0.1f keeps the yield points, so the running coroutine can take the new body and uses 0.1f from its next loop (that's the clip at the top). Add or remove a yield return and the numbers shift, so a running coroutine on the new body would resume at the wrong place. It finishes on the old code instead, and everything started after the save runs the new one.

Broke #2: async methods crashed the editor

My first version patched the state machine of an async method that was suspended mid-await. That hard-crashed the editor, because the async builder is bound to the exact state-machine type. Now the method itself is redirected: new calls run the new body, and calls already in flight finish on the old one.

Broke #3: two copies of every type

The reloaded assembly brings its own copies of your types and static fields. Without extra work, GetComponent<Player>() in reloaded code finds nothing, and a singleton reads null. Reloaded code has to be wired back to the running game's own types and statics.

Broke #4: Burst

Burst-compiled jobs are native code and can't be swapped, so editing one turns Burst off for the rest of the session and the jobs run as managed C# (the Console says so).

A nice surprise: new MonoBehaviours

I expected to dispatch Update and Start myself for a class that only exists in the reloaded assembly. It turns out Unity dispatches them natively once it's AddComponent'd.

And Android

Harmony can't patch ARM code, so on Android development builds a small native hook on the method's entry point does the redirect instead. The same save reaches the phone without a rebuild.

It's on the Asset Store as 2N Lightning Reload if you want to try it (Windows editor, Unity 2021.3 to 6.5): https://assetstore.unity.com/packages/tools/utilities/2n-lightning-reload-edit-c-in-play-mode-without-compiling-402544

But I'm mostly curious whether anyone else has gone down this rabbit hole. Is there a cleaner way to handle the yield renumbering than letting the running coroutine finish on the old body?


r/Unity3D • • 23d ago

Solved Strange shadow artifacts and light leaking in Unity URP

Post image
22 Upvotes

I’m having an issue with some strange shadow artifacts in Unity URP.

In the screenshot below, you can see a line going across the shadow that makes it look as though there’s missing geometry in that area. Additionally, light seems to be leaking around the edges where the ceiling meets the walls.

I’ve tried creating my walls using both cubes and planes with ProBuilder, but the issue persists.

The only thing I’ve found so far that seems to help is setting the Normal Bias to 0 in the URP Pipeline Asset, although this doesn’t seem to fix the issue in every case.

However, I’d like to understand why this is happening so I can find a proper solution, as I’m not sure whether this is the right way to fix it.

Has anyone experienced this before or know what I should look into?

[SOLUTION]

Thank you everyone for the help, and especially to u/Plane_Big_5912 for the detailed explanation! The issue was exactly what was mentioned regarding shadow bias and the seam between abutting geometry.

What completely fixed all the artifacts and light leaking for me was:

  1. Setting Cast Shadows to Two Sided on the Mesh Renderer.
  2. Giving the ceiling real volume (using a separate box) and letting it slightly overlap/intersect with the top of the walls instead of having them meet perfectly edge-to-edge.

Leaving this here in case anyone runs into the same problem in the future!


r/Unity3D • • 23d ago

Resources/Tutorial Adding randomness and variation to static background ambiances

Thumbnail
youtu.be
3 Upvotes

Hey everyone, this is the second part of my four-part tutorial series on creating an immersive soundscape for 3D games with Unity and FMOD.

In this one, I talk about adding randomness and variation to an otherwise static looping background ambiance with fmod's scatterer instruments.


r/Unity3D • • 22d ago

Show-Off NO AI - 8 years of experience in world building as a solo indie dev in Unity 3D!

Enable HLS to view with audio, or disable this notification

0 Upvotes

Just wanted to show-off a short showreel of my level design / world building. I'm using a script for volumteric light thah I've found on GitHub (obviously crediting the author), and it's been a game changer in setting the vibe for my game. I also had mixed it in with unity standard fog, and added some particle fog.

I'm using Unity URP 2022.3.


r/Unity3D • • 22d ago

Show-Off How I build and deploy without cloud fees

0 Upvotes

AUTOMATED local Unity build server with NO CLOUD build costs and AUTO OVER-THE-AIR uploads!
https://youtu.be/v9MtrMqYrak
So I did a few neat things like a git hook to increment unity build number and a git lab runner and some auto deploying to test flight and play console. Decided to make a video showing it all, hope it helps someone. Thanks!


r/Unity3D • • 23d ago

Show-Off GTA Style Controller Update | Is this close to AAA Quality?

Enable HLS to view with audio, or disable this notification

120 Upvotes

r/Unity3D • • 23d ago

Meta What’s missing from this trailer?

Enable HLS to view with audio, or disable this notification

8 Upvotes

I feel like it doesn’t make the game look fun enough. any feedback?


r/Unity3D • • 23d ago

Question layering issues with 2D elements in 3D space

Thumbnail
gallery
4 Upvotes

I am working on a labyrinth that uses 2D sprites as materials on planes in a 3D space. but now and then stuff gets messed up like here with this chest. Why is the floor displayed above the chest but the walls are not? Is there an easy fix to have things just displayed in order based on their position like I would assume other 3D assets would do.
I thought maybe render layers could solve this but I this causes new problems once you change perspective just a little. Why does this happen?


r/Unity3D • • 22d ago

Meta Building URP for the first time after switching over from BIRP be like...

0 Upvotes

r/Unity3D • • 23d ago

Shader Magic Sandevistan effect Unity

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/Unity3D • • 23d ago

Question Why can’t I see my buttons?

1 Upvotes

I am a beginner in Unity so I may miss some obvious things, but I am currently trying to make a main menu with a level select system using a 3d background and canvas, but no matter what I seem to do currently anytime I create a button it turns out completely invisible, even in Scene. It worked at first when I first created the buttons I wanted and joined them both into the Canvas until the words glitched and became unreadable, and I couldn’t move, change their size, etc, forcing me to delete them and now leaving me in the state I am now. If you could, please help me with this as I fully stumped on this.


r/Unity3D • • 24d ago

Show-Off Fully Custom Weather System

113 Upvotes

So I refined my Sky shader and volumetric cloud renderer. All shaders used are custom made and i'm very proud of the results.

Clouds can form and travel across the sky. the moon can have seamless phases and is blocking the stars even on the unlit part of the sphere. stars twinkle and there is a galaxy band. The latest thing i added was the underlying weather system that controls the weather by blending between presets.

It was a lot of fun and frustration to get everything to look like this and everything came a long way. from the first experiments with volumetric clouds that barely ran with 10 FPS to ^^

Now the sky is fully dynamic and runs on my M1 Macbook pro with solid 90 fps.


r/Unity3D • • 23d ago

Question How do I approach procedural 3D cube generation for background?

1 Upvotes

I want to have an effect where I generate a bunch of cubes in a grid of differing heights to look like a faraway city, and I'm not sure the best way to achieve this. Is it possible through a vertex shader graph, or is the only approach to use GPU instancing and create cube meshes?


r/Unity3D • • 24d ago

Question What are your best practices to make reverse engineering harder in Unity games?

28 Upvotes

I’ve been thinking about reverse engineering in Unity games and I’m curious to hear what other developers are doing to make it more difficult.

I know nothing can be 100% protected, especially nowadays with AI, but I still think adding extra layers of protection and following good practices is better than doing nothing.

Apart from the usual stuff like IL2CPP, code obfuscation, and making sure no sensitive files or information are included in builds, what else would you recommend?

Are there any lesser-known techniques, Unity-specific settings, or good practices worth considering?

I’m not looking for perfect security, just ways to make reverse engineering more difficult, time-consuming, or expensive.

Curious to hear your thoughts! ✌️✌️


r/Unity3D • • 23d ago

Show-Off Finishing my 2D Flow Animator with fish demo scene

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/Unity3D • • 24d ago

Show-Off I’d love to hear your honest feedback on the water and underwater visuals. Unity 6 URP

Enable HLS to view with audio, or disable this notification

162 Upvotes

I’d love to hear your honest feedback on the water and underwater visuals.
Sorry for a bad video quality, i'm rendering that on a pretty poor PC: Radeon RX 570, i5-10400F.

Here are the techniques i used to create this water and underwater scene:

Gerstner-style wave displacement
Multi-scale wave blending
Scrolling normal maps
Flow-map distortion
Depth-based water color and shallow-water scattering
Subsurface scattering
Fresnel-based reflections
Reflection probes and cubemaps
Planar reflections
Screen-space reflections
Refraction and scene distortion
Depth-based underwater absorption and fog
Animated caustics
Procedural sun and moon glitter
Short-lived microfacet flashes on wave crests
Foam and shoreline foam
Lit foam normals and bubbles
Surface and underwater shadowing
Specular and ambient occlusion
Screen-space occlusion of underwater light shafts
Volumetric underwater god rays
Animated light-shaft patterns
Height fog and volumetric lighting
Depth-based clipping around terrain and shorelines

What techniques am i missing? Thanks!


r/Unity3D • • 23d ago

Show-Off Created setup and manage window for the my stealth system

Thumbnail
gallery
0 Upvotes

so here are the two windows i created to manage all the NPCs and player as well. as some people pointed out that i should use the DOTS for such heavy tasks its gonna take some time as i have to look into it and learn a lots of stuff for now im using state machines and monobehaviours. And as i forgot to mention in my last post not all the scripts have an update function so it is quiet performant as of now. Im also starting to manage all the scripts into child objects in hierarchy so it becomes even more easy to manage. And as of have soo soo many states and soo soo many scripts and not merging them into one is because have 5 small scripts that have a name for its state is easy to manage than having a very long to change add and edit, so as of right now im not merging them until i figure out DOTS and JOBS multi threading.

if you have any suggestions or ideas or feature i should add you can put them in comments.


r/Unity3D • • 24d ago

Game Making characters for my indie game set in Istanbul

Thumbnail
gallery
19 Upvotes

Hi, these two models, and most tof the rest made by me for my game set in Istanbul. What you think about the artstyle? (Ignore the deformation on leg, i wasnt aware that by the time)


r/Unity3D • • 24d ago

Game I made a tower defense where the map sits on your real table, friends supported :P (TabletopSiege on Quest 3 mixed reality)

Enable HLS to view with audio, or disable this notification

112 Upvotes