Ejemplo n.º 1
0
    static public void AddWidget()
    {
        GameObject go = NGUIEditorTools.SelectedRoot(true);

        if (go != null)
        {
            Selection.activeGameObject = NGUISettings.AddWidget(go).gameObject;
        }
        //else Debug.Log("You must select a game object first.");
    }
Ejemplo n.º 2
0
    static public void AddWidget()
    {
        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 Widget");
#endif
            Selection.activeGameObject = NGUISettings.AddWidget(go).gameObject;
        }
        else
        {
            Debug.Log("You must select a game object first.");
        }
    }