void Update()
 {
     if (!editorSkin)
     {
         editorSkin = IP_Editor_Utils.GetEditorUI();
     }
 }
        public static void InitDesignerDashboard()
        {
            var win = EditorWindow.GetWindow <IP_DesignerDash_Window>();

            win.titleContent = new GUIContent("Designer Dashboard");
            win.Show();

            editorSkin = IP_Editor_Utils.GetEditorUI();
        }
Example #3
0
        void ReplaceSelected()
        {
            if (m_TargetObject && m_SelectedObjects.Length > 0)
            {
                for (int i = 0; i < m_SelectedObjects.Length; i++)
                {
                    GameObject oldGO = m_SelectedObjects[i];
                    GameObject newGO = Instantiate(m_TargetObject, oldGO.transform.position, oldGO.transform.rotation);
                    newGO.transform.localScale = oldGO.transform.localScale;

                    DestroyImmediate(oldGO);
                }
            }
            else
            {
                IP_Editor_Utils.DisplayDialogBox("Please Select Objects to replace or assign a GameObject to the target object!");
            }
        }
Example #4
0
        public static void CreateUIGroup()
        {
            GameObject selectedGO = IP_Editor_Utils.GetSelectedObject();
            GameObject uiGrp      = (GameObject)AssetDatabase.LoadAssetAtPath("Assets/IndiePixel_Framework/UI/Prefabs/UI_GRP.prefab", typeof(GameObject));

            if (uiGrp)
            {
                GameObject curUIGrp = GameObject.Instantiate(uiGrp);
                curUIGrp.name = "UI_GRP";

                if (selectedGO)
                {
                    curUIGrp.transform.SetParent(selectedGO.transform);
                }
            }
            else
            {
                IP_Editor_Utils.DisplayDialogBox("Unable to Find the UI_GRP Prefab!");
            }
        }