UITextView
Draws text with alignment, wrapping, and font settings inside its UIRect.
Create in the Editor
- Ensure there is a
UIControllerin the scene. - Create a GameObject and add
UIRect. - Add the
UITextViewcomponent.
How to Use
- Get the component with
myObject.findComponent(UITextView.class). - Read and write the component properties to control behavior.
- Test input or layout in Play mode.
Java Example
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;
}