Catlike Coding
Unity Code Documentation
Public Member Functions | Public Attributes | List of all members
CatlikeCoding.TextBox.TextMeshCylinderRenderer Class Reference

TextRenderer subclass that wraps around a cylinder. More...

Inherits CatlikeCoding.TextBox.TextMeshRenderer.

Public Member Functions

override void Add (CharMetaData meta, Vector2 offset)
 Add a character. More...
 
override void Prepare ()
 Perform any work that needs to be done before characters will be added, like clearing old data. More...
 
- Public Member Functions inherited from CatlikeCoding.TextBox.TextMeshRenderer
override void Add (CharMetaData meta, Vector2 offset)
 Add a character. More...
 
override void Apply ()
 Perform any work that needs to be done after character have been added. More...
 
override void Prepare ()
 Perform any work that needs to be done before characters will be added, like clearing old data. More...
 
override void SetClipBounds (Bounds2D clipBounds)
 Perform any work to support clipping. More...
 

Public Attributes

float radius
 Radius of the cylinder to wrap around. A positive radius places text on the outside, while a negative radius places it on the inside. More...
 
CylinderRevolveAxis revolveAxis
 Which axis to wrap around. More...
 
- Public Attributes inherited from CatlikeCoding.TextBox.TextMeshRenderer
int chunkSize = 1
 The mesh will grow in multiples of the chunk size. Smaller produces less overshoot but potentially more frequent resizing. More...
 
TextMeshRendererUV2Mode uv2Mode
 UV2 mode. More...
 
- Public Attributes inherited from CatlikeCoding.TextBox.TextRenderer
int renderedCharCount
 How many characters to render. Will be set before Prepare is called. More...
 
TextBox textBox
 Text box that uses the renderer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CatlikeCoding.TextBox.TextMeshRenderer
void OnDestroy ()
 Called by Unity when the component is destroyed. More...
 
- Protected Attributes inherited from CatlikeCoding.TextBox.TextMeshRenderer
Color32[] colors
 Mesh colors. More...
 
int currentVertexIndex
 Increased by 4 after each call to Add. More...
 
int lastRendererCharCount
 Set equal to renderedCharCount after Apply. More...
 
Mesh mesh
 Mesh used to render the characters. More...
 
bool meshResized
 Whether the mesh has been resized during Prepare. More...
 
int[] triangles
 Mesh triangles. More...
 
Vector2[] uv
 Mesh UV. More...
 
Vector2[] uv2
 Mesh UV2. Might not exist. More...
 
Vector3[] vertices
 Mesh vertices. More...
 
- Static Protected Attributes inherited from CatlikeCoding.TextBox.TextMeshRenderer
static Vector3 hidden = Vector3.zero
 Quick vector access for hiding unused sprites. More...
 
- Properties inherited from CatlikeCoding.TextBox.TextMeshRenderer
override Bounds Bounds [get]
 Get the 3D bounds of the rendered content. More...
 
- Properties inherited from CatlikeCoding.TextBox.TextRenderer
virtual Bounds Bounds [get]
 Get the 3D bounds of the rendered content. More...
 

Detailed Description

TextRenderer subclass that wraps around a cylinder.

You can control cylinder settings per text box with by adding a TextMeshCylinderSettings component to the boxes.

Member Function Documentation

override void CatlikeCoding.TextBox.TextMeshCylinderRenderer.Add ( CharMetaData  meta,
Vector2  offset 
)
virtual

Add a character.

Parameters
metaCharacter meta data.
offsetAdditional offset.

Reimplemented from CatlikeCoding.TextBox.TextRenderer.

override void CatlikeCoding.TextBox.TextMeshCylinderRenderer.Prepare ( )
virtual

Perform any work that needs to be done before characters will be added, like clearing old data.

Reimplemented from CatlikeCoding.TextBox.TextRenderer.

Member Data Documentation

float CatlikeCoding.TextBox.TextMeshCylinderRenderer.radius

Radius of the cylinder to wrap around. A positive radius places text on the outside, while a negative radius places it on the inside.

CylinderRevolveAxis CatlikeCoding.TextBox.TextMeshCylinderRenderer.revolveAxis

Which axis to wrap around.