public virtual void OnValidate()
 {
     if (lastExecutionOrder != executionOrder)
     {
         lastExecutionOrder = executionOrder;
         OrderedTick.setUnsorted();
     }
 }
        public virtual void OnDisable()
        {
            OrderedTick.deleteComponent(this);
//            OrderedTick.deleteComponentFast(this);
            if (coroutineOwner)  //because its coroutines will stop working if GameObject is disabled (though they still work if only script is disabled, but we don't distinguish)
            {
                coroutineStarted = false;
                coroutineOwner   = false;
            }
        }
 public void FixedUpdate()
 {
     //commented because we want physics to update even when there are no physics participants
     //  can refactor if find a bad example
     //if (participateInFixedUpdate) {
     if (!coroutineStarted)
     {
         StartCoroutine(startAfterPhysics());
     }
     OrderedTick.onUnityFixedUpdate();
     //}
 }
        private IEnumerator startAfterPhysics()
        {
            coroutineStarted = true;
            coroutineOwner   = true;
            while (true)
            {
                yield return(new WaitForFixedUpdate());

                //commented because we want physics to update even when there are no physics participants
                //  can refactor if find a bad example
                //if (participateInFixedUpdate) {
                OrderedTick.onUnityLateFixedUpdate();
                //}
            }
        }
 public virtual void OnEnable()
 {
     OrderedTick.addComponent(this);
 }
 public void LateUpdate()
 {
     OrderedTick.onUnityLateUpdate();
 }
 public virtual void Update()
 {
     OrderedTick.onUnityUpdate();
 }