Unity Layout
Layout
Control the layout of your Rive animation in Unity
For more information on Rive Layout see the runtime documentation.
Fit and Alignment
The fit and alignment can be controlled on the Rive.Renderer .Align()
method:
public Fit fit = Fit.contain; public Alignment alignment = Alignment.Center; public RenderTexture renderTexture; private Rive.Renderer m_riveRenderer; ... m_renderQueue = new Rive.RenderQueue(renderTexture); m_riveRenderer = m_renderQueue.Renderer(); ... if (m_artboard != null && renderTexture != null) { m_riveRenderer.Align(fit, alignment, m_artboard); m_riveRenderer.Draw(m_artboard); }