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

        if (go != null)
        {
            Selection.activeGameObject = NGUISettingsEx.AddTexture(go).gameObject;
        }
        else
        {
            Debug.Log("You must select a game object first.");
        }
    }
Ejemplo n.º 2
0
    static void AddPanel()
    {
        UIPanelEx panel = NGUISettingsEx.AddPanel(NGUIMenu.SelectedRoot());

        Selection.activeGameObject = (panel == null) ? NGUIEditorTools.SelectedRoot(true) : panel.gameObject;
    }