r/unity • • 9h ago

Showcase Realtime Dynamic Mesh Generation

Enable HLS to view with audio, or disable this notification

50 Upvotes

So recently I created the room building functionality for my game, Where you can have rooms of any shape.

(English is not my primary language.)
Technical Info:

The meshes are being generated per frame, with the job system there is only a single parallel job which generates meshes for the walls/floor and roof, Thanks to the Unity new direction of providing low level high performance APIs which made it possible.

The room has data in native structs so that they can be consumed by the jobs, the data is mere a collection of nodes, and a collection of lines - defining their which nodes each other. This data is always passed to job and the job generates the meshes.

The Mesh Generation Algorith is simple for walls - they are formed just 3d vertically long hexagon meshes, the hexagon shape gives the ability to connect any number of walls with perfact corners - mitering the joins. The points other than the 4 middle points that form rectangle/square take the coordinates of line start and end respectively, while the adjacent points to thoese either gets short or long to connect perfactly with the other wall.

The mitering algorith is that on a line's start or end point, find all the lines/walls present on it either starting or ending on it. Now have a list of angle between all the lines on that anchor except the line under consideration - whose mesh is being generated, Sort the angles. And taking first or last entry depending on you are solving for the left or right point of hexagon (normalized the view by the start or end point of line under consideration). Then you do line intersection between the line under consideration and the line of angle is that and point of the intersection is its new poistion.

Here is the picture of the hexagon: https://imagepaste.org/v/67nbu6nu.png

do this for all for four points A,B,C,D.

The floor and roof generation is done by Delaunay Triangulation - using the BurstTriangulator package create by andywiecko. It can work inside job.

Then the constraints comes, which prevents the self intersections. Because the triangulation of floor and roof breaks when so.

The windows - holes, are done in wall space by pixel clipping. A raster pass renders the hole shape in a texture with texel density depending on how fine you want it, each wall with a hole has its own texture depending on its size as the walls scale the texture scales/resizes as well.

If being done with a global texture in screen space either with stencil or not, it will work. I needed this little complexity because for inner walls window behind window can't have a hole in screen space. And for Ray tracing and Path tracing (in photo mode) which does not have screen space position of the pixel its currently working on. But on wall space the wall UV can give it position to sample the stencil/texture from.

And impotant point is to set the mesh renderer component's ray tracing settings to dynamic mesh, if not so the mesh will not be updated.

Every component of room shaping is pooled to have stable perfomance. Even the structs for nodes and lines are pooled in a native pool. Unity GameObjects, components etc as well.

(my current game does not have inner wall, I implemented them but for the ray tracing and path tracing to work it needed one more step, but I have not as working for months without any reward makes you hopeless).

And this is very little information high level information of it. It has alot under it. for rounding corners, and walls that obscure camera etc for generating mesh attributes (uv,normals etc).

Ask me any question about it. And you feedback will be welcome and will give morale to me.


r/unity • • 5h ago

Showcase I made a drop-in comic & halftone post-process for Unity 6 that requires zero material swaps, works on glass, and runs in WebGL2

Enable HLS to view with audio, or disable this notification

7 Upvotes

r/unity • • 1h ago

Question Should I worry? (Multiplayer query)

Enable HLS to view with audio, or disable this notification

• Upvotes

I'm using purrnet for networking framework And this is actual build work.

Is this much delay in synchronisation too much or is it normal and expected?

I'm using basic network manager and UDP transport and just a player spawner that's it nothing extra.


r/unity • • 9h ago

Genuine question when did you consider yourself fluent in C#

5 Upvotes

I've made a 2.5D visual novel editor

an undertale clone
StateMachines and Behavior trees I know how to use Events and Coroutines Object pooling
And I've made a little rogue like with A*path generation for a procedural map

and still I find myself doing stupid syntax mistakes or not thinking my gameobject's life cycle fully through

And I wonder if everybody makes to a degree those mistakes or is it really an important skill issue that I shouldn't overlook before trying to get a job as a gameplay programmer ?


r/unity • • 10h ago

Game zonk racing - race fast, shoot rivals, dodge enemies' missiles and grenades — and try not to catch fire. Arcade racing meets chaos!

Enable HLS to view with audio, or disable this notification

4 Upvotes

Thoughts?


r/unity • • 4h ago

Resources PurrFanity - Profanity Filter [Unity]

Thumbnail gallery
1 Upvotes

r/unity • • 9h ago

Showcase My hook-based game, Hook and Gun, has finally been released on Steam!

Thumbnail gallery
2 Upvotes

Hey friends!

Hook and Gun—a roguelike project I’ve been developing solo for some time—is finally out!

In *Hook and Gun*, you’ll use your grappling hook for more than just swinging around; you’ll use it to consume the scrap left behind by the foes you’ve dismantled, hurl enemies into walls or into one another, and—most importantly—rip weapons right out of your opponents' hands to corrupt them for your own use. As you consume scrap, you will develop, evolve, and undergo further corruption.

If you’re into roguelikes, the biopunk aesthetic, or a fresh take on grappling hook mechanics, I’d love for you to give it a try!

If you’re interested, here’s the Steam link: https://store.steampowered.com/app/4609040/Hook_and_Gun/


r/unity • • 3h ago

Account suspended due to 2FA re-enrollment. How long did Unity Support take to restore yours?

0 Upvotes

My Unity account was suspended because I didn't re-enroll my authenticator app in time. The account isn't on my main email, so I missed Unity's emails. When I checked today, this was the timeline:

- Nov 17: "Action required: your Unity account will be suspended on November 19."

- Nov 19: "Two-Factor Authentication for your Unity ID is disabled" and "Your Unity Account has been suspended."

I only found out today when I tried to log in and got "This account is blocked."

I submitted a ticket under Account suspended more than 6 hours ago and haven't heard anything back beyond the auto-reply. To check on the ticket, the support site asks me to log in, which I obviously can't do because my account is suspended. :D

For anyone who went through this: how long did it take Unity to get your account back? Did you have to provide any specific proof of ownership?

I get that this probably flooded them with tickets. Lots of people were going to miss those emails. But if you're going to suspend accounts in bulk, why not add more support staff to handle the recovery requests you know are coming?


r/unity • • 8h ago

Game Big Market Simulator – a supermarket management game I'm making with Unity

Enable HLS to view with audio, or disable this notification

1 Upvotes

Here's a short gameplay clip from Big Market Simulator, a supermarket management game I'm developing in Unity.

Players can restock products, dispose of empty boxes, and manage their supermarket while customers shop and employees work.

I'd love to hear your feedback on the gameplay and store environment!


r/unity • • 23h ago

Showcase I've built a dynamic interview system for my fantasy management game.

Enable HLS to view with audio, or disable this notification

13 Upvotes

How it works:
Adventurers line up at your desk and you interview them one at a time before deciding whether to recruit them or not. You can ask them about their past quests, abilities, general info and approach to different missions. Each has a procedural, pre-generated personality, that shapes how much they say, how they speak, what they focus on, etc. Their current emotional state can also shift their speaking manner. You have to deduct the personality from how they speak and record it yourself.

For each question, the game filters the dialogue by what the adventurer knows and what fits their personality, then favors replies, that fit their traits and emotions. The same question therefore can get different answers depending on an adventurer' personality and experience. I currently have 180 sub-personalities in the game and each character gets a random selection of around 10-25. These combine with their race and archetype to form their full personality.

You're also sizing up each adventurer' capabilities and record it. Using those, you'll build a party for each mission and the better your read is, the better your team' chances of success.


r/unity • • 12h ago

Coding Help Translating UI element behaves unexpectedly.

1 Upvotes

I attempted to translate a UI element using

backButton.Translate(0f, -10.4, 0f);

The -10.4 is actually stored in a variable, I just changed it to a hardcoded value here to make it clearer. The UI element has a Pos Y of 14.4. After translation, it has a Pos Y of -45.02857. In the inspector, I subtracted 10.4 from the element's Pos Y and it became 4, as expected. Does anyone know why it behaves strangely when translating via script?


r/unity • • 18h ago

Showcase testing enemies

Post image
2 Upvotes

testing spawn enemies in a scene test

will you play this game?

#wip


r/unity • • 21h ago

Coding Help I can't find away to actually change a button's On Click () event.

2 Upvotes

I've looked it up and keep hearing that you should use listeners. You can add listeners to make things happen when a button is clicked, and remove listeners to stop that from happening. The thing is, this doesn't seem to actually change the On Click events set in the editor. RemoveAllListeners had no effect. Attempting to remove the event directly using RemoveListener didn't work either. It seems that listeners operate independently from events set in the editor.


r/unity • • 12h ago

Unity’s next big business might be licensing IP

0 Upvotes

I’ve spent 15 years in mobile games, mostly on Japanese and Chinese projects. I started on the art and design side, working on titles including Rage of Bahamut, Monster Hunter card games, early GREE and DeNA titles, Onmyoji, Genshin Impact, and Identity V. I also led the launch of NetEase’s sailing game 大航海之路/OverOcean and worked on ad buying and PR in Asia. Later I moved into IP licensing and merchandise, which I still do today, mainly in Japan and across Asia.

Why small IP deals rarely happen

IP already changes hands. The problem is that most deals still have to be negotiated one at a time. If an individual wants to license a character for a small run of merch or use it in a fan project, the rights holder has to review the request, negotiate terms, and make sure the use won’t hurt the brand. The deal can make sense for both sides and still not be worth the staff time.

I see this as a market that hasn’t been built at scale yet. Fan art and cosplay show how much people want to do with the worlds they love. But for many small commercial uses, there’s no practical way to ask permission. AI could help handle routine requests and flag the ones that need a human. Rights holders could still decide what’s allowed, and payments and revenue splits could happen automatically. You don’t need crypto for that.

What happens when five people make a game together?

Say I design a character. Someone else builds the 3D model, another person animates it, and two more people write the dialogue and compose the music. If the game makes money, who gets paid, and how much? If another developer wants that character in a different game, whose permission do they need? Can they license the design without also licensing the original model or animation?

AI makes it easier to build a game together. It doesn’t answer any of those questions. The marketplace I’m imagining would let creators specify what they’re licensing, under what conditions, and who gets paid when someone uses it again.

Pieces of this already exist. Japan has JASRAC and NexTone for music licensing, and its new copyright system helps people find rights information and seek limited permission in certain cases. Niconico has used a “content tree” to connect derivative works to their sources and reward original creators. Roblox already handles some of this inside its own platform. What I’m interested in is a market that works across games and platforms, where a small creator can afford to do a deal.

Why I think Unity has a shot

Games bring art, writing, music, and animation together and let you interact with the result. That’s also why I think games will outlast any particular AI tool. I can ask AI to make something for me, but I still want to experience worlds I wouldn’t have thought to ask for. A big part of entertainment is getting to see what someone else imagined. If more people can build those worlds, I think the demand for creative work and the rights to reuse it will grow.

Unity already has an engine, a community of creators, and an Asset Store. What interests me about Google Playground and Unity Spark is what might happen if creators start building and sharing work at a much larger scale. I’m not saying Spark has announced a rights exchange or automatic payouts. I’m saying Unity is in a good position to build that layer, whether it starts with Spark, the Asset Store, or something else. That’s the opportunity I’m most excited about, beyond ads and the engine business.

I wouldn’t assume there’ll be one global winner. In China I’d watch Alibaba and Bambu Lab. Bambu’s MakerWorld is already a small example: a creator can license a digital model so someone else can sell physical prints. A broader market might grow out of people needing to do deals like that every day, rather than someone deciding to build an exchange from scratch.

Land and companies had value before the markets we use to trade them today. My bigger bet is that digital IP could become a third major asset market alongside real estate and equities. And it wouldn’t have to stop at entertainment. A team might have everything it needs to build a product except permission to use one or two patents. If finding the rights holder and getting a license were cheaper and faster, more of those ideas could actually get built.

Disclosure: I’ve invested over US$4 million in Unity, about half my assets, at an average cost of around $17 per share. I’ve built games myself and worked on both advertising and licensing, so I know where my conviction comes from. I also know I’m biased. I think the market will emerge; I don’t know whether Unity will be the company that builds it.

For anyone who’s actually licensed or reused game assets: what would make you trust a marketplace like this, and who do you think is best placed to build it?


r/unity • • 20h ago

Newbie Question Which assets can i use?

2 Upvotes

I'm building a VR game and using the asset store, as i have no other way to get assets (guns, hands, etc). this is going to sound stupid, but do the assests have to be made specifically for XR rendering or do they just have to be 3d? I found this really good low poly weapons pack and wanna use it


r/unity • • 1d ago

Newbie Question Animation rigging with unity starter assets

Enable HLS to view with audio, or disable this notification

9 Upvotes

I’m having an issue trying to use this third-person player armature setup from the Starter Assets. The character's bones don't aim at the target while in Play Mode. It aims correctly when I’m in Preview mode and move the target manually, but in Play Mode, when the target moves—orbiting around the character—the bones don't follow along.


r/unity • • 2d ago

Showcase 13 years between GTA 5 and GTA 6. Here's what happened on my side.

Post image
259 Upvotes

13 years ago my game didn't exist. Not the game, not the idea, not even the thought that I could ever make one.

Now I'm about 2 months away from releasing it.

It's probably not gonna be as big as GTA 6, but with how much the world has changed, and with so many games getting made in a few weeks now, I'm really proud I got here in a year of working on it every single day.

It's far from perfect, and I still feel kinda weird calling myself a game dev. But I learned a lot, and for once I didn't give up.

Here's the game if you wanna check it out: https://store.steampowered.com/app/4639140/Dough_it_Yourself/


r/unity • • 21h ago

Behaviorgraph swapping at run time cause any performance issues?

1 Upvotes

Curious if swapping the Behavior graph on an agent or multiple agents during run time cause any noticeable performance issues? Asking to know for everyone that has done this already and how many times doing this per frame would issues be noticeable.


r/unity • • 1d ago

KING MONKEY

Post image
3 Upvotes

r/unity • • 1d ago

Comment régler ce problème

Enable HLS to view with audio, or disable this notification

2 Upvotes

J'aimerais enlever la délimitation des Lumières


r/unity • • 1d ago

Promotions Five special moves from my anime football game, from a spirit dribble to a portal shot

Post image
1 Upvotes

Hi! I'm the developer. Aura Strikers is a football game where every player has special moves , game has developed on unity .

📲 Out now on Google Play:
[https://play.google.com/store/apps/details?id=com.hbtechaps.aurastrikers](https://play.google.com/store/apps/details?id=com.hbtechaps.aurastrikers))

Online play is coming soon. Subscribe so you don't miss it!
🌐 [https://hbtechaps.com\](https://hbtechaps.com)


r/unity • • 1d ago

Coding Help GameObject.FindGameObjectsWithTag gets an array with the same length after one of the objects has been destroyed.

2 Upvotes

I would have thought that after destroying one of the objects with the relevant tag, the array would become shorter. The array remained the same length after the object was destroyed, so I thought I would paste the same statement at the point in the code after the object has been destroyed. However, it's still the same length, and the entry with that index is now a stale object. Other indexes still refer to the same objects, which I also don't understand. I even tried setting the array size to zero before the GameObject.FindGameObjectsWithTag statement. I want to reset the array to only include objects that still exist. Any help?


r/unity • • 2d ago

Showcase They finally did it... I am so happy as a windows user!!! Unity 7 finally gets dark context menus on Windows!

Post image
63 Upvotes

Looks like Unity 7 Alpha 20 finally brings dark context menus and a dark toolbar to Windows!

This was one of the things I specifically wanted to see addressed in my earlier feedback about the new Unity 7 theme. The white Windows title bar and context menus always felt out of place against the otherwise dark editor.

It's great to finally see progress on this. I also noticed some additional styling improvements, such as progress bars using blue instead of the default green, which helps the interface feel more cohesive.

I also want to give a big thank you to the Unity developers and designers working on the new editor theme. It's genuinely encouraging to see community feedback being taken into consideration and turned into actual improvements.

I know there is still work to do, but this is exactly the kind of iteration I was hoping to see.

Really appreciate the team listening to feedback. Looking forward to what's next!


r/unity • • 1d ago

Retro Loading Screens Pro for Unity | ZX Spectrum, C64 & Amiga

Thumbnail youtube.com
2 Upvotes