Skip to content

docs(unity): add RenderTextureImageSource docs#733

Open
damzobridge wants to merge 1 commit into
mainfrom
unity/feature/experimental-render-texture-support
Open

docs(unity): add RenderTextureImageSource docs#733
damzobridge wants to merge 1 commit into
mainfrom
unity/feature/experimental-render-texture-support

Conversation

@damzobridge

Copy link
Copy Markdown
Contributor

Adds documentation for binding live Unity RenderTextures to Rive view model image properties using RenderTextureImageSource.

The new Render Textures section lives in the Unity data binding docs under Images, after the existing ImageOutOfBandAsset example.

Also adds a reusable ExperimentalFeature component for Unity APIs gated behind RIVE_USING_EXPERIMENTAL.

@damzobridge damzobridge requested a review from a team as a code owner June 11, 2026 22:14
@mintlify

mintlify Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
rive 🟢 Ready View Preview Jun 11, 2026, 10:18 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@@ -0,0 +1,19 @@
export const ExperimentalFeature = ({ defineSymbol = "RIVE_USING_EXPERIMENTAL", children }) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pic - Does this need defineSymbol and children as props? Maybe you plan to use this in other scenarios?

Otherwise this can be just plain mdx.


| Mode | Behavior |
| --- | --- |
| `PerFrame` | Rebuild and re-push every frame. Default. Use for live sources such as video or camera output. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default what?


| Mode | Behavior |
| --- | --- |
| `Auto` | Apply orientation and color fixes when needed. Default. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default what?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Unity documentation describing how to bind live RenderTexture sources to Rive view model image properties via RenderTextureImageSource, and introduces a reusable MDX warning component to flag Unity APIs gated behind RIVE_USING_EXPERIMENTAL.

Changes:

  • Adds a new reusable ExperimentalFeature MDX snippet that renders an “Experimental Feature” warning and explains how to enable RIVE_USING_EXPERIMENTAL.
  • Expands the Unity Data Binding “Images” documentation with a new Render Textures section, including usage guidance, limitations, and lifecycle recommendations for RenderTextureImageSource.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
snippets/experimental-feature.mdx Introduces a reusable warning component for experimental Unity features guarded by a scripting define.
game-runtimes/unity/data-binding.mdx Adds a new Render Textures documentation section and imports/uses the new ExperimentalFeature snippet.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to 23
import { ExperimentalFeature } from "/snippets/experimental-feature.mdx";
import { YouTube } from "/snippets/youtube.mdx";
import { Demos } from "/snippets/demos.jsx";
Comment on lines +526 to +541
ViewModelInstance viewModelInstance = riveWidget.StateMachine.ViewModelInstance;
if (viewModelInstance == null)
{
Debug.LogWarning("No ViewModelInstance on the widget.");
yield break;
}

ViewModelInstanceImageProperty imageProperty =
viewModelInstance.GetImageProperty(viewModelImagePath);
if (imageProperty == null)
{
Debug.LogWarning($"Image property '{viewModelImagePath}' not found.");
yield break;
}

imageProperty.SetFromRenderTextureImageSource(renderTextureSource);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants