Merge pull request #1154 from jareguo/master

add temp guard code to detect potential prefab bug
This commit is contained in:
Jare Guo
2016-09-26 17:37:26 +08:00
committed by GitHub
+6 -2
View File
@@ -55,10 +55,14 @@ var Prefab = cc.Class({
},
_instantiate: function () {
//if (this.data._prefab) {
if (this.data._prefab) {
// prefab asset is always synced
this.data._prefab._synced = true;
//}
}
else {
// temp guard code
cc.warn('internal error: _prefab is undefined');
}
// instantiate
var node = cc.instantiate(this.data);