Exemple #1
0
    static public void AddButton()
    {
        GameObject go = NGUIEditorTools.SelectedRoot(true);

        if (go != null)
        {
            Selection.activeGameObject = NGUISettings.AddButton(go).gameObject;
        }
        else
        {
            Debug.Log("You must select a game object first.");
        }
    }