Ejemplo n.º 1
0
 public static void OpenWindow(ProceduralUIComponent c)
 {
     thisWindow = UIEditorWindow.GetWindowWithRect <UIEditorWindow>(new Rect()
     {
         position = new Vector2(100, 100), size = new Vector2(1050, 700)
     }, true, "UI component", false);
     thisWindow.editing        = c;
     EditorApplication.update -= Update50;
     EditorApplication.update += Update50;
 }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        ProceduralUIComponent targ = (ProceduralUIComponent)target;

        Undo.RegisterCompleteObjectUndo(targ, "UI component changed");

        GUILayout.Space(10);

        if (GUILayout.Button("Edit", EditorStyles.toolbarButton))
        {
            UIEditorWindow.OpenWindow(targ);
        }

        GUILayout.Space(10);
    }