Skip to main content

UIOutline

Post-processing outline effect exposed by the Java runtime.

Create in the Editor​

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

How to Use​

  1. Get the component with myObject.findComponent(UIOutline.class).
  2. Read or write the component properties to control behavior.
  3. Test input or layout in Play mode.

Java Example​

SpatialObject myObject = /* your object */;
UIOutline comp = myObject.findComponent(UIOutline.class);
if (comp != null) {
// set the outlineColor value:
comp.outlineColor = new Color(255, 255, 255, 255);
// read the outlineColor value:
Color outlineColorValue = comp.outlineColor;

// set the thickness value:
comp.thickness = 1f;
// read the thickness value:
float thicknessValue = comp.thickness;

// set the threshold value:
comp.threshold = 1f;
// read the threshold value:
float thresholdValue = comp.threshold;

}