UIOutline
Post-processing outline effect exposed by the Java runtime.
Create in the Editor
- Ensure there is a
UIControllerin the scene. - Create a GameObject and add
UIRect. - Add the
UIOutlinecomponent.
How to Use
- Get the component with
myObject.findComponent(UIOutline.class). - Read or write the component properties to control behavior.
- 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;
}