Skip to main content

UIChromaticAberration

Post-processing chromatic aberration 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 UIChromaticAberration component.

How to Use

  1. Get the component with myObject.findComponent(UIChromaticAberration.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 */;
UIChromaticAberration comp = myObject.findComponent(UIChromaticAberration.class);
if (comp != null) {
// set the falloff value:
comp.falloff = 1f;
// read the falloff value:
float falloffValue = comp.falloff;

// set the strength value:
comp.strength = 1f;
// read the strength value:
float strengthValue = comp.strength;

}