Skip to main content
s
28d ago

Dynamically Creating and Transforming Elements via C++ API

Hello Rive Community,

I'm currently working on integrating Rive into an Unreal Engine project and I have a few questions about the capabilities of the Rive C++ API. Is there a way to dynamically create new elements (like shapes, paths, or groups) directly on an artboard using the C++ API? If so, could you provide an example or point me to the relevant documentation or API functions? Can I directly manipulate the transforms (position, rotation, scale) of individual elements on the artboard through the C++ API?

I have managed to access the inputs, but changes made to them don’t seem to be applied. Is there a specific method or procedure to ensure these changes take effect? When traversing through the objects in artboards it seems like none of them returns their proper name, first one returns artboards name and the rest of them just an empty string.

What am I missing?

How would one identify, transform and apply changes to an element on an artboard?

1 reply
25d ago

Yes, you can dynamically add elements to the artboard, but unfortunately, we won't be able to provide much assistance. In the future, we plan to provide fleshed-out docs and examples, but for right now, this is what we have: https://github.com/rive-app/rive-runtime/tree/main/tests/player ; it's important to note that this example is heavily tied into our testing environment. 

Good luck!