CollectSourcesInStage
Collects renderers or physics colliders, and terrains within a volume.
Read time 4 minutesLast updated a month ago
Definition
- Type: Method
- Namespace: UnityEditor.AI
- Assembly: UnityEditor.AIModule
CollectSourcesInStage(Bounds, int, NavMeshCollectGeometry, int, bool, List<NavMeshBuildMarkup>, bool, Scene, List<NavMeshBuildSource>)
Collects renderers or physics colliders, and terrains within a volume.
public static void CollectSourcesInStage(Bounds includedWorldBounds, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, bool generateLinksByDefault, List<NavMeshBuildMarkup> markups, bool includeOnlyMarkedObjects, Scene stageProxy, List<NavMeshBuildSource> results)
Parameters
The queried objects must overlap these bounds to be included in the results.
Specifies which layers are included in the query.
Which type of geometry to collect - e.g. physics colliders.
Area type to assign to results, unless modified by NavMeshMarkup.
If true, all the source will be considered for generating links. Otherwise, only the marked sources will be considered.
List of markups which allows finer control over how objects are collected.
Specifies if only objects with markups are collected.
Results are selected only from the stage to which this scene belongs.
List where results are stored, the list is cleared at the beginning of the call.
Remarks
Creates a list of build sources directly from the current geometry in the specified editor stage.
The collection can be controlled in terms of layers, type of geometry and by collecting either by hierarchy or volume. The parameter is used for picking objects from either the main stage or the stage of a prefab opened for editing. At runtime that parameter is ignored since objects can only be part of the main scenes. All main scenes are part of the same main stage while prefab scenes are each assigned to its own separate prefab stage.
stageProxyCollectSourcesInStage(Bounds, int, NavMeshCollectGeometry, int, List<NavMeshBuildMarkup>, Scene, List<NavMeshBuildSource>)
Collects renderers or physics colliders, and terrains within a volume.
public static void CollectSourcesInStage(Bounds includedWorldBounds, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, Scene stageProxy, List<NavMeshBuildSource> results)
Parameters
The queried objects must overlap these bounds to be included in the results.
Specifies which layers are included in the query.
Which type of geometry to collect - e.g. physics colliders.
Area type to assign to results, unless modified by NavMeshMarkup.
List of markups which allows finer control over how objects are collected.
Results are selected only from the stage to which this scene belongs.
List where results are stored, the list is cleared at the beginning of the call.
CollectSourcesInStage(Transform, int, NavMeshCollectGeometry, int, bool, List<NavMeshBuildMarkup>, bool, Scene, List<NavMeshBuildSource>)
Collects renderers or physics colliders, and terrains within a transform hierarchy.
public static void CollectSourcesInStage(Transform root, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, bool generateLinksByDefault, List<NavMeshBuildMarkup> markups, bool includeOnlyMarkedObjects, Scene stageProxy, List<NavMeshBuildSource> results)
Parameters
If not null, consider only root and its children in the query; if null, includes everything loaded.
Specifies which layers are included in the query.
Which type of geometry to collect - e.g. physics colliders.
Area type to assign to results, unless modified by NavMeshMarkup.
If true, all the source will be considered for generating links. Otherwise, only the marked sources will be considered.
List of markups which allows finer control over how objects are collected.
Specifies if only objects with markups are collected.
Results are selected only from the stage to which this scene belongs.
List where results are stored, the list is cleared at the beginning of the call.
CollectSourcesInStage(Transform, int, NavMeshCollectGeometry, int, List<NavMeshBuildMarkup>, Scene, List<NavMeshBuildSource>)
Collects renderers or physics colliders, and terrains within a transform hierarchy.
public static void CollectSourcesInStage(Transform root, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, Scene stageProxy, List<NavMeshBuildSource> results)
Parameters
If not null, consider only root and its children in the query; if null, includes everything loaded.
Specifies which layers are included in the query.
Which type of geometry to collect - e.g. physics colliders.
Area type to assign to results, unless modified by NavMeshMarkup.
List of markups which allows finer control over how objects are collected.
Results are selected only from the stage to which this scene belongs.
List where results are stored, the list is cleared at the beginning of the call.