UIContrastBrightnessSaturation
Post-processing color adjustment component exposed by the Java runtime.
Create in the Editor
- Ensure there is a
UIControllerin the scene. - Create a GameObject and add
UIRect. - Add the
UIContrastBrightnessSaturationcomponent.
How to Use
- Get the component with
myObject.findComponent(UIContrastBrightnessSaturation.class). - Read or write the component properties to control behavior.
- Test input or layout in Play mode.
Java Example
SpatialObject myObject = /* your object */;
UIContrastBrightnessSaturation comp = myObject.findComponent(UIContrastBrightnessSaturation.class);
if (comp != null) {
// set the brightness value:
comp.brightness = 1f;
// read the brightness value:
float brightnessValue = comp.brightness;
// set the contrast value:
comp.contrast = 1f;
// read the contrast value:
float contrastValue = comp.contrast;
// set the saturation value:
comp.saturation = 1f;
// read the saturation value:
float saturationValue = comp.saturation;
}