Quantcast
Viewing latest article 10
Browse Latest Browse All 25

Answer by Duckocide

This will I think need a scripted solution if you only want 1 camera. If you create a component to act as a render texture cache. I.e. Has a property to contain the render textures, you can then create them on the fly using. https://docs.unity3d.com/ScriptReference/RenderTexture.Create.html You can then assign these created "cache" render texture to the Building render camera when you want want it. You might have to wait a frame or two for the texture to appear of course (depending upon camera and overlays). Once you have it, you can then reference this render texture in your UI (i.e. Assign it to the relevant UI image component). You'll need to think about managing these textures (I'm guessing you only want 1 per building, not per in game instance of a building) so you might want to think about that and perhaps have singular component in the scene to act as the building image render target cache (with an array of script created Render Textures).

Viewing latest article 10
Browse Latest Browse All 25

Trending Articles