diff --git a/Packages/nadena.dev.modular-avatar/Editor/MergeArmatureHook.cs b/Packages/nadena.dev.modular-avatar/Editor/MergeArmatureHook.cs index 1e627692..a6dad482 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/MergeArmatureHook.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/MergeArmatureHook.cs @@ -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) {