mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
chore: protect against prefab instances leaking into play mode
This commit is contained in:
parent
99386fc756
commit
36b13b8192
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user