File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public abstract class MonoBehaviour : EngineObject
23
23
{
24
24
private static readonly Dictionary < Type , bool > CachedExecuteAlways = new ( ) ;
25
25
26
- [ SerializeField , HideInInspector ]
26
+ [ SerializeField , HideInInspector , CloneField ( CloneFieldFlags . IdentityRelevant ) ]
27
27
private Guid _identifier = Guid . NewGuid ( ) ;
28
28
29
29
[ SerializeField , HideInInspector ]
@@ -607,17 +607,12 @@ public void CopyTo(MonoBehaviour target)
607
607
608
608
public override void SetupCloneTargets ( object targetObj , ICloneTargetSetup setup )
609
609
{
610
- if ( this == targetObj )
611
- System . Diagnostics . Debugger . Break ( ) ;
612
610
MonoBehaviour target = targetObj as MonoBehaviour ;
613
611
this . OnSetupCloneTargets ( targetObj , setup ) ;
614
612
}
615
613
616
614
public override void CopyDataTo ( object targetObj , ICloneOperation operation )
617
615
{
618
- if ( this == targetObj )
619
- System . Diagnostics . Debugger . Break ( ) ;
620
-
621
616
MonoBehaviour target = targetObj as MonoBehaviour ;
622
617
if ( ! operation . Context . PreserveIdentity )
623
618
target . _identifier = _identifier ;
You can’t perform that action at this time.
0 commit comments