You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Rive layers are set up as described above.
On Android, when I look at the stateName with console.log in onStateChanged, I see BlendState comes in fine,
but on iOS, BlendState is coming in as UnknownState. Is this a known issue?
All my Rive files that contain state are coming in with BlendState as UnknownState
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up! Looks like a bug in the underlying rive-ios runtime. This would probably be a breaking change there; until the underlying iOS runtime is updated to change this to BlendState, I might recommend two options in the meantime, with preference for the second:
Keep a temporary check for UnkownState for now like in your screenshot and handle it like you would if it came in as BlendState.
Are you familiar with Rive Events? It's a new feature introduced in the past few months whereby you can report a homemade "Rive Event" (created in the Rive File) with whatever metadata you need (string, numerical, boolean data). The Event can be reported in different ways, such as on a state transition, as a key in a timeline animation, or at the start/end of a state animation playing. I think the first way on state transition might make the most sense here, where the Rive Event reports on the transition to the blend state. More on that here: https://help.rive.app/editor/events and https://help.rive.app/runtimes/rive-events. This may be a cleaner solution for you than checking state names in onStateChange.
@zplata
Thank you for recommending the approach using Rive Events.
For now, I have implemented the first method as a temporary solution, but I plan to consider the second method when updating the Rive-related code in my app next time.
Thank you :)
react : 18.2.0
react-native : 0.72.4
rive-react-native : 6.1.1
My Rive layers are set up as described above.
On Android, when I look at the stateName with console.log in onStateChanged, I see BlendState comes in fine,
but on iOS, BlendState is coming in as UnknownState. Is this a known issue?
All my Rive files that contain state are coming in with BlendState as UnknownState
The text was updated successfully, but these errors were encountered: