diff --git a/cocos2d/core/utils/base-node.js b/cocos2d/core/utils/base-node.js index dc89a26618..0f68ae49c1 100644 --- a/cocos2d/core/utils/base-node.js +++ b/cocos2d/core/utils/base-node.js @@ -1107,8 +1107,11 @@ var BaseNode = cc.Class({ var myPrefabInfo = this._prefab; if (myPrefabInfo) { if (newPrefabRoot) { - // change prefab - _Scene.PrefabUtils.linkPrefab(newPrefabRoot._prefab.asset, newPrefabRoot, this); + if (myPrefabInfo.root !== newPrefabRoot) { + // change prefab + _Scene.PrefabUtils.unlinkPrefab(this); + _Scene.PrefabUtils.linkPrefab(newPrefabRoot._prefab.asset, newPrefabRoot, this); + } } else if (myPrefabInfo.root !== this) { // detach from prefab