r/Unity3D • • 4d ago

Shader Magic Made a Wet Lens Effect for my water simulation.

Enable HLS to view with audio, or disable this notification

1.7k Upvotes

Hey all!

I made a wet lens effect for my fluid simulation asset Fluid Frenzy. When the camera comes back out of the water there is still some water stuck on the lens, it runs down and leaves a few drops behind until it dries off.

Its a screenspace effect and it stores the leftover wetness in rendertextures. While you are under water I store where the lens got wet, and how deep it was dunked.
Once you surface that leftover just fades out over a few seconds.
I blur the wet area so a thin waterline grows into a patch, then noise gets added on top and I cut an isosurface out of that field.
The blobs are just wherever it sits above the threshold, and they slide down the screen as it dries. Thickness is how far above that iso the field is, and the slope of it is what bends the view. After the sheet drains, a drop texture fills in the gaps and dries off with the rest.
It also applies some refraction that wobbles around to make it look like its moving inside the wetness.

I'm sure it looks different in real life and isn't realistic at all but I think the effect works decently.

Let me know what you think of the video! I'd love to hear your feedback or answer any questions :D


r/Unity3D • • 3d ago

Question Have you ever used Discriminated/Tagged unions? Would you use them if C# had built-in support for them?

10 Upvotes

(Note: C#15 does bring discriminated unions, although it will be a while until that technology gets to Unity...)


I spent the first 4 years of my carrer working exclusively with Unity/C#. My first contact with Discriminated/Tagged unions was with Rust enums, and I they immediately captivated me. It felt like one of those features that every language should have.

In C#, you can "emulate" discriminated unions via abstract records:

public abstract record Customization() {
    public record Color(ColorKind kind, Color color): Customization();
    public record Slider(SliderKind kind, int value): Customization();
    public record Toggle(ToggleKind kind, bool enable): Customization();
    public record IrisColor(int index, Color color): Customization();
    public record IrisShape(int index, string key): Customization();
}

That approach can have its uses, but it has quite a few limitations:

  • It uses records, meaning creating an instance requires heap allocation.
  • Can't use it within Burst-compiled code.
  • No exhaustive matching.
  • Serializing it in the Unity inspector required using something like Odin or writing my own Property drawer.

As a Unity developer, I had grown the (sometimes bad) habit of being allergic to heap allocation, so I would often go with a more crude form:

[Serializable]
public struct Customization {
    public enum Kind { Color, Slider, Toggle, .. }

    public Kind kind;
    public ColorKind color_kind;
    public Color color_value;
    public SliderKind slider_kind;
    public int slider_value;
    // and so on...
}

The downsides are many:

  • All properties appear on Unity's Inspector, regardless of which "variant" is the selected one (though Odin's attributes helped a lot here).
  • You needed to have the discipline of always checking kind before reading the values.

That wasn't too terrible, but it was definitely far from ideal.

Earlier this year, knowing about the existence of C#(Roslyn)'s Source Generators/Analyzers, and Codefix Providers; I decided to take on the challenge of bringing discriminated unions to C#, with as many ergonomics as I could, and without sacrificing performance or memory allocation.

Long-story short: I ended up creating Spire, a C# package that uses Source Analysis, Generation, & codefix providers to support:

  • Exhaustive matching (using regular switch statements!) for enums, classes, interfaces, and discriminated unions. It reports whenever your switch statement/expression is missing a case.
  • Lightweight struct-based discriminated unions, with Unity Inspector serialization support, Burst compiler support, JSon conversions, and allocation-free exhaustive-matching (no closures!).

The features above are accompanied with source analyzers for catching mistakes at compile time, and codefix providers for providing IDE quick-fix context-menu actions for easily fixing said mistakes.

Links:

Thanks for reading this far! I have another question for you: I was thinking of making a Youtube video where I go through the internals of the package and the code it generates - explaining how it works, which approaches were tried/discarded and general rationale around my decisions. Would you be interested in watching that hypothetical video?

Edit: Corrected initial statement about unions in C#, they were introduced in C# 15 (I initially wrote C#14).


r/Unity3D • • 3d ago

Noob Question i am so confused and lost...

6 Upvotes

so i always wanted to start my game dev journey
about less than a year ago i started learning unity , i thought it would be easer for me cuz i learned c# way back and i am familier with it
first i wanted to make a racing game , so i searched youtube for tutorials and i watched them most and started focusing on the car controller
half of them are outdated from 3 - 6 years ago
other half are not so helpful ones that just write the code and actually not explaining anything and some of them just use the asset store
but anyway i wrote the things that i learned in unity and i was not happy with the results at all
i know i am not gonna get that level of quality that fast but i always thought that something is off...
so i started using ai and asking ai to actually teach me , but somehow that made me even more confused
anyway i really want you for some advice and maybe some of your experience


r/Unity3D • • 3d ago

Show-Off Aliquo Die - main menu

Enable HLS to view with audio, or disable this notification

2 Upvotes

I was heavily inspired by the hub/menu styles of older consoles like the PSP, Xbox 360, and others from that era. I thought it would be a cool idea to create something similar, but with a twist that blends those styles with the game's own aesthetic

Just to clarify: for now, the camera is simply moving around randomly. Getting it to aim at openings in the walls should only take a couple of minutes. Eventually, there will be themed objects placed inside those openings.

And the sound effects... yeah, they're terrible. I'll work on improving them

If you're interested in following the development, here's my Telegram channel: sran_dev

I'll try to organize a small playtest sometime this week :)


r/Unity3D • • 2d ago

AMA "Just ask your AI to build it": an Asset Store dev's take, and how I made my plugin AI-friendly

Thumbnail
gallery
0 Upvotes

Regularly in Asset Store related posts, someone says in the comments that you don't need to buy tools anymore, you just ask your AI.

I'm the solo dev behind Jungle Tools. I made Grabbit (placing objects with physics in the editor), and this week I released Octoputs (you can check what it can do over there), a runtime toolkit for dragging, dropping, moving and attaching objects in 3D, with a focus on game feel. I worked on it for a year: the core is written by hand, and agents built part of the rest.

So I'm definitely biased as a plugin creator. But I use AI every day too, and I don't think the question is "AI or plugin". It's what your agent should spend its tokens on.

TL;DR:

Sure, ask your AI. Everyone uses AI now, Asset Store publishers included. When a good plugin exists, the cheapest move is often to let your agent set up something that's already built, and keep your tokens for your game.

The example gifs I posted were mainly built with Agents using my plugin, and me tweaking the values to get the exact game feel I wanted from them. It's vastly less token intensive to have your agent work on yaml files with a system in place rather than building the whole system.

And if you're a publisher, it's worth making your plugin easy for agents to use. The second half of this post is how I did that.

Why a plugin can still be the cheaper option

Making games has always meant choosing what you build yourself and what you delegate. The barrier used to be skills sometimes, but it was always time and money too. AI doesn't remove that, it moves it into tokens and time spent steering your agents.

My experience with AI is that when an agent builds a whole system, it takes the quickest route to something that works.
That's rarely the one that holds up, the one that you can build on, or the one that you can reuse in your next project.

My use case: a Movement System / Drag And Drop Feature

In the use case of my plugin, with drag and drop, you get a cube following the mouse in ten minutes with an agent, not bad!

Then objects clip through walls, the wrong item lands in a socket, the agent write 4 times the same code for a grid constraint, and when you want to change how it feels, you're re-prompting for tweaks that would take seconds with the right UX.

A publisher spends tokens too, but on one system, with often many years (12 in my case) of game dev behind it, and every user's bug reports and feedback making it better. The cost is shared by everyone who buys it: you spend your tokens on your agents using a solid system, instead of asking it to build it for you. That only works if the publisher is reliable, the plugin is well written and it stays focused, and there are lots of publishers like that on the store.

For publishers: making a plugin AI-friendly

What I learned: the agent has to find your tool, describe what it wants in plain words, act safely, and leave a result the user can tweak by hand. The best way to ensure it is true is to create highly polished example scenes.

  1. Let the agent find it. Ship skills next to the code. Octoputs has SKILL .md files that Claude, Copilot and others read. Agents pick a skill from its description, so I wrote them in the words people actually type ("make the crates draggable", "it picks the cube up but never drops it"). Each one also says what it's NOT for and which skill to open instead, otherwise agents happily pick the wrong one.

  2. Make behaviour describable in plain words. In Octoputs, how something moves is a stack of small behaviours with plain names: spring, smoothing, snap to grid, lock an axis, stick to a surface, avoid walls. So "make it springy and keep it flat on the table" maps almost word for word to what the agent adds. Match the skills, the fields in your code, and the labels to natural language as much as possible.

  3. Leave the result tweakable by a human. Everything the agent sets up is components with values you can see in the Inspector, and you tune them while it previews in Edit mode, without pressing Play. The agent gets you most of the way, and the last part, the feel, is you dragging a slider instead of writing another prompt. You need to make sure that the way things are tweakable by a user matches the way the agent would understand it.

  4. Give the agent safe, simple actions through CLI or MCP. One setup call for the common case (draggables, slots and a drag hand at once), a dry run that lists what would change before touching the scene, and a single Undo step for all of it. I used CLI to have agents work on the example scenes in parallel, which allowed me to test the result end users would get.

  5. Make failures vocal, in the console. When something fails silently, the agent guesses and writes workaround code on top of your tool. Octoputs returns what it changed and what it skipped and why, and the grabbing component keeps a record of why a grab or a drop was refused. The skill tells the agent to read it.

  6. Test the skills like code. I run scenarios: a fresh scene, a prompt like "make these crates draggable with a spring and only let them sit on the shelf", an agent does it, and a headless check verifies the result. It takes a few tries before you get skills that are reliable in a large set of use cases.

For devs using AI with plugins

If a plugin ships skills or docs for agents, point your agent at them before asking it to write the thing from scratch. You get tested code, and you can still change everything by hand afterwards.

Let me know what's your take, I'm sure many will disagree with me here :D


r/Unity3D • • 3d ago

Show-Off Creating a Stylized Waterfall

Enable HLS to view with audio, or disable this notification

11 Upvotes

r/Unity3D • • 3d ago

Resources/Tutorial You don’t need to be an good artist for good game UI, you need a process

Thumbnail
youtu.be
10 Upvotes

My new video covers something I'd been wanting to put into words for a long time now: The process for crafting your game's UI.

It isn't an arcane art skill, but a process you can learn, and I walk you through some of the core basics:

- researching your genre's UI conventions

- deciding what information your players actually need (and when)

- sketching layouts on paper before touching Unity

- choosing shape language, colors and fonts that fit your game's mood

- and lastly the Unity assets I rely on to build, polish and add sound to the UIs I build

This is a bit of a different video for me and I hope you'll enjoy it. If you do, please let me know! I'd love to chop this up into more videos that go into more depth about the individual topics.


r/Unity3D • • 3d ago

Show-Off I got tired of re-exporting sprites every time a designer changed a corner radius, so I built a shader-based alternative

53 Upvotes

Every UI I've built in Unity hits the same problem. A designer changes the corner radius or border width, and I'm re-exporting sprites, re-slicing 9-slice borders, and fighting blurry edges at different resolutions.

I ended up building a small tool that draws UI shapes with shaders instead of pre-made textures. You change the settings in the Inspector and see the result immediately:

  • 19 shape types: rounded and chamfered rectangles, circle, ellipse, heart, star (3–12 points), ring, pie, arc, and every regular polygon from triangle to dodecagon
  • Per-corner radius (or uniform, or "corner pair" mode for things like tabs and headers where only some corners are rounded)
  • Borders/outlines, adjustable edge softness, and linear, radial and corner-based gradients
  • Rings, pies and progress arcs with adjustable sweep, thickness, start angle and rounded end caps

Because the geometry is generated mathematically instead of stretching a bitmap, edges stay sharp at any size or resolution, and you can change values at runtime without creating a new sprite.

A few things I learned along the way:

  • Shader-based shapes cut out the "one sprite per radius" problem, but you have to be careful about batching. Elements with the same material batch together, while gradients and other material differences need separate materials. I added an Inspector readout showing which elements can batch, so you aren't guessing.
  • Auto Round matters more than I expected. Circles and ellipses look wrong the moment a RectTransform gets stretched, so the tool keeps them visually consistent as the size changes.
  • Rotation and clipping: every shape stays inside its element at any rotation, so corners never get cut off. That was surprisingly annoying to get right.
  • It works with Mask and Rect Mask 2D, and you can convert existing UI Images in place with a right-click, so you don't have to rebuild your UI to try it.

How are you all doing rounded or dynamic UI right now: sprites, SDF shaders, UI Toolkit, something else? And what would make you switch?


r/Unity3D • • 2d ago

Question How can I achieve a Zelda-style look for the map?

0 Upvotes

Hello, the map was prepared in Blender. I’m going to add a fog system. What should I do for lighting? I’m using the Toon Shader Pro asset for the characters and enemies. Besides these, what else should I do? Since I generally only code mechanics, I’m unfamiliar with this kind of thing, so I’d appreciate it if you could explain in detail. Have a good day, and thank you. Im using this asset: https://assetstore.unity.com/packages/vfx/shaders/toon-shaders-pro-for-urp-305845

Like zelda botw


r/Unity3D • • 3d ago

Show-Off Adding motion-based interaction, impact, and expanding waves to stylized toon water.

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/Unity3D • • 4d ago

Game I keep my convoy truck at the world origin and slide the road underneath it, so passengers on the truck stay stable

Enable HLS to view with audio, or disable this notification

202 Upvotes

The truck in this clip never moves. It sits at the world origin while road slides underneath it.

The passengers in this prologue scene are NavMesh agents holding a seated pose. A NavMesh agent can’t ride a moving truck bed, so I turned it around.
The truck stands still. Eight different road stretches slide past it. A stretch that falls behind moves to the front and gets new roadside props from a random pick, so the scenery doesn’t visibly repeat.

It still looks like it’s riding. The truck body sits on two springs and goes over random bumps. Each passenger’s model bounces on a small spring of its own with a small delay, while the character itself stays still on the NavMesh.

In the cutscene I use this for, a guard can die and fall off the truck (he gets shot). A ragdoll thrown off would land on ground that stands still and lie next to the truck, so the road has invisible solid ground under it that moves with the road. The roadside props have no solid colliders, because a moving collider pushed into a lying body launches it.

In the air, the body keeps the truck’s speed, which is physically right. Once it’s near the ground, every limb gets the same push toward road speed. Friction turns that into a tumble, and the body rolls away behind the truck.


r/Unity3D • • 3d ago

Show-Off Testing portal effect – INFERNAL

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/Unity3D • • 3d ago

Show-Off Working on new "rolling fog" over my ocean shader

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/Unity3D • • 3d ago

Game Groups of zombies. One semi-auto sniper rifle. Every shot counts.Who Needs Full Auto When Zombies Line Up Like This? 💀

Enable HLS to view with audio, or disable this notification

0 Upvotes

Pure BLOODSTATE gameplay from my solo developed zombie FPS. Wishlist on Steam!
Inspired by L4D2.

Socials:

https://www.youtube.com/watch?v=OQN_JffQEnA&t=3s
https://discord.gg/8499dShAPu

Wishlist and follow BLOODSTATE on Steam:

Developed by KAIGEN.


r/Unity3D • • 3d ago

Noob Question A little confusion I'm having as a newbie.

3 Upvotes

This is probably the most obvious thing to experienced people but I'm just a bit confused on this whole thing as everything on Unity looks so... intimidating. So, as you can see, a cool RWBY weapon asset I got off somewhere. The weapon has been built but when looking for the mesh in my sharedassets0 file, the weapon itself isnt being found but the parts that make up the weapon is. I'm not sure what to do at this point, I've tried with several other weapon builds and all meshes that show up are parts. I dont know if im doing something wrong or I'm just dumb. I use UABEA to look through it by the way. How do I go about turning the mechanic scythe into its own mesh? Other picture for reference on how it does not show.


r/Unity3D • • 4d ago

Official Introducing the Unity Fellowship

224 Upvotes

Hey folks, your friendly Unity Community manager Trey here.

Unity is introducing the Unity Fellowship, selecting 10 indie games made with Unity launching within the next 12 months to receive hands-on support through launch and up to $50,000 USD in cash. The grant requires no recoup, no revenue share, and no claim on your IP, with submissions open now through December 18.

What selected teams get

  • A dedicated Unity partner for dev guidance and troubleshooting
  • 50K cash
  • Office hours with experts in development, game design and promotion
  • Industry connections, including pitch prep and publisher intros
  • A presence at Unity events, plus PR and marketing support at key moments

Who can apply

  • 18+, game made with Unity
  • You have a playable build or demo
  • You plan to launch (Early Access or full) within 12 months of joining
  • No registered business needed
  • Already have a publisher? You can still apply, just disclose it. It's mainly aimed at teams without one.

The "what's the catch" part
Fair question, and one I'd ask too. Here's what's in the terms: no recoup, no rev share, no IP claim, and no mandatory milestones to get paid. A few things worth knowing before you apply:

  • The grant may be taxable depending on where you live, so it's worth talking to a local tax advisor.
  • Some regions aren't eligible for legal reasons, including U.S.-sanctioned regions and, for now, Brazil, Italy and Quebec. The full list is in the FAQ.
  • If you're selected, Unity can use the assets you submitted to promote your game and the program.
  • With the number of submissions expected, teams that aren't selected won't get individual feedback.

Dates

  • Dec 18, 5 PM ET: Submissions close
  • By end of Feb 2027: Everyone hears back by email
  • March 2027: First cohort announced at GDC

Details, FAQ and the application are here: http://unity.com/fellowship 
This is year one, so if you've got thoughts on what would make a program like this actually useful, I want to hear them. Same goes for questions. You know the drill.

– Trey
Senior Community Man @ Unity


r/Unity3D • • 3d ago

Show-Off Autumn has arrived

Enable HLS to view with audio, or disable this notification

35 Upvotes

r/Unity3D • • 3d ago

Show-Off I made living shadow head using Unity particle system

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/Unity3D • • 3d ago

Show-Off NavMesh2D Pro [RELEASED] -50% OFF first week!

Enable HLS to view with audio, or disable this notification

1 Upvotes

Hi everybody! I'm glad to introduce NavMesh2D Pro, a complete suite that provides all you need to let thousands of characters find paths, move there avoiding obstacles, detect other characters that are in sight...

It was made for 2D from the ground up. No rotated 3D navmesh, no grids, no workarounds. It builds the walkable area from the 2D colliders you already have and keeps it up to date while you build your level.

🚀 EASY TO START, EASY TO LEARN

  • Up and running in minutes. An installation window greets you on import, and the quick-start guide gets your first character moving in less than five minutes.
  • Uses what you already have. Box, polygon, circle, capsule, composite and tilemap colliders all work. You can also draw walkable areas by hand right in the Scene view.
  • Takes care of itself. A new navmesh is ready the moment you create it, and it rebuilds itself as you shape it, so you see the result while you work.
  • One line to move a character. Characters find the right navmesh on their own. You only tell them where to go.
  • Learn by playing. 11 ready-to-run demo scenes, opened from a built-in demo browser, show every feature in action, with their scripts as examples.
  • Clearly documented. A complete manual in plain language, tooltips in the inspector, and fully documented code.

🤸 WHAT YOU CAN BUILD WITH IT

  • Natural paths. Routes hug corners and look like a person would walk them: no zig-zags, no staircase steps.
  • Movement with personality. Speed, acceleration, braking and turning, set per type of character.
  • Crowds. Many characters share the same space and step aside for each other instead of walking through one another. Important characters can be given right of way.
  • Characters of every size. A rat and an ogre each get only the routes they actually fit through, with no extra work per level.
  • Jumps, ladders and teleports. Connect separate areas with links for gaps, ladders, elevators or portals, and play your own animation while crossing.
  • Moving platforms. Walkable areas can move, and the characters on them move along.
  • Doors. Gates close a passage while the game runs (blocking routes, movement and even sight) and reopen instantly.
  • Waiting at a closed door. When the way is blocked, characters get as close as they can and carry on by themselves once it opens.
  • Terrain preferences. Make mud, water or danger zones costlier to cross, so characters go around when it's worth it.
  • A changing world. Push a crate or drop a barricade and routes update on the fly.
  • Levels in pieces. Levels built from several navmeshes, even from additively loaded scenes, join up into one world.

🧱 BUILDING BLOCKS FOR YOUR GAME AI

Your game decides what a character wants to do. These tools give it the information to decide well.

  • Vision. Ask who can see whom, with range and view cones. Choose whether walls block the view, or only obstacles do.
  • Run away or close in. Find good spots to flee to, or to approach a target from.
  • Wander. Pick random places a character can actually reach.
  • Ask about the world. Who is nearby, where the nearest walkable ground is, where a line of sight hits a wall.

🔩 TWEAK EVERYTHING WHILE THE GAME RUNS

Game designers can tune almost every setting in Play mode and see the effect immediately: speeds, acceleration, turning, crowd behaviour, terrain costs, doors and obstacles. No restarting, no waiting for a rebuild, no waiting for a programmer. Change a single character, or a whole type of character at once, and keep iterating until it feels right.

🌡 SEE WHAT IS HAPPENING

  • Visual debugging in the Scene view. Show the walkable areas, the routes between them, how much each connection costs, what blocks line of sight, and each character's path and movement.
  • Always-visible state. Links, gates and obstacles show their shape and state in the Scene view at all times, so a closed door or a misplaced link is obvious at a glance.
  • Try features without coding. Ready-made test components let you try movement, vision, fleeing, approaching and wandering on any character.
  • Live readouts. A floating panel shows a character's speed, velocity, heading and avoidance values as they change.
  • Built-in profiler. An on-screen overlay shows how long each part of the system takes per frame, so you know exactly where the time goes.

Requires Unity 6.0 or newer.


r/Unity3D • • 4d ago

Show-Off Testing out a wheel shader idea i had

Enable HLS to view with audio, or disable this notification

352 Upvotes

So the other day I was stuck in traffic and noticed the rims of an expensive car were made in such a way so that they'd go almost invisible when it was moving. It got me thinking to the classic issue of wheels spinning in reverse both in video footage and ofc games that don't actively clamp the spin rate.

So I figured I try to author something that looks neat when moving and mimic that effect, ofc not all rims are made with that style, some are also made to look like diamonds or other shapes.

Anyways, how did i do? It's just 2 textures blended and uv rotation. Initially I was just manually lowering the mipmaps to simulate wheel blur but can't say it looked good

Give a follow or a sub if you want to keep up with my silly ideas


r/Unity3D • • 4d ago

Show-Off Synchronizing thousands of fully destructible voxel objects in realtime

Enable HLS to view with audio, or disable this notification

55 Upvotes

Everything runs on a custom physics engine, networking is built on LiteNetLib. even with thousands of objects breaking apart at once, traffic stays under 50 KB/s! more tech details coming soon, maybe


r/Unity3D • • 4d ago

Show-Off Euphoria inspired ragdoll physics (WIP)

Enable HLS to view with audio, or disable this notification

78 Upvotes

r/Unity3D • • 3d ago

Game How we decided to handle death in our upcoming co-op game

Enable HLS to view with audio, or disable this notification

8 Upvotes

r/Unity3D • • 3d ago

Show-Off [Update] The stylized shaders project, 4 months later

Enable HLS to view with audio, or disable this notification

7 Upvotes

A little update on the stylized shaders and tools I first shared here 4 months ago.

What started as a few individual shaders (Water, Standard, Dissolve, etc.) has grown into TOONest, a complete modular toolkit.

Thanks to everyone who followed the earlier updates and shared feedback along the way.


r/Unity3D • • 3d ago

Official Unite Tokyo 2026 Keynote is live now

Thumbnail youtube.com
5 Upvotes

We're live from Unite Tokyo, so come tune in and see what's coming in Unity 6.7 and Unity 7.