111
This commit is contained in:
@@ -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}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user