protected override void OnUpdate()
    {
        var beginSystem = World.GetExistingSystem <ChangeDetectionSystemBegin>();

        if (beginSystem == null)
        {
            UnityEngine.Debug.LogWarning($"{nameof(ChangeDetectionSystemEnd)} cannot detect changes without the existance of {nameof(ChangeDetectionSystemBegin)}");
            return;
        }

        if (!beginSystem.HasUpdatedAtLeastOnce)
        {
            return;
        }

        ChangeDetection.RecordEntityTrace(EntityManager, _endTrace);

        // compare 'begin values' with 'end values'
        ChangeDetection.CompareAndLogChanges(beginSystem.Trace, _endTrace);
    }
Exemple #2
0
 protected override void OnUpdate()
 {
     HasUpdatedAtLeastOnce = true;
     ChangeDetection.RecordEntityTrace(EntityManager, Trace);
 }