Skip to content

Format

typescript
Mesh.Update(no_longer_readable)

class: Mesh

Description

Uploads the previously made mesh modifications to the graphics API.

When creating or modifying a mesh from code (using properties like vertices, normals, triangles, etc.), the mesh data is internally marked as "modified" and will be sent to the graphics API on the next render of the mesh. Calling UploadMeshData immediately sends the modified data to the graphics API to avoid potential issues in the future. Passing true to the markNoLongerReadable parameter will make the mesh data no longer readable from scripts and release the system memory copy of the data.

Parameters

param_nametypedescription
no_longer_readablebooleanSet to true to release the system memory copy of the mesh data.

Return

typedescription
void

Code Example

typescript
let mesh = Resources.Load<Mesh>(Mesh, "meshId");
mesh.Update(true);