Example #1
0
        /*
         * Function called to create and show this window.
         */
        public static void ShowSettings()
        {
            // Spawn this window alongside the default Inspector and focus it
            Type inspectorType = Type.GetType("UnityEditor.InspectorWindow,UnityEditor.dll");

            Instance = GetWindow <ArcweaveWindow>("Arcweave", true, new Type[] { inspectorType });
        }
        /*
         * Populate with items on Awake.
         */
        private void Awake()
        {
            Instance = this;
            project  = AssetDatabase.LoadAssetAtPath <Project>("Assets/Resources/Arcweave/Project.asset");

            if (project != null)
            {
                // Load stuff from the object
                folderPath = project.folderPath;
                PrecomputeBoardNames();

                Board main = project.boards[project.startingBoardIdx];
                PrecomputeElementNames(main);
            }
        }
Example #3
0
        /*
         * Populate with items on enable
         */
        private void OnEnable()
        {
            if (sprite == null)
            {
                sprite = AssetDatabase.LoadAssetAtPath <Sprite>("Assets/Arcweave/Sample/Graphics/arcweave_logo.png");
            }

            Instance = this;
            project  = AssetDatabase.LoadAssetAtPath <Project>("Assets/Resources/Arcweave/Project.asset");

            if (project != null)
            {
                // Force relink of project
                project.Relink();

                // Load stuff from the object
                folderPath = project.folderPath;
                PrecomputeBoardNames();

                Board main = project.boards[project.startingBoardIdx];
                PrecomputeElementNames(main);
            }
        }
Example #4
0
 static void OpenWindow()
 {
     // Show
     ArcweaveWindow.ShowSettings();
 }