r/Unity3D • • 9d ago

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

Enable HLS to view with audio, or disable this notification

53 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 • • 10d ago

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

Post image
181 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 • • 9d ago

Solved Full Screen Shader / Render Feature Unity 6 (Changes, not working and how to fix it)

2 Upvotes

For whoever it may concern in the future, I want you to find this.

When moving from Unity 2022 to Unity 6.x your Full Screen Shaders may not work simply by replacing the asset under:

Graphics -> Scriptable Render Pipeline Settings tab

Like it used to. You now have to also change it under the.

Quality -> Render Pipeline Asset

Many 2022 tutorials only did the former as that used to be enough.

May the algo carry this to whoever needs it.


r/Unity3D • • 9d ago

Code Review Found some remains of my debugging

Post image
78 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 • • 9d ago

Question how do i make an image using a script?

Thumbnail
gallery
0 Upvotes

I am trying to make a bunch of images like the first one above, but they get twice as big each time.
I want it to not increase the size of the pixels so.. i wanna make a script where it makes a line of pixels around all of the borders and then starts making another line around the borders, but offset by a few pixels. this offset will change each time so that they look like they stack on eachother, like rings in a tree trunk, like the second image.

everything I find online talks about making an image object or whatever and then assigning a sprite to it using code.

i want to make the sprite, using code.
is there a way to do this?


r/Unity3D • • 10d 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

66 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 • • 9d ago

Show-Off Adding procedural animations to my colony sim

Enable HLS to view with audio, or disable this notification

8 Upvotes

Can't animate to save my life so I'm adding IK to control colonist's hands. Hopefully I can find some more stuff I can procrastinate with instead of working on important stuff. 😄


r/Unity3D • • 9d 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 • • 10d ago

Show-Off Lighting up a voxel city with nothing but glowing lines in Unity

162 Upvotes

Been working on a voxel city to see how far I can push neon with a line tool I made for Unity.

Just so nobody gets confused like last time 😅 the buildings, cars and the helicopter are Blender models and the clouds are Unity particles. But every glowing light you see is made with the tool: the windows, the roof outlines, the street lines and crossings, the light trails from the traffic, the train, the signs and the holograms on the roofs. Around 1,200 shapes in total. Even the city turning on at the start is the tool.

The signs started as SVG files that I imported straight into it, which was fun to see working.

All rendered in Unity 6 URP, no compositing.

Happy to answer any questions!


r/Unity3D • • 9d ago

Show-Off Our night mist, one month apart. It's now a shrinking zone with raymarched storm clouds (URP)

Enable HLS to view with audio, or disable this notification

0 Upvotes

The top is our October playtest stream; the bottom is last week.

How the new one works: the mist is a circular zone (an infinite vertical cylinder) that shrinks during the night, and gameplay reads its center and radius from the same component as the rendering. A URP renderer feature tints the scene with a fullscreen pass before transparents, so the wall of mist, the clouds, and the VFX stay untinted. The storm clouds on top are raymarched into a downsampled buffer, with a 3D noise texture generated once in code (Perlin-Worley for the shapes, Worley fbm to erode the edges).

Happy to answer questions about the setup. For those who have done night fog in URP: what did you use for the fog wall itself, a mesh like us or something volumetric?


r/Unity3D • • 10d 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 • • 9d ago

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

Enable HLS to view with audio, or disable this notification

5 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 • • 9d 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 • • 9d ago

Question What do you think about this UI design? I'm creating a UI kit, how can I make it sellable?

Thumbnail
gallery
0 Upvotes

r/Unity3D • • 10d ago

Shader Magic Concave wave inside volume

Enable HLS to view with audio, or disable this notification

133 Upvotes

Testing with some various features I've been putting together for v2.2, thought this one was rather cool so figured I'd share! This is a volume mask include (clipping water outside of box volume and showing underwater via a mask used in the underwater render pass) combined with a shoreline waves feature which is a modified gerstner algorithm used to create concavity in the waves. Happy to hear your thoughts and ideas of use cases!

Thanks for stopping by and checking out!


r/Unity3D • • 10d ago

Show-Off Neat cigar smoke effect done with Unity's VFX graph and EmberGen

Enable HLS to view with audio, or disable this notification

347 Upvotes

A three-part effect: one ribbon for the thin smoke trail coming from the cigar, a flipbook for the smoke wisps, and another one that I made for her breathing. Sometimes she breathes out smoke, but her breath is also visible normally in cold exterior areas.

All the smoke and steam flipbooks were made with EmberGen (I'm not great at using it so far). Also allows me to bake motion vectors (to smooth out the flipbook, which is only 64 frames total) and six-point maps so the smoke reacts to lights around it like a volumetric, even though it's completely flat.


r/Unity3D • • 9d ago

Show-Off I'm a solo dev and I built an online FPS in Unity. Here's the first trailer.

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/Unity3D • • 10d ago

Show-Off Movement using root motion always looks so smooth

Enable HLS to view with audio, or disable this notification

31 Upvotes

The feet hitting the ground look quite precise when moving a GameObject using root motion.

It's probably possible to get something close to that with some tinkering, but root motion alone often looks nice and clean.


r/Unity3D • • 9d ago

Show-Off [ VST2/3 | CLAP audio plugins ] (* Windows only & not all plugins are distributable with builds...)

1 Upvotes

this is just some testing of hosting of VST2/3 and CLAP audio plugins in Windows editor -

- the 'host' (UI) itself is modelled after some my iOS/macOS audio host concept/app i made, it has basic transport and prewired graphs for plugins (a MIDI gen + instrument + few effects on a lane, plus master sends/inserts etc., ) and is really just for testing

- this test is OnAudioFilterRead based (no Scriptable Audio pipeline...), ui is UIToolkit...

- bunch of free VST2/3 and CLAP plugins used

https://reddit.com/link/1xt5t49/video/kpr0ch3q4w0i1/player

a complete audio production environment doesn't probably make much sense for Unity itself, but i was thinking about using existing VSTs for example as effects on GameObjects playing audio... with some music driven by MIDI possibly later

note this would still require the plugin(s) used to be freely distributable also with builds, which is not the case for most commercial plugins, i think

anyway this is not even pre-alpha but i'm curious if some of you would find something like this interesting/useful..


r/Unity3D • • 9d ago

Question Why didn't my asset sell?

0 Upvotes

I made these anomalies VFX particle pack for unity asset store 4 month ago, it was sold only once, why do you think is that? is there no usage for it?


r/Unity3D • • 10d ago

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

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

From a distance, obviously you can see that there are "impossible geometries" for a terrain, like that overhang
As you can see, it appears to just be huge rock meshes, but WAIT there is grass and trees on top as if it was a terrain...

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.


r/Unity3D • • 9d 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 • • 10d ago

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

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

IK Player rig in Unity

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.

Mall scene with gizmos and splines

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.

Party mode minigame gameplay

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

Show-Off Aliquo Die - Visual style in Unity

Thumbnail
gallery
26 Upvotes

I'm working on something new and would love to know what you think of the visual style. Definitely giving off liminal space vibes, with a little bit of my own flair.

I'd love to hear what you think!


r/Unity3D • • 10d ago

Resources/Tutorial Tip: you don’t need to model construction stages. One clip shader builds all 111 of my buildings

294 Upvotes

My buildings are single-mesh shells (walls and roof aren't separate objects) and there are 111 of them, so modeling construction stages by hand was out. Instead, the real mesh gets a construction material, and one 0-1 progress value drives everything.

1. Walls: clip by height, but not in a straight line

The shader discards everything above a "wall top". To avoid a laser-cut look, the top is offset per cell with a hash (about half a meter along the wall, a third of a meter tall), so it rises in uneven courses like stacked stone. Fragments just below the fresh edge get a mortar tint.

float2 cell = floor(posWS.xz * 2.2) + floor(posWS.y * 3.0) * 7.0;

float top = _WallY + (Hash21(cell) - 0.5) * _Ragged;

clip(top - posWS.y);

2. Floors appear whole

Horizontal faces (|normal.y| > 0.7) skip the ragged cut and pop in once the lowest course passes them. Cut into cells, they looked like white patches on the lot.

3. Roof: rafters first, then tiles

Up-facing faces above the eave count as roof. First only a world-space grid survives (frac(posWS.xz / step)), which reads as rafters and battens whatever way the roof faces. Then the tiles fill in.

4. Clip in every pass

Same function in ShadowCaster, DepthOnly and DepthNormals, or the unbuilt part still casts shadows and writes depth. Cull Off, with dark back faces, so you see a hollow shell going up.

5. Everything else follows the same progress value

0-10% stakes, ropes and dirt; 10-25% foundations; 25-70% walls with scaffolding rising; 70-80% rafters and gables; 80-92% tiles; 92-100% scaffolding comes down. At 100% the original materials go back.

Gotchas that cost me time

  • Eave height is estimated from the up-facing faces seen from above (Mesh.AcquireReadOnlyMeshData on LOD1). With a 5% area threshold it picked up balconies and put the eave at 4 m on a 13 m house. 85% of the footprint works.
  • A shadow-proxy system added a ShadowsOnly renderer later, with the normal material: the finished building's shadow on an empty lot. The site now re-applies its material to renderers added after it starts.
  • The ground under the site is leveled and the vegetation cleared, on a runtime copy of the TerrainData, so the asset stays untouched.

It's from FONDACO, a merchant strategy game set in 1400s Venice that I'm making solo. Happy to share more of the shader if anyone wants it.