Reorganize project folders and clean up editor tooling
Move editor scripts to Assets/Scripts/Editor (PlaySceneWindow, SceneCollection), move DefaultNetworkPrefabs and the Main Camera custom blends asset into Assets/Settings, and shelve the unused HeroCutout shader/include under Assets/Unused. Rename the Chameleon background texture, delete the obsolete DefaultParentForEditor script and New Lighting Settings asset, add a The Room SceneCollection asset, and drop the redundant Assets menu entry from the StraightenKnees tool.
This commit is contained in:
1 parent
42c5fcc323
commit
e351336b39
21 files changed
+25
-268
No files matched your search
@@ -0,0 +1,42 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Chameleon.Editor
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Chameleon/Scene Collection (Editor)")]
|
||||
public class SceneCollection : UnityEngine.ScriptableObject
|
||||
{
|
||||
public List<SceneAsset> sceneAssets = new();
|
||||
|
||||
[UnityEditor.Callbacks.OnOpenAsset]
|
||||
public static bool OnOpenAsset(int instanceID, int _)
|
||||
{
|
||||
var @object = EditorUtility.EntityIdToObject(instanceID);
|
||||
if (@object is SceneCollection sceneCollection)
|
||||
sceneCollection.Open();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
if (sceneAssets.Count == 0)
|
||||
return;
|
||||
|
||||
OpenScene(sceneAssets.First(), OpenSceneMode.Single);
|
||||
|
||||
foreach (var sceneAsset in sceneAssets.Skip(1))
|
||||
OpenScene(sceneAsset, OpenSceneMode.Additive);
|
||||
}
|
||||
|
||||
static void OpenScene(SceneAsset sceneAsset, OpenSceneMode mode)
|
||||
{
|
||||
var scenePath = AssetDatabase.GetAssetPath(sceneAsset);
|
||||
EditorSceneManager.OpenScene(scenePath, mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user