UITextView
Desenha texto com alinhamento, quebra de linha e fonte dentro do UIRect.
Criar no Editor
- Garanta que existe um
UIControllerna cena. - Crie um GameObject e adicione
UIRect. - Adicione o componente
UITextView.
Como Usar
- Pegue o componente com
myObject.findComponent(UITextView.class). - Leia e altere as propriedades do componente para controlar o comportamento.
- Teste o input ou layout no modo Play.
Exemplo em Java
SpatialObject myObject = /* your object */;
UITextView comp = myObject.findComponent(UITextView.class);
if (comp != null) {
// set the color value:
comp.color = new Color(255, 255, 255, 255);
// read the color value:
Color colorValue = comp.color;
// set the font value:
comp.font = new Font();
// read the font value:
Font fontValue = comp.font;
// set the text value:
comp.text = "value";
// read the text value:
String textValue = comp.text;
// set the textSize value:
comp.textSize = 1f;
// read the textSize value:
float textSizeValue = comp.textSize;
}