Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: S3dition on October 09, 2013, 01:50:13 AM
-
I've been searching for quite some time on information about applying the UI to a surface instead of binding it to a camera. Does anyone know where there is info about this? Is there a specific name I should be calling it when I do my searches? I need the ability to at least make it appear as if the GUI is on an object.
Thanks.
-
Apply UI to a surface? If you have your UI camera render into a texture, you can then draw this texture somewhere in your world by texturing an object.
-
I tried to apply the render to texture over a plane and everything worked fine but the button's collider appears to be relative to the main camera instead. I can click and or mouse over it in a position that is different from the button's real location in screen.
-
You won't be able to interact with a rendered texture. The UI created in this manner is for viewing only, not for interaction.
If you want it to be interactable, then you can make a 3D UI and place it anywhere you like in the world. Or just create a game object, put UIPanel, on it, then add child widgets underneath. Position it like you would any other object.
-
UI Panel over the plane was my first attempt and it worked fine.
I also got it to work using my own Raycast and RaycastHit.textureCoord (http://docs.unity3d.com/Documentation/ScriptReference/RaycastHit-textureCoord.html).
I just want to avoid use Raycast other than NGUI's nor change UICamera's original code.
I think we may have a feature request here , huh?