private void OnEnable() { _projectSceneCollection = new ProjectSceneCollection(); _previewCollection = new ScenePreviewCollection(_projectSceneCollection); titleContent = new GUIContent("Scene Map"); _projectSceneCollection.UpdateRelativePaths(); SceneView.onSceneGUIDelegate += OnSceneGUI; SceneChange.OnSceneChange += UpdateScenePreviewImage; Undo.undoRedoPerformed += Repaint; ShowScenePreviews = true; wantsMouseMove = true; CalculateMinMaxSceneSizes(); _windowContentsOffset = _scenesMinMaxSize.center; if (!s_window) s_window = this; }
public ScenePreviewCollection(ProjectSceneCollection sceneCollection) { _texturePreviewCache = new Dictionary<string, Texture2D>(); FindPreviewFolder(); }