Control the layout of your Rive animation in Unity
Layout
Fit mode lets you display resizable artboards with built-in responsive behavior, configured directly in the graphic. Set a Fit of type Layout at runtime and the artboard will resize automatically. Optionally, provide a Layout Scale Factor to further adjust the scale of the content.
Layout
, the Rive Widget:• Measures the available space from its RectTransform.• Calculates a new artboard size based on both the Layout Scaling Mode
and a Layout Scale Factor
.• Dynamically resizes the artboard to match the calculated dimensions.Layout Scaling Mode
you select, you can further scale the artboard via the Layout Scale Factor
. A value of 1.0 means no additional scaling; values greater than 1.0 enlarge the artboard, and values below 1.0 shrink it.In practice, you might use this factor to give yourself flexibility in adjusting the artboard size, even after choosing a particular scaling mode. For example, you might find that everything is slightly too large on mobile and set the Layout Scale Factor to 0.9 (90% of the scaled size).