|
|
|
|
|
|
private SceneAccessHolderSO _inspected; |
|
|
|
private SerializedObject _serializedObject; |
|
|
|
private Editor _sceneAccessHolderSOEditor; |
|
|
|
public enum Layout { List, Grid} |
|
|
|
public enum Layout { List, Grid } |
|
|
|
private Layout _layout; |
|
|
|
private bool _showOptions = false; |
|
|
|
private bool _editMode = false; |
|
|
|
|
|
|
EditorGUI.PropertyField( |
|
|
|
new Rect(rect.x + rect.width - 25, rect.y, 25, EditorGUIUtility.singleLineHeight), |
|
|
|
element.FindPropertyRelative("visible"), GUIContent.none); |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
[MenuItem("Tools/SceneAccessTool")] |
|
|
|
|
|
|
{ |
|
|
|
if (_inspected != null) |
|
|
|
{ |
|
|
|
if(_showOptions) |
|
|
|
if (_showOptions) |
|
|
|
ShowOptions(); |
|
|
|
ShowSceneList(); |
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
EditorSceneManager.OpenScene(sceneItem.path); |
|
|
|
} |
|
|
|
|
|
|
|
widthCount += gridSize+4; |
|
|
|
|
|
|
|
widthCount += gridSize + 4; |
|
|
|
|
|
|
|
if (widthCount > position.width) |
|
|
|
{ |
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
//add the new scenes
|
|
|
|
foreach(SceneAccessHolderSO.SceneInfo sceneInfo in allScene) |
|
|
|
foreach (SceneAccessHolderSO.SceneInfo sceneInfo in allScene) |
|
|
|
{ |
|
|
|
if (!_inspected.sceneList.Contains(sceneInfo)) |
|
|
|
{ |
|
|
|