Version: 2022.1

MeshConstructor

切换到手册
public 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; } }