Пример #1
0
    /// <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;
        }
    }
Пример #2
0
    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.");
    }
Пример #3
0
    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.");
        }
    }