Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Mesh.Mesh

Switch to Manual
public Mesh();

Description

Creates an empty mesh.

// Create a new mesh and assign it to the mesh filter
using UnityEngine;

public class ExampleClass : MonoBehaviour { void Start() { Mesh mesh = new Mesh(); GetComponent<MeshFilter>().mesh = mesh; } }