From b7e441fcef1d8fcab0100d4c2945eabe7cdf0c2f Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Wed, 28 Dec 2016 10:45:19 +0800 Subject: [PATCH] migrate commit 1b841bb31ffecad3da91bcfa77f833ec8880e286 --- cocos2d/core/utils/base-node.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocos2d/core/utils/base-node.js b/cocos2d/core/utils/base-node.js index 7f3ea9b636..c76309a2c1 100644 --- a/cocos2d/core/utils/base-node.js +++ b/cocos2d/core/utils/base-node.js @@ -1148,6 +1148,11 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{ } var thisPrefabInfo = this._prefab; + if (CC_EDITOR && thisPrefabInfo) { + if (this !== thisPrefabInfo.root) { + _Scene.PrefabUtils.initClonedChildOfPrefab(cloned); + } + } var syncing = thisPrefabInfo && this === thisPrefabInfo.root && thisPrefabInfo.sync; if (syncing) { // copy non-serialized property