1
NGUI 3 Support / Re: NGUI Camera targetTexture to GUI.DrawTexture
« on: November 07, 2012, 05:45:48 PM »
Hi ArenMook,
I have attempted the following:
I have a game object in the Hierarchy named "NGUIObject" - I have attached a component UITexture to it.
I have created a UI Root (2D) and it simply contains 1 single label.
I have attached the following script to "NGUIObject"
When I run it, I can see in the Inspector for "NGUIObject" that the texture is being assigned to the Texture in UITexture - but I am seeing nothing on the screen.
Am I missing a step somewhere?
Thanks again,
J.
I have attempted the following:
I have a game object in the Hierarchy named "NGUIObject" - I have attached a component UITexture to it.
I have created a UI Root (2D) and it simply contains 1 single label.
I have attached the following script to "NGUIObject"
- using UnityEngine;
- using System.Collections;
- public class CameraToTexture : MonoBehaviour {
- public Camera NGUICamera;
- RenderTexture rt;
- UITexture uiTexture;
- void Start () {
- uiTexture = gameObject.GetComponent<UITexture>();
- NGUICamera.targetTexture = rt;
- uiTexture.mainTexture = rt;
- }
- }
When I run it, I can see in the Inspector for "NGUIObject" that the texture is being assigned to the Texture in UITexture - but I am seeing nothing on the screen.
Am I missing a step somewhere?
Thanks again,
J.
