UIFitParent
Expands the element to match parent size on X and/or Y.
Create in the Editor
- Ensure there is a
UIControllerin the scene. - Create a GameObject and add
UIRect. - Add the
UIFitParentcomponent.
How to Use
- Get the component with
myObject.findComponent(UIFitParent.class). - Read and write the component properties to control behavior.
- Test input or layout in Play mode.
Java Example
SpatialObject myObject = /* your object */;
UIFitParent comp = myObject.findComponent(UIFitParent.class);
if (comp != null) {
}