Пример #1
0
        private static LevelEditorResourcesWindow GetWindow()
        {
            LevelEditorResourcesWindow window = GetWindow <LevelEditorResourcesWindow>();

            window.Focus();
            window.Repaint();
            window.minSize = new Vector2(600, 400);
            return(window);
        }
        public override void OnInspectorGUI()
        {
            EditorGUILayout.HelpBox("You can also just double click the asset in the project window to open the editor.", MessageType.Info);

            EditorGUILayout.Space();

            if (GUILayout.Button("Open Editor"))
            {
                LevelEditorResourcesWindow.OpenAsset((LevelEditorResourceList)target);
            }
        }
Пример #3
0
        public static void OpenAsset(LevelEditorResourceList asset)
        {
            LevelEditorResourcesWindow window = GetWindow();

            window.SetAsset(asset);
        }