rive-app / rive-unity

MIT License
104 stars 11 forks source link

Can Rive-unity working both for on Canvas UI and mesh in URP #47

Closed HilaryC2024 closed 5 months ago

HilaryC2024 commented 6 months ago

Hi, is there a version of this that allows me to use rive animation on UI(Raw image) in UNIVERSAL RENDER PIPELINE. I have a project that build on URP and would love to know if rive animation can play on canvas/ui element! Thank you very much! I tried the versions mentioned previously in the issues thread but I don't think they work in urp. Unity version: 2023 2.9

damzobridge commented 6 months ago

Here's how I've approached rendering Rive animations in URP using version 0.1.108. I'm using a RawImage there, which I think gives you a bit of flexibility in terms of layout. You'll want to test a few edge cases to make sure it works as you expect, but at the very least, it gives you a starting point for a custom script.

If you want to display it on a mesh, you can check out the minion example here.

HilaryC2024 commented 6 months ago

@damzobridge Hi thank you very much for the reply. I tried it out , I am not sure why it still doesnt appear after clicking play. I followed the guide to create the input Action asset, its not showing like it didnt give me the option to create any asset on the project settign screen after installing input system on package manager.

damzobridge commented 6 months ago

I would recommend opening the minions example and testing that first. Can you confirm that it runs properly when you hit play? If it does, then we can narrow any other issues down.

If you don't see anything rendered in the minions example when you hit play, you might want to double check that that you've done the initial graphics related setup in the Getting Started section of the Rive-unity readme depending on your current platform.

For your input related issues, the new Input System documentation might help once you've verified that your graphics API settings are correct.