This commit is contained in:
2025-11-05 11:36:35 +08:00
parent d2bf1ada3b
commit 63f6bfe22e
5 changed files with 136 additions and 19 deletions

View File

@@ -32,6 +32,21 @@ namespace Stary.Evo
return;
}
string assetPath = AssetDatabase.GetAssetPath(sceneAsset);
// 验证路径是否在Assets/Art目录下
if (!assetPath.StartsWith("Assets/Art/"))
{
Debug.LogError($"场景必须位于Assets/Art目录下当前路径: {assetPath}");
EditorUtility.DisplayDialog("提示", "场景必须位于Assets/Art目录下,才可配置!", "确定");
// 可以选择自动清空无效的场景引用
sceneAsset = null;
scenePath = "";
sceneIdentifier = "";
return;
}
scenePath = AssetDatabase.GetAssetPath(sceneAsset);
sceneIdentifier = $"Scenes_{sceneAsset.name}";