Optimizes the mesh for display.
function Start () { var mesh : Mesh = GetComponent(MeshFilter).mesh; mesh.Optimize(); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Start() { Mesh mesh = GetComponent<MeshFilter>().mesh; mesh.Optimize(); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Start() as void: mesh as Mesh = GetComponent[of MeshFilter]().mesh mesh.Optimize()