Ejemplo n.º 1
0
        public System.Collections.IEnumerator Iterate(System.Action <T> oniterating, CoroutinePriority priority = DEFAULT_COROUTINE_PRIORITY)
        {
            if (State != AllocationState.ALLOCATED)
            {
                throw new UnityEngine.UnityException("Is not allocated yet");
            }

            if (oniterating == default(System.Action <T>))
            {
                throw new UnityEngine.UnassignedReferenceException("Argument 'oniterating' is null");
            }

            foreach (T obj in allocation)
            {
                oniterating(obj);
                yield return(GetYieldInstruction(priority));
            }
        }