![]() |
BomberUnits
...a Unity learning project
|
The main target of the below is to not have to set individual materials per sprite and to allow for Holo UI to be rendered in front of any other geometry.
For this there are two options, both differentiate objects based on the Layer they set to be on:
The decision for now is to use the camera stack for the UI overlay, because it is simpler for now to extend. For this, the additional camera ist set up to follow the zoom level of its main camera. You only need to add UI objects to the UI layer to have them rendered before anything else. Be sure though to use the mainCamera prefab in your scenes, as this contains the additional cam and settings.
The Renderer Features are used to as shown in this video here: [https://www.youtube.com/watch?v=szsWx9IQVDI] To add more stuff to be rendered when occluded, add them to the layers defined as 'Mask' in the renderer feature. Please not that an overwrite material is currently set there. Duplicate it and change the settings for to change occlusion appearance. Currently the same material is used for both effects explained here.