Plain and simple question. I work with C# I’m not asking for code, point me in the right direction and I’ll teach myself. Please and Thank You!
Make each floor a seperate gameobject. Then, find out if the player entered the building, with a trigger collider for example. Then, access the Renderers of all higher floors and and set the color of their materials to have an alpha value of 0 (useful with Math.Lerp or Color.Lerp to get a smooth fading effect), or just disable the renderer components altogether.
Hi If your still looking for a solution check our Asset as this is custom made shader for this use case. It can handle multi user multi buildings ( obstructions ) and is available for Standard URP and HDRP .
https://forum.unity.com/threads/rel...isible-within-buildings-std-urp-hdrp.1182130/
https://assetstore.unity.com/packages/vfx/shaders/see-through-shader-193955
Greetings Toorican