generated from max/template-unity-project
Update ScenePartitionSOEditor.cs
This commit is contained in:
parent
8b44c33813
commit
d859ad1af5
@ -39,33 +39,28 @@ public override void OnInspectorGUI()
|
|||||||
|
|
||||||
EditorGUIUtils.HorizontalLine();
|
EditorGUIUtils.HorizontalLine();
|
||||||
|
|
||||||
using (new EditorGUILayout.HorizontalScope())
|
if (GUILayout.Button("Load All"))
|
||||||
{
|
{
|
||||||
if (GUILayout.Button("Load All", EditorStyles.miniButtonLeft))
|
scenePartitionSO.LoadAll();
|
||||||
{
|
|
||||||
scenePartitionSO.LoadAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button("Unload", EditorStyles.miniButtonRight))
|
|
||||||
{
|
|
||||||
scenePartitionSO.Unload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using (new EditorGUILayout.HorizontalScope())
|
using (new EditorGUILayout.HorizontalScope())
|
||||||
{
|
{
|
||||||
if (GUILayout.Button("Save", EditorStyles.miniButtonLeft))
|
if (GUILayout.Button(new GUIContent("Unload", "Empty the scene and save it (so it has no changes in source control)."), EditorStyles.miniButtonLeft))
|
||||||
{
|
{
|
||||||
scenePartitionSO.Save();
|
scenePartitionSO.Unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GUILayout.Button(new GUIContent("Reload", "Discard changes and reload"), EditorStyles.miniButtonRight))
|
if (GUILayout.Button(new GUIContent("Reload", "Discard changes and reload loaded partitions."), EditorStyles.miniButtonRight))
|
||||||
{
|
{
|
||||||
scenePartitionSO.Reload();
|
scenePartitionSO.Reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorGUIUtils.HorizontalLine();
|
if (GUILayout.Button("Save"))
|
||||||
|
{
|
||||||
|
scenePartitionSO.Save();
|
||||||
|
}
|
||||||
|
|
||||||
using (new EditorGUILayout.HorizontalScope())
|
using (new EditorGUILayout.HorizontalScope())
|
||||||
{
|
{
|
||||||
@ -88,13 +83,18 @@ public override void OnInspectorGUI()
|
|||||||
|
|
||||||
if (scenePartitionSO.Data.SceneGrid != null)
|
if (scenePartitionSO.Data.SceneGrid != null)
|
||||||
{
|
{
|
||||||
gridId = EditorGUILayout.IntField("gridId", gridId);
|
using (new EditorGUILayout.HorizontalScope())
|
||||||
|
|
||||||
if (GUILayout.Button("LoadSceneGrid"))
|
|
||||||
{
|
{
|
||||||
scenePartitionSO.LoadCell(gridId);
|
gridId = EditorGUILayout.IntField("gridId", gridId);
|
||||||
|
|
||||||
|
if (GUILayout.Button("LoadSceneGrid"))
|
||||||
|
{
|
||||||
|
scenePartitionSO.LoadCell(gridId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditorGUIUtils.HorizontalLine();
|
||||||
|
|
||||||
using (EditorGUIUtils.FoldoutHeaderScope foldoutGroup = new EditorGUIUtils.FoldoutHeaderScope("gridData", ref foldoutGroupEnabled))
|
using (EditorGUIUtils.FoldoutHeaderScope foldoutGroup = new EditorGUIUtils.FoldoutHeaderScope("gridData", ref foldoutGroupEnabled))
|
||||||
{
|
{
|
||||||
if (!foldoutGroupEnabled) return;
|
if (!foldoutGroupEnabled) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user