→ Rive → Rive Panel
Property | Description |
---|---|
Custom Render Target Strategy | The strategy to use for rendering the panel. By default, each panel renders to a single RenderTexture that matches the panel’s dimensions. You can provide a different strategy to render to a pool of textures or share a texture between panels. |
Update Mode | Controls how the panel updates widgets: Auto for automatic updates each frame, or Manual for explicit control through Tick() . |
Disable Editor Preview | Use this to prevent the panel from rendering in Edit mode in the Unity Editor |
Property | Description |
---|---|
Widget Container | The RectTransform that holds the panel’s widgets. |
Widgets | A read-only list of widgets managed by the panel. |
Render Texture | The current render texture where widgets are drawn. |
Scale In RenderTexture | The scale of the panel within its render texture. Returns Vector2.one if no render strategy is set. |
Offset In Render Texture | The offset of the panel within its render texture. Returns Vector2.one if no render target strategy is set. |
Is Rendering | Whether the panel is currently registered with a render target strategy and actively rendering. |
Name | Description |
---|---|
Tick(float deltaTime) | Updates all widgets in the panel. Called automatically in Auto mode. You only need to call this if the Update Mode is set to Manual |
StartRendering() | Begins rendering the panel if it isn’t already rendering to a render texture. |
StopRendering() | Stops rendering the panel if it’s currently rendering to a render texture |
SetDimensions(Vector2 dimensions) | Sets the width and height of the panel. |
RegisterInputProvider(IPanelInputProvider provider) | Registers a custom input provider for handling pointer events. |
UnregisterInputProvider(IPanelInputProvider provider) | Removes a previously registered input provider. |
→ Rive → Widgets → RiveWidget
Field | Description |
---|---|
Asset | The Rive asset (.riv) to load. |
Artboard Name | The name of the artboard to load from the Rive file. |
State Machine Name | The name of the state machine to load from the selected artboard. |
Hit Test Behaviour | How pointer events are handled (Opaque, Translucent, Transparent, None). |
Fit | How the artboard should fit within the widget’s bounds. See the Fit docs for more details about the available options. |
Alignment | How to align the artboard within the widget’s bounds |
Layout Scale Factor | Scale multiplier used when in Layout fit mode. |
Layout Scaling Mode | How the widget scales in Layout mode ( ReferenceArtboardSize , ConstantPhysicalSize and ConstantPixelSize ). |
Fallback DPI | DPI value to use when screen DPI is unavailable |
Reference DPI | Target DPI for scaling calculations |
Name | Description |
---|---|
File | The currently loaded Rive file instance. |
Artboard | The currently loaded artboard instance. |
State Machine | The currently loaded state machine instance. |
Status | Current status of the widget (Uninitialized, Loading, Loaded, Error) |
BindingMode | Determines how the widget should handle binding to a ViewModel instance: Auto Bind Default, Auto Bind Selected, or Manual. |
ViewModelInstanceName | The name of the ViewModel instance to bind to when BindingMode is set to Auto Bind Selected. |
Name | Description |
---|---|
OnRiveEventReported | Triggered when a Rive event is reported from the Rive graphic. |
OnWidgetStatusChanged | Triggered when the widget’s status changes (e.g., from Loading to Loaded, or Error). |
Name | Description |
---|---|
Load(File file) | Loads a Rive file using the default artboard and state machine. |
Load(File file, string artboardName, string stateMachineName) | Loads a Rive file with specified artboard and state machine. |
Load(Asset asset) | Loads from a Rive asset using the default artboard and state machine. The Rive Widget manages the lifecycle of the loaded file and cleans up the file when the widget is destroyed or when a new asset is passed in. |
Load(Asset asset, string artboardName, string stateMachineName) | Loads from a Rive asset with specified artboard and state machine. The Rive Widget manages the lifecycle of the loaded file and cleans up the file when the widget is destroyed or when a new asset is passed in. |
File
instance, you’re responsible for disposing of the File instance when you no longer need it. This is not the case when loading from an Asset
as the Rive Widget manages the lifecycle of the underlying file (loading and disposing).→ Rive → Widgets → Procedural Rive Widget
Property | Description |
---|---|
Procedural Drawing | ProceduralDrawing instance that defines what to draw. |
Hit Test Behavior | How pointer events are handled (Opaque, Translucent, Transparent, None). |
Name | Description |
---|---|
Status | Current status of the widget (Uninitialized, Loading, Loaded, Error). |
Name | Description |
---|---|
OnWidgetStatusChanged | Triggered when the widget’s status changes (e.g., from Loading to Loaded, or Error). |
Name | Description |
---|---|
Load(ProceduralDrawing proceduralDrawing) | Loads a new procedural drawing into the widget. |
Rive > Rive Panel (Canvas)
Property | Description |
---|---|
Pointer Input Mode | Controls whether the renderer accepts pointer input (Enable/Disable). |
Name | Description |
---|---|
Rive Panel | The panel being rendered. |
Field | Description |
---|---|
Renderer | The Unity Renderer component (e.g., MeshRenderer,) that will display the Rive content. |
Material Texture Assignment Mode | Controls which texture properties are set to the Rive Panel’s render texture: MainTexture sets the _MainTex property on the material. The TextureProperties option lets you select multiple specific texture properties. |
Visibility Optimization | Determines if the RivePanel should stop rendering when the mesh is not visible to the camera. |
Pointer Input Mode | Controls whether the renderer accepts pointer input (Enable/Disable). |
Name | Description |
---|---|
Rive Panel | The panel being rendered to materials. |
Name | Description |
---|---|
SetPanel(IRivePanel panel) | Assigns a new panel to render. |
RefreshMaterials() | Updates material references after material changes. |
Simple Render Target Strategy
is the default rendering approach for Rive Panels, creating a dedicated render texture for each panel. It is automatically added to a Rive Panel if no custom strategy is provided.
This one-to-one mapping between panels and textures provides straightforward memory management.
Field | Description |
---|---|
Panel | The RivePanel this strategy manages (automatically set when on same GameObject). |
Draw Timing | When rendering occurs: Batched (once per frame) or Immediate (instant updates). |
Name | Description |
---|---|
DrawTiming | Current draw timing mode. |
→ Rive → Render Target Strategies → Atlas Render Target Strategy
Custom Render Target Strategy
field on desired panelsField | Description |
---|---|
Starting Size | Initial dimensions of the atlas texture (e.g., 1024x1024). |
Max Atlas Size | Maximum dimensions the atlas can grow to (e.g., 2048x2048). |
Max Resolution Per Panel | Maximum resolution for any single panel. Larger panels are scaled down (e.g., an 800x400 panel with max value of 512 becomes 512x256). |
Padding | Space between panels in the atlas to prevent texture bleeding. |
Draw Timing | When rendering occurs: Batched (once per frame) or Immediate (instant updates). |
Custom Atlas Packing Provider | Optional custom packing algorithm (defaults to shelf packing if not specified). |
Name | Description |
---|---|
Packing Strategy | Current strategy used for arranging panels in the atlas. |
Draw Timing | Current draw timing mode. |
Name | Description |
---|---|
Configure(Vector2Int startingSize, Vector2Int maxSize, int maxResPerPanel, int padding) | Sets up atlas parameters before initialization. |
Field | Description |
---|---|
Pooled Texture Size | Size of textures in the pool (all pooled textures share these dimensions). If a given Rive Panel doesn’t match the texture’s aspect ratio, the panel will be resized to fit within the texture while maintaining its aspect ratio. |
Initial Pool Size | The initial allocated size of the pool. |
Max Pool Size | Maximum number of textures the pool can contain. |
Pool Overflow Behavior | How to handle requests when pool is full: Flexible (create temporary textures) or Fixed (reject new panels). |
Draw Timing | When rendering occurs: Batched (once per frame) or Immediate (instant updates). |
Name | Description |
---|---|
Pool Overflow | Current overflow behavior setting. |
Pooled Texture Size | Current texture dimensions used by the pool. |
Initial Pool Size | Current initial pool capacity. |
Max Pool Size | Current maximum pool size. |
Draw Timing | Current draw timing mode. |
Name | Description |
---|---|
Configure(Vector2Int textureSize, int initialSize, int maxSize, PoolOverflowBehavior behavior) | Sets up pool parameters (must be called before the first Rive Panel is registered). |