Skip to main content

UITextView

Draws text with alignment, wrapping, and font settings inside its UIRect.

Create in the Editor​

  1. Ensure there is a UIController in the scene.
  2. Create a GameObject and add UIRect.
  3. Add the UITextView component.

How to Use​

  1. Get the component with myObject.findComponent(UITextView.class).
  2. Read and write the component properties to control behavior.
  3. 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;

}