浏览代码

Breaking Change : Discover Assets Scene Sections now display many open buttons. / Added Scrolling to the New Scene Window details view

/main
peeweek 5 年前
当前提交
c569f286
共有 3 个文件被更改,包括 18 次插入6 次删除
  1. 4
      Editor/Discover/DiscoverAsset.cs
  2. 16
      Editor/Discover/DiscoverWindow.cs
  3. 4
      Editor/NewSceneWindow/NewSceneWindow.cs

4
Editor/Discover/DiscoverAsset.cs


public string Title;
[Multiline]
public string Description;
public EditorSceneSetup SceneSetup;
public SceneAsset SingleScene;
public EditorSceneSetup[] SceneSetups;
public SceneAsset[] SingleScenes;
}
}

16
Editor/Discover/DiscoverWindow.cs


{
GUILayout.FlexibleSpace();
if (map.SceneSetup != null && GUILayout.Button($"Open {map.SceneSetup.name}"))
if (map.SceneSetups != null)
LoadSceneSetup(map.SceneSetup);
foreach(var sceneSetup in map.SceneSetups)
{
if (sceneSetup != null && GUILayout.Button($"Open {sceneSetup.name}"))
LoadSceneSetup(sceneSetup);
}
else if(map.SingleScene != null && GUILayout.Button($"Open {map.SingleScene.name}"))
if(map.SingleScenes != null)
LoadSingleScene(map.SingleScene);
foreach(var singleScene in map.SingleScenes)
{
if (singleScene != null && GUILayout.Button($"Open {singleScene.name}"))
LoadSingleScene(singleScene);
}
}
}

4
Editor/NewSceneWindow/NewSceneWindow.cs


DrawTemplateList();
}
GUILayout.Space(4);
templateDetailsScroll = EditorGUILayout.BeginScrollView(templateDetailsScroll);
EditorGUILayout.EndScrollView();
GUILayout.Space(4);
}
using (new GUILayout.HorizontalScope())

GUILayout.FlexibleSpace();
GUILayout.EndScrollView();
}
Vector2 templateDetailsScroll;
void DrawTemplateDetails()
{

正在加载...
取消
保存