Editar

Partilhar via


EditorSceneUtils.EnforceSceneComponents Method

Definition

Goes through a scene's objects and checks for components that aren't found in permittedComponentTypes If any are found, they're added to the violations list.

public:
 static bool EnforceSceneComponents(UnityEngine::SceneManagement::Scene scene, System::Collections::Generic::IEnumerable<Type ^> ^ permittedComponentTypes, System::Collections::Generic::List<UnityEngine::Component ^> ^ violations);
public static bool EnforceSceneComponents (UnityEngine.SceneManagement.Scene scene, System.Collections.Generic.IEnumerable<Type> permittedComponentTypes, System.Collections.Generic.List<UnityEngine.Component> violations);
static member EnforceSceneComponents : UnityEngine.SceneManagement.Scene * seq<Type> * System.Collections.Generic.List<UnityEngine.Component> -> bool
Public Shared Function EnforceSceneComponents (scene As Scene, permittedComponentTypes As IEnumerable(Of Type), violations As List(Of Component)) As Boolean

Parameters

scene
UnityEngine.SceneManagement.Scene
permittedComponentTypes
IEnumerable<Type>
violations
List<UnityEngine.Component>

Returns

Applies to