/// <summary> /// UI Texture doesn't do anything other than creating the widget. /// </summary> void CreateSimpleTexture(GameObject go) { if (ShouldCreate(go, true)) { Selection.activeGameObject = NGUISettings.AddTexture(go).gameObject; } }
static public void AddTexture() { GameObject go = NGUIEditorTools.SelectedRoot(true); if (go != null) { Selection.activeGameObject = NGUISettings.AddTexture(go).gameObject; } //else Debug.Log("You must select a game object first."); }
static public void AddTexture() { GameObject go = NGUIEditorTools.SelectedRoot(true); if (go != null) { #if UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 Undo.RegisterSceneUndo("Add a Texture"); #endif Selection.activeGameObject = NGUISettings.AddTexture(go).gameObject; } else { Debug.Log("You must select a game object first."); } }