/// <summary> /// Executes an action on each component of the given type in the scene, with a context. /// </summary> static public void ForEachComponent <T>(this Scene inScene, bool inbIncludeInteractive, object inContext, SceneComponentContextAction <T> inAction) { List <T> allComponents = new List <T>(); GetAllComponents <T>(inScene, inbIncludeInteractive, allComponents); for (int i = 0, count = allComponents.Count; i < count; ++i) { inAction(inScene, allComponents[i], inContext); } }
/// <summary> /// Executes an action on each active component of the given type in the scene, with a context. /// </summary> static public void ForEachComponent <T>(this Scene inScene, object inContext, SceneComponentContextAction <T> inAction) { ForEachComponent <T>(inScene, false, inContext, inAction); }