TryGetSubmeshClassifications(MeshId, Allocator, out uint, out NativeArray<uint>, out NativeArray<uint>)
Gets classification information for vertices or vertex sets for meshes obtained through XRMeshSubsystem.TryGetMeshInfos. This must be enabled through _submeshClassificationEnabled.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.XR
- Assembly: UnityEngine.XRModule
TryGetSubmeshClassifications(MeshId, Allocator, uint, NativeArray<uint>, NativeArray<uint>)
public bool TryGetSubmeshClassifications(MeshId id, Allocator allocator, out uint elementsPerVector, out NativeArray<uint> vertexIndexVectors, out NativeArray<uint> classifications)
Parameters
The number of packed elements in to treat as one classification unit. Platform-specific; for example, some platforms may use for a single vertex per classification; others may use to represent a triangle face per classification.
vertexIndexVectors13The indices referring to Mesh vertices that the classifications apply to, coallated with .
classificationsThe opaque classification enumerations returned by the provider for the defined vertex components above.
Returns
Type | Description |
|---|---|
| bool | True if the retrieval is successful, otherwise False |
Remarks
Use this to retrieve semantic classifications for vertex or vertex group components of the meshes tracked by the subsystem.
This method always returns new NativeArray<T>s, even when there are no results. The caller is responsible for disposing the returned NativeArray<T>, though specifying the appropriate Allocator will manage this for you.
Additional Resources: XRMeshSubsystem.TryGetMeshInfos