Exemplo n.º 1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Exemplo n.º 2
0
    public static void ChangeUI(UIElement ui)
    {
        if (editor != null)
        {
            editor.OnDisable();
        }
        Target = ui;
        if (Instance != null)
        {
            Instance.Repaint();
        }
        var tc = typeof(UIEditor).Assembly.GetTypes();
        var t  = ui.GetType();

        for (int i = 0; i < 32; i++)
        {
            editor = FindEditor(tc, t.Name);
            if (editor == null)
            {
                t = t.BaseType;
                if (t.Name == "UIElement")
                {
                    break;
                }
            }
        }
        if (editor == null)
        {
            editor = new UIEditor();
        }
        editor.Target = ui;
        editor.OnEnable();
    }
Exemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            EditorGUIUtility.labelWidth = EditorVariables.MediumLabelWidth;
            serializedObject.Update();
            SelectedTab.intValue = GUILayout.Toolbar(SelectedTab.intValue, ToolbarTabs);
            GUILayout.Space(6);
            EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider);
            GUILayout.Space(6);
            switch (SelectedTab.intValue)
            {
            case 0: DrawGeneralVariables(); break;

            case 1: UIEditor.OnInspectorGUI(); break;

            case 2: ButtonSettingsEditor.OnInspectorGUI(); break;

            case 3: OpenCreateInterface(); break;

            default: return;
            }
            GUILayout.Space(10);

            serializedObject.ApplyModifiedProperties();

            //base.OnInspectorGUI();
        }
Exemplo n.º 4
0
        private void OnEnable()
        {
            SetEditorVariables();
            evaluator.CreateEditorVariables();

            ButtonSettingsEditor.OnEnable(ButtonSettings);
            UIEditor.OnEnable(UI);
        }
Exemplo n.º 5
0
    public static void ExportResources(List <BuildGroup> groups)
    {
        UpdateResVersion();
#if !RECOURCE_CLIENT
        UIEditor.CreateUIAtlas();
        UIEditor.CreateUIIcons();
#endif
        SetAssetBundleNames(false);
        foreach (BuildGroup group in groups)
        {
            Export(BuildHelper.GetBuildTarget(group.Platform));
        }
        AutoBuildGameLogic.AutoBuild();
    }
Exemplo n.º 6
0
    static void CreateWizard()
    {
        UIEditor window = (UIEditor)EditorWindow.GetWindow(typeof(UIEditor));

        window.Show();
    }
    static void OpenUIEditor()
    {
        UIEditor myWindow = EditorWindow.GetWindow <UIEditor>(false, "UI Editor");

        myWindow.minSize = new Vector2(700, 200);
    }