Method CreateText
|
Improve this Doc
View Source
CreateText(string, Transform, Vector2, Vector2, Vector2, Font, int, Color, bool, Color, float, float, bool)
Create a GameObject with a Text (and optional Outline and ContentSizeFitter) component
Declaration
public GameObject CreateText(string text, Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 position, Font font, int fontSize, Color color, bool outline, Color outlineColor, float width, float height, bool addContentSizeFitter)
Parameters
Type |
Name |
Description |
string |
text |
Text to show |
Transform |
parent |
Parent transform |
Vector2 |
anchorMin |
Anchor min |
Vector2 |
anchorMax |
Anchor max |
Vector2 |
position |
Anchored position |
Font |
font |
Font |
int |
fontSize |
Font size |
Color |
color |
Font color |
bool |
outline |
Add outline component |
Color |
outlineColor |
Outline color |
float |
width |
Width |
float |
height |
Height |
bool |
addContentSizeFitter |
Add ContentSizeFitter |
Returns
Type |
Description |
GameObject |
A text GameObject |