rive-unity
rive-unity copied to clipboard
Working on mobile?
Working on mobile?
Metal on iOS is supported, So iphones and ipads. For android Vulkan support is planned, but that is like 85% of phones but even then most of these vulkan phones are mid-tier and some are low spec phones. All of these high performance renderers like Rive renderer or Vello Renderer are next generation tech which is fast on fast devices, no matter how much compatibility they claim using PLS. Total Mobile device coverage is not feasible with high performance tech that will drain all the battery if enabled (full throttle).
Thanks for the quick response, as I understand it, Android 2022+ that is not on a Vulkan will not work?
Vulkan API was released around 2015, but there are low spec phones that support vulkan API but have weak processors. here is the android device distribution: https://developer.android.com/about/dashboards
Rive Renderer using Rive Android checks for devices that support Pixel Local Storage if they don't is switched back to skia renderer.
Point I am trying to make is, consider Rive renderer to increase efficiency and preserve battery for mobile, to do that keep number of animations low enough that if it was skia renderer it will not have frames dropping on older devices.
@HayesGordon Does this mean decreased performance on android, or does it just mean rive not working at all? Right now im trying an embeded unity app inside flutter, using rive, and the animated rive texture gets rendered as a black motionless texture. The rest of the unity proyect works well. Any workarounds? And if not potential timescale when this could be shipped? I have tried building with both OpenGLES3 and vulkan separately
Check vulkan compatibility on your phone with this app: https://play.google.com/store/apps/details?id=de.saschawillems.vulkancapsviewer&hl=en_US
Only Vulkan capable devices will be supported by rive-unity as per their docs.
Thanks for the reply, they told me i have to switch Unity to the GL Core renderer for it to work with android. This should work on OpenGLES 3? I have tested it with both vulkan and opengles 3 together, and each one separately, with all arm v7, and arm64 combinations also and rive will just produce a black texture on android (not on desktop). Here are my player settings on android, and my vulkan settings on the phone im testing right now
The Vulkan renderer for Rive is not available yet. We're anticipating it being available in the next month.
On Android we've only tested OpenGL Core, although ES3 should work too.
We did have someone else report issues with IL2CPP, can you try using the mono backend to see if that makes a change?
I just tried building with mono, but unfortunately the library we are using for embeding unity into flutter, requires IL2CPP, otherwise it will not compile.
When I have the RiveTexture.cs file including the m_riveRenderer.Submit(); then it doesn't work (completely black screen, not just the material on the renderer failing). Leaving it out makes the Rive animation not render. Tested on Android OpenGLES URP IL2CPP.
The supported renderers are now updated to include OpenGL on Android. One would expect it to work then.
I have tried building with Mono and IL2CPP to no avail. I tried putting in a delay for m_riveRenderer.Submit() and sure enough. When this is triggered, the entire screen goes black and no error messages are thrown.
Android OpenGL ES 3.2 device fails to render rive with il2cpp or mono. Please confirm if you have any opengl es working.
Any android test devices that you have tested it on.
Vulkan support is keenly awaited.
Any update on this? @Saurabh7SSR is the Vulcan support ready?
Hi @parth-choudhary , Vulkan support for Rive in Unity is not available yet, but it is something that we're working on!
@pjarnfelt If you add GL.InvalidateState(); after the m_riveRenderer.Submit(); does that help with the black screen issue?
@damzobridge Are there any updates on this? Could you provide an approximate timeline for when Vulkan support might be available? Our platform's game performance is highly reliant on Vulkan, so this is critical for us.
Are there any updates on this? Could you provide an approximate timeline for when Vulkan support might be available? Our platform's game performance is highly reliant on Vulkan, so this is critical for us.
@surendrancj We're still actively working on this! I can't give a specific timeline yet, but we're close to having something we can share hopefully soon.
bump
The Vulkan renderer for Rive is not available yet. We're anticipating it being available in the next month.
Any update @luigi-rosso
hey folks any update on this ? The rive file is working fine in the editor, but when I build an Android app, everything works except the rive file is not loading in the console. It shows the rive file corrupted. I tried every example file as well; they are also not coming in the Android build. Please help.
@jatin-baba Can you confirm that you're using OpenGL as your graphics API on Android in your Unity project settings?
@Saurabh7SSR @surendrancj Vulkan support is available as of v0.3.6 . Let us know if you run into any issues!
Wow let's try this out! Gotta say if this works Rive has gone the distance with data binding and now this. Kudos!