Class ARMeshManager
A manager for triangle meshes generated by an AR device.
Creates, updates, and removes GameObject
s in
response to the environment. For each mesh, a meshPrefab is instantiated which must contain at
least a MeshFilter
. If the
meshPrefab's GameObject
also has a
MeshCollider
, then a physics mesh is generated
asynchronously, without blocking the main thread.
Inherited Members
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 |
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 a
|
meshes | Returns a collection of |
normals | If |
subsystem | The |
tangents | If |
textureCoordinates | If |
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). |