Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mukarillo on May 29, 2014, 09:04:08 AM
-
Hello guys, i'm doing this "gps" thing, and in every waypoint, there's a GUITexture being rendered on it's top.
Now i'm crating the interface for the project, and the GUITexture is on top of NGUI texture objects, is the anyway i can deal with that?
I'm using NGUI camera to render NGUI stuff and another camera to render the maps.
Thanks you guys very much,
Murillo.
-
The only way you can deal with it, is to have NGUI be drawn by a secondary camera, since GUITextures are always drawn on top by the camera with the GUILayer on it.
You could also move the waypoint to be done by NGUI as sprites or even UITextures, then it would layer as you would expect.
-
well, im doing that ( the camera part), but it still render on top of NGUI.
I don't want to use NGUI to render those icons, because the UNITYGUI rotates them for me and do all the dirty stuff.
Does anyone else knows something?
-
Make sure the camera depths are set correctly (with the NGUI camera having a higher depth than the on with the GUILayer on it) and make sure that the clear flags are set peroperly as well, so the NGUI camera doesn't hide the GUITexture completely.
Also make sure that the NGUI UICamera doesn't have a GUILayer component on it, as that would make it draw the GUITexture and GUIText above the NGUI elements.
-
Well... i don't know if this is what u mean (see in the attached photos). But it doesn't work :/
-
well... since it GUI.DrawTexture is not related to any camera or renderer, i couldn't find a way to do it.
I had to create some quads and place them by hand and rotate them in the Update according to the camera's rotation.
Thank you very much Nicki
-
Oh! You're using the OnGUI system, I thought you were using GUITextures ( http://docs.unity3d.com/Manual/class-GuiTexture.html ). That's my bad for not following. Generally, don't use OnGUI for anything other than editor script is my best advice.
Glad to see you were able to solve your problem.