MeshPreview
Use this class to render an interactive preview of a mesh.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
- Implements: IDisposable
public class MeshPreview : IDisposable
Remarks
Use this class from an ObjectPreview or Editor.OnPreviewGUI to render an interactive mesh preview.
Constructors
Constructor | Description |
|---|---|
| MeshPreview(UnityEngine.Mesh) | Creates a new MeshPreview instance with a Mesh target. |
Properties
Methods
Method | Description |
|---|---|
| Dispose | Releases allocated resources associated with this object. |
| OnPreviewGUI | Call this from an Editor.OnPreviewGUI or ObjectPreview.OnPreviewGUI to draw a mesh preview. |
| OnPreviewSettings | Call this from Editor.OnPreviewSettings() or ObjectPreview.OnPreviewSettings to draw additional settings related to the mesh preview. |
| RenderStaticPreview | Creates a texture preview to override Editor.RenderStaticPreview. The current MeshPreview.mesh will be drawn. |
Static Methods
Method | Description |
|---|---|
| GetInfoString | Returns a short summary of the Mesh attributes (ex, does this mesh contain positions, normals, tangents, etc...). |