In a previous post we talked about huge desks in unity basic hovering below true game objects pretending to render them on a map. This time we've invested in Unity Pro and are ready to deal with Render Textures.
______________________________________________________________
Major Upsides:
- No more candelabra floating above your map in the editor.
- All districts about the same shape can share a single desk object set
You can either make a new universal desk or take one of the old ones and use it as a base like I did.
- Make sure to set it well out of your play-map range to keep it out of the way.
- The size of this desk doesn't matter. It and all it's objects could be huge or tiny because it's relation to the game map is no longer important.
Now all that's left is creating the individual maps that you can turn on and off as you access the Desk Camera. Each desk can even activate it's own accessories on the Unified desk.
Like So
______________________________________________________________
To Create the Map Textures
- Assets -> Create -> Render Texture
- Create a camera and set it above what you want a map of. Orthographic view is great for this
- Set your new Render Texture to the Camera's Target Texture in the Inspector
- Set the Render Texture as the texture for the object you want to hold the map (I used a flat cube)
For for large or irregularly shaped districts, there's a second, larger desk. This also lurks out of sight, visible only through activated cameras.
Viola! Now you have an interchangeable map-desks using Render Textures!
______________________________________________________________
All blog posts by UnityGirl are inspired by my work with Brunelleschi: Age of Architects on the Aesop Games team. Check out our Crowd Funding page(s)!