public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);

            var _initializeToolMan = ToolMan.Initialize();

            if (_initializeToolMan)
            {
                Debug.Log("[ProceduralObjects] Successfully created the ProceduralTool");
            }

            if (mode == LoadMode.NewGame || mode == LoadMode.LoadGame)
            {
                if (gameLogicObject == null)
                {
                    if (Icons == null)
                    {
                        Icons = new Texture2D[] { TextureUtils.LoadTextureFromAssembly("duplicate"),
                                                  TextureUtils.LoadTextureFromAssembly("maximize"),
                                                  TextureUtils.LoadTextureFromAssembly("minimize"),
                                                  TextureUtils.LoadTextureFromAssembly("invisible"),
                                                  TextureUtils.LoadTextureFromAssembly("visible"),
                                                  TextureUtils.LoadTextureFromAssembly("rotate_right"),
                                                  TextureUtils.LoadTextureFromAssembly("move_up"),
                                                  TextureUtils.LoadTextureFromAssembly("move_down"),
                                                  TextureUtils.LoadTextureFromAssembly("locked"),
                                                  TextureUtils.LoadTextureFromAssembly("unlocked") };
                    }
                    gameLogicObject = new GameObject("Logic_ProceduralObjects");
                    gameLogicObject.AddComponent <ProceduralObjectsLogic>();
                    gameLogicObject.AddComponent <UpdateInformant>();
                }
            }
            else if (mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
            {
                if (editorHelperObject == null)
                {
                    editorHelperObject = new GameObject("EditorHelper_ProceduralObjects");
                    editorHelperObject.AddComponent <ProceduralEditorHelper>();
                }
            }
        }
        public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);

            var _initializeToolMan = ToolMan.Initialize();

            if (_initializeToolMan)
            {
                Debug.Log("[ProceduralObjects] Successfully created the ProceduralTool");
            }

            if (mode == LoadMode.NewGame || mode == LoadMode.LoadGame || mode == LoadMode.NewMap || mode == LoadMode.LoadMap)
            {
                if (gameLogicObject == null)
                {
                    if (!Directory.Exists(PODirectoryPath))
                    {
                        Directory.CreateDirectory(PODirectoryPath);
                    }

                    if (Icons == null)
                    {
                        Icons = new Texture2D[] { TextureUtils.LoadTextureFromAssembly("duplicate"),
                                                  TextureUtils.LoadTextureFromAssembly("maximize"),
                                                  TextureUtils.LoadTextureFromAssembly("minimize"),
                                                  TextureUtils.LoadTextureFromAssembly("invisible"),
                                                  TextureUtils.LoadTextureFromAssembly("visible"),
                                                  TextureUtils.LoadTextureFromAssembly("rotate_right"),
                                                  TextureUtils.LoadTextureFromAssembly("move_up"),
                                                  TextureUtils.LoadTextureFromAssembly("move_down"),
                                                  TextureUtils.LoadTextureFromAssembly("locked"),
                                                  TextureUtils.LoadTextureFromAssembly("unlocked"),
                                                  TextureUtils.LoadTextureFromAssembly("painterPicker"),
                                                  TextureUtils.LoadTextureFromAssembly("painterSlider"),
                                                  TextureUtils.LoadTextureFromAssembly("picker"),
                                                  TextureUtils.LoadTextureFromAssembly("distance"),
                                                  TextureUtils.LoadTextureFromAssembly("angle"),
                                                  TextureUtils.LoadTextureFromAssembly("copy") };
                        SelectionModeIcons = new Texture2D[] { TextureUtils.LoadTextureFromAssembly("main_layers"),
                                                               TextureUtils.LoadTextureFromAssembly("main_exported"),
                                                               TextureUtils.LoadTextureFromAssembly("main_textures"),
                                                               TextureUtils.LoadTextureFromAssembly("main_fonts"),
                                                               TextureUtils.LoadTextureFromAssembly("main_modules"),
                                                               TextureUtils.LoadTextureFromAssembly("main_render"),
                                                               TextureUtils.LoadTextureFromAssembly("main_stats"),
                                                               TextureUtils.LoadTextureFromAssembly("main_measures") };
                    }
                    gameLogicObject = new GameObject("Logic_ProceduralObjects");
                    ProceduralObjectsLogic.instance = gameLogicObject.AddComponent <ProceduralObjectsLogic>();
                    gameLogicObject.AddComponent <PopupStart>();
                }
            }
            else if (mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
            {
                if (editorHelperObject == null)
                {
                    editorHelperObject = new GameObject("EditorHelper_ProceduralObjects");
                    editorHelperObject.AddComponent <ProceduralEditorHelper>();
                }
            }
        }