mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #1154 from jareguo/master
add temp guard code to detect potential prefab bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user