chore: protect against prefab instances leaking into play mode

This commit is contained in:
bd_ 2023-09-05 20:16:41 +09:00
parent 99386fc756
commit 36b13b8192

View File

@ -410,6 +410,14 @@ namespace nadena.dev.modular_avatar.core.editor
}
}
var isPrefabInstance = PrefabUtility.IsPartOfPrefabInstance(src.transform);
var isPrefabAsset = PrefabUtility.IsPartOfPrefabAsset(src.transform);
if (isPrefabAsset || isPrefabInstance)
{
throw new Exception("Cannot merge prefab instances or prefab assets");
}
src.transform.SetParent(mergedSrcBone.transform, true);
if (config.mangleNames)
{