Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AcquireReadOnlyMeshData

Gets a snapshot of Mesh data for read-only access in the Unity Editor.
Read time 2 minutesLast updated 14 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

AcquireReadOnlyMeshData(Mesh)

Gets a snapshot of Mesh data for read-only access in the Unity Editor.
public static Mesh.MeshDataArray AcquireReadOnlyMeshData(Mesh mesh)

Parameters

mesh

The input mesh.

Returns

Type

Description

MeshDataArrayReturns a read-only snapshot of Mesh data. See Mesh.MeshDataArray and Mesh.MeshData.

Remarks

This method retrieves the same data as Mesh.AcquireReadOnlyMeshData.
Mesh.AcquireReadOnlyMeshData only retrieves data from meshes where Mesh.isReadable is true. In the Editor, all meshes are readable, even when Mesh.isReadable is set to false. This Editor-only method skips the isReadable check, and retrieves data whether Mesh.isReadable is true or false.

AcquireReadOnlyMeshData(Mesh[])

Gets a snapshot of Mesh data for read-only access in the Unity Editor.
public static Mesh.MeshDataArray AcquireReadOnlyMeshData(Mesh[] meshes)

Parameters

meshes

The input meshes.

Returns

Type

Description

MeshDataArrayReturns a read-only snapshot of Mesh data. See Mesh.MeshDataArray and Mesh.MeshData.

Remarks

This method retrieves the same data as Mesh.AcquireReadOnlyMeshData.
Mesh.AcquireReadOnlyMeshData only retrieves data from meshes where Mesh.isReadable is true. In the Editor, all meshes are readable, even when Mesh.isReadable is set to false. This Editor-only method skips the isReadable check, and retrieves data whether Mesh.isReadable is true or false.

AcquireReadOnlyMeshData(List<Mesh>)

Gets a snapshot of Mesh data for read-only access in the Unity Editor.
public static Mesh.MeshDataArray AcquireReadOnlyMeshData(List<Mesh> meshes)

Parameters

The input meshes.

Returns

Type

Description

MeshDataArrayReturns a read-only snapshot of Mesh data. See Mesh.MeshDataArray and Mesh.MeshData.

Remarks

This method retrieves the same data as Mesh.AcquireReadOnlyMeshData.
Mesh.AcquireReadOnlyMeshData only retrieves data from meshes where Mesh.isReadable is true. In the Editor, all meshes are readable, even when Mesh.isReadable is set to false. This Editor-only method skips the isReadable check, and retrieves data whether Mesh.isReadable is true or false.