Class ARMeshManager
| AR Foundation | 4.2.10 (original) (raw)
A manager for triangle meshes generated by an AR device. Creates, updates, and removes GameObjects in response to the environment. For each mesh, a meshPrefab is instantiated which must contain at least a MeshFilter. If themeshPrefab's GameObject
also has aMeshCollider, then a physics mesh is generated asynchronously, without blocking the main thread.
Inheritance
ARMeshManager
Inherited Members
Object.FindObjectsByType(FindObjectsSortMode)
Object.FindObjectsByType(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType()
Object.FindAnyObjectByType()
Object.FindFirstObjectByType(FindObjectsInactive)
Object.FindAnyObjectByType(FindObjectsInactive)
Namespace: UnityEngine.XR.ARFoundation
Assembly: solution.dll
Syntax
[DefaultExecutionOrder(-2147483647)]
[DisallowMultipleComponent]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARMeshManager.html")]
public class ARMeshManager : MonoBehaviour
Properties
Name | Description |
---|---|
colors | If true, requests a color value for each vertex in generated meshes. |
concurrentQueueSize | The number of meshes to process concurrently. Meshes are processed on a background thread. Higher numbers will require additional CPU time. |
density | The density of the generated mesh [0..1]. 1 will be densely tessellated, while 0 will have the lowest supported tessellation. |
meshPrefab | A Prefab to be instantiated for each generated mesh. The Prefab must have at least aMeshFilter component on it. If it also has a MeshCollidercomponent, the physics bounding volume data will be generated asynchronously. This does not block the main thread, but might take longer to process. |
meshes | Returns a collection of MeshFilters that represents meshes generated by this component. |
normals | If true, requests a normal for each vertex in generated meshes. |
subsystem | The XRMeshSubsystemused by this component to generate meshes. |
tangents | If true, requests a tangent for each vertex in generated meshes. |
textureCoordinates | If true, requests a texture coordinate for each vertex in generated meshes. |
Methods
Name | Description |
---|---|
DestroyAllMeshes() | Destroys all generated meshes and ignores any pending meshes. |
Events
Name | Description |
---|---|
meshesChanged | Invoked whenever meshes have changed (been added, updated, or removed). |