API reference

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

CanvasRenderTexture _canvasRenderTexture[Get]
Mesh construction will be driven by this texture.
MeshFilter _meshFilter[Get]
The mesh filter that will be driven.
MeshCollider _meshCollider[Get]
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

Vector3 ImposterToCanvasTransformPoint
( Vector3 worldPosition )
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 )