Exemplo n.º 1
0
 public static void OpenWindow(EasyFlow easyflow)
 {
     window = (PresetTool)EditorWindow.GetWindow(typeof(PresetTool), false, "EF:PresetTool", true);
     window.autoRepaintOnSceneChange = true;
     window.minSize = new Vector2(440.0f, 145.0f);
     PresetTool.SetEasyflow(easyflow);
 }
Exemplo n.º 2
0
        private void Reset()
        {
            if (Selection.activeGameObject == null ||
                (Selection.activeGameObject != null && Selection.activeGameObject.GetComponent <EasyFlow>() == null))
            {
                PresetTool.SetEasyflow(null);
            }

            ResetPresetList();
            Repaint();
        }
Exemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Open - PresetTool"))
            {
                PresetTool.OpenWindow(target as EasyFlow);
            }

            if (GUILayout.Button("Open - OptionTool"))
            {
                OptionTool.OpenWindow(target as EasyFlow);
            }

            //DrawDefaultInspector();
        }
Exemplo n.º 4
0
        private void OnEnable()
        {
            switch (SettingData.GetInstance().linkMode)
            {
            case LINK_MODE.Link:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    OptionTool.SetEasyflow(easyflow);
                    PresetTool.SetEasyflow(easyflow);
                }
                else
                {
                    OptionTool.SetEasyflow(null);
                    PresetTool.SetEasyflow(null);
                }
                break;

            case LINK_MODE.OpenPresetTool:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    if (easyflow != null)
                    {
                        PresetTool.OpenWindow(easyflow);
                    }
                }
                break;

            case LINK_MODE.OpenOptionTool:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    if (easyflow != null)
                    {
                        OptionTool.OpenWindow(easyflow);
                    }
                }
                break;
            }
        }