/// <summary> Creates new CoRoutine and perform first execution if the CoSegment is the same as current one. </summary> public static ICoHandle RunCoRoutine(IEnumerator <ICoData> newCoRoutine, CoSegment coSegment = CoSegment.Normal, CoTag coTag = default, uint coMask = 0) { CoRoutine coRoutine = new CoRoutine(newCoRoutine, GetNextCoId, coSegment, coTag, coMask); AddNewCoRoutine(coRoutine); if (_CurrentEngineTickSegment == coSegment || (_CurrentExecutedCoRoutine != null && _CurrentExecutedCoRoutine.Value.CoSegment == coSegment)) { coRoutine.MoveCoRoutine(_DeltaTime); coRoutine.InnerCreatedAndMoved = true; } return(coRoutine); }