API reference
API reference
Select your platform
No SDKs available
No versions available

CanvasMesh Class

Extends MonoBehaviour
Dynamically creates and resizes a mesh to fit a Unity canvas.
There are two types of CanvasMesh components included in the Interaction SDK, <cref="CanvasCylinder" /> and <cref="CanvasRect" />.

Protected Fields

Mesh construction will be driven by this texture.
The mesh filter that will be driven.
Optional mesh collider that will be driven.
bool _started[Get]

Protected Functions

abstract Vector3 MeshInverseTransform
( Vector3 localPosition )
abstract void GenerateMesh
( out List< Vector3 > verts,
out List< int > tris,
out List< Vector2 > uvs )
virtual void Start ( )
virtual void OnEnable ( )
virtual void OnDisable ( )
virtual void HandleUpdateRenderTexture
( Texture texture )
virtual void UpdateImposter ( )

Member Functions

Transform a position in world space relative to the imposter to an associated position relative to the original canvas in world space.
void InjectAllCanvasMesh
( CanvasRenderTexture canvasRenderTexture,
MeshFilter meshFilter )
void InjectCanvasRenderTexture
( CanvasRenderTexture canvasRenderTexture )
void InjectMeshFilter
( MeshFilter meshFilter )
void InjectOptionalMeshCollider
( MeshCollider meshCollider )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon