I have been doing some digging concerning this, and despite there being a few tutorials none of them are confirmed to work infact most have people saying “this does not work”. And trying them myself they did not work.
Essentially i want to embed my mini map camera viewport in the gui. I do not have unity pro and it is unlikely i can get it in the near future (for render to texture).
Is there ANY way with non-pro version of unity to make my second camera’s viewport display INFRONT of the gui box acting as it’s background?
Using UnityGUI always draws on top of all other cameras, so you can’t have a camera draw on top of this GUI.
On the other hand, if you use GUITexture and GUIText objects, you can disable a camera’s GUILayer component to prevent it from rendering those. If you disable it in a specific camera, and make sure that camera renders last (setting the camera’s depth to highest), then it will draw the camera on top of the GUI elements.
Hope this helps, otherwise you might want to wait till Unity release their promised new GUI framework in one of the 4.X versions.
Oh, and another simpler way would be to not display the relevant GUI components whenever the minimap is active (simple bool in your OnGUI() method, but you have to know in advance which GUI elements are located in the same screen area of the minimap)
This has been confirmed to definitely NOT work. I believe I understand the area now, and so the topic can simply be closed if a mod is around. Thanks.
well my solution was more a way around rather than a solution itself, simply making the graphic that is on the gui level be transparent in the middle so that the camera viewport can be seen behind it.
This has been confirmed to definitely NOT work. I believe I understand the area now, and so the topic can simply be closed if a mod is around. Thanks.
– Pieskindeed, i can't actually remember the process as it was a while back but i most likely did do it incorrectly.
– Piesk