コード例 #1
0
        private IEnumerator OnIteration(int index)
        {
            RockLog.InsertLine();
            RockLog.WriteLine(this, LogTier.Info, string.Format("Starting iteration number: {0}", CurrentIteration));

            InnerScope.Reset();

            var iteratorVariable = Field <object> .Create(RepeatNumberName, index, false, true);

            // update the iterator job context
            InnerScope.ScopeContext.Add(iteratorVariable);

            // reset the inner scope and loop through the child steps
            yield return(EditorCoroutines.StartCoroutine(InnerScope.StartExecutingSteps(), this));

            if (!IsSuppressed)
            {
                switch (InnerScope.Request)
                {
                case StepRequest.ExitScope:
                case StepRequest.RootScope:
                case StepRequest.TerminateJob:

                    DoLoop = false;

                    break;
                }
            }

            CurrentIteration++;
        }