A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/../ScriptReference/Mesh.MeshData.GetIndexData.html below:

Unity - Scripting API: Mesh.MeshData.GetIndexData

Mesh.MeshData.GetIndexData Suggest a change Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion*

Cancel

Switch to Manual

Declarationpublic NativeArray<T> GetIndexData();

Returns

NativeArray<T> Returns a NativeArray containing the index buffer data.

Description

Gets raw data from the index buffer of the MeshData.

GetIndexData returns a direct "pointer" into the raw index buffer data without any memory allocations, data copies or conversions. You do not need to dispose of the returned NativeArray, because it does not represent a new memory allocation.

You need to know the exact Mesh data layout work with this data, including the presence and formats of all vertex attributes. The data layout matches the one from Mesh.SetIndexBufferData. Typically, Meshes with a 16 bit index format use the ushort data type, and Meshes with a 32 bit index format use the int data type.

If the MeshData is writeable, and you have set the index buffer size and format using Mesh.MeshData.SetIndexBufferParams, you can write indices directly to the array. If the MeshData is read-only, the array is read-only.

Additional resources: Mesh.AllocateWritableMeshData, Mesh.AcquireReadOnlyMeshData, Mesh.MeshData.SetIndexBufferParams.

Additional resources: Mesh.SetIndexBufferParams, Mesh.SetIndexBufferData, GetVertexData, Mesh.AcquireReadOnlyMeshData.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4