private static OnPostprocessAllAssets ( string importedAssets, string deletedAssets, string movedAssets, string movedFromPath ) : void | ||
importedAssets | string | |
deletedAssets | string | |
movedAssets | string | |
movedFromPath | string | |
리턴 | void |
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
{
EditorBuildSettingsScene[] scenes = EditorBuildSettings.scenes;
for (int i = 0; i < movedAssets.Length; i++)
{
string path = movedAssets[i];
if (Path.GetExtension(path) == ".unity")
{
foreach (EditorBuildSettingsScene scene in scenes)
{
if (scene.path.ToLower() == movedFromPath[i].ToLower())
{
scene.path = path;
}
}
}
}
EditorBuildSettings.scenes = scenes;
}
}