mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
@@ -776,6 +776,9 @@ var Node = cc.Class({
|
||||
// attach to prefab
|
||||
_Scene.PrefabUtils.linkPrefab(newPrefabRoot._prefab.asset, newPrefabRoot, this);
|
||||
}
|
||||
|
||||
// conflict detection
|
||||
_Scene.DetectConflict.afterAddChild(this);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -564,7 +564,9 @@ var Component = cc.Class({
|
||||
callOnLostFocusInTryCatch(this);
|
||||
}
|
||||
}
|
||||
_Scene.AssetsWatcher.start(this);
|
||||
if ( !CC_TEST ) {
|
||||
_Scene.AssetsWatcher.start(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this._enabled) {
|
||||
@@ -604,7 +606,9 @@ var Component = cc.Class({
|
||||
|
||||
// onDestroy
|
||||
if (CC_EDITOR) {
|
||||
_Scene.AssetsWatcher.stop(this);
|
||||
if ( !CC_TEST ) {
|
||||
_Scene.AssetsWatcher.stop(this);
|
||||
}
|
||||
if (cc.engine._isPlaying || this.constructor._executeInEditMode) {
|
||||
if (this.onDestroy) {
|
||||
callOnDestroyInTryCatch(this);
|
||||
|
||||
@@ -410,7 +410,7 @@ var Widget = cc.Class({
|
||||
}
|
||||
}
|
||||
|
||||
if (CC_EDITOR && !cc.engine._isPlaying) {
|
||||
if (CC_EDITOR && !cc.engine._isPlaying && this.node._parent) {
|
||||
// adjust the offsets to keep the size and position unchanged after alignment chagned
|
||||
var type;
|
||||
if (flag & TOP) {
|
||||
|
||||
@@ -147,10 +147,6 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{
|
||||
oldParent._children.splice(removeAt, 1);
|
||||
oldParent.emit(CHILD_REMOVED, this);
|
||||
this._onHierarchyChanged(oldParent);
|
||||
|
||||
if (CC_EDITOR) {
|
||||
_Scene.DetectConflict.afterAddChild(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (value) {
|
||||
|
||||
Reference in New Issue
Block a user