🎨Custom Animation System
Learn how to seamlessly integrate the Kinetix SDK with your own Animation System for Unity.
Local Player
To register/unregister your local player avatars:
KinetixCore.Animation.RegisterLocalPlayerCustom(Avatar _Avatar,
Transform _RootTransform,
EExportType _ExportType)
KinetixCore.Animation.UnregisterLocalPlayer()
Get callbacks to get informed when an animation is played on local player:
event Action<AnimationIds> KinetixCore.Animation.OnPlayedAnimationLocalPlayer
To retrieve AnimationClip Legacy to and play it in your system for your local player:
KinetixCore.Animation.GetRetargetedAnimationClipLegacyForLocalPlayer(AnimationIds _AnimationIds,
Action<AnimationClip> _OnSuccess,
Action _OnFailure = null)
Remote Peers
To register/unregister remote peer avatars:
KinetixCore.Network.RegisterRemotePeerCustom(string _RemotePeerUUID,
Transform _RootTransform,
EExportType _ExportType)
KinetixCore.Network.UnregisterRemotePeer(string _RemotePeerUUID)
KinetixCore.Network.UnregisterAllRemotePeers()
Get callbacks to get informed when an animation is played on remote peer:
event Action<string, AnimationIds> KinetixCore.Network.OnPlayedAnimationRemotePeer
To retrieve AnimationClip Legacy to and play it in your system for remote peer:
KinetixCore.Network.GetRetargetedAnimationClipLegacyForRemotePeer(string _RemotePeerUUID,
string _EmoteID,
Action<AnimationClip> _OnSuccess,
Action _OnFailure = null)
NPC or other local avatars
In addition to the local player or remote players, you can also register other avatars (to animate your NPCs or shop avatars for example).
The registering of the avatar returns a string representing the unique Id (UUID) to pass as parameter to the subsequent functions.
string PlayerUUID = KinetixCore.Animation.RegisterLocalPlayerCustom(Avatar _Avatar, Transform _RootTransform, EExportType _ExportType)
You then load the animations for the avatar UUID:
KinetixCore.Animation.LoadAvatarAnimation(string _PlayerUUID, string _EmoteID, string _LockId, Action _OnSuccess = null)
And play the animation with:
KinetixCore.Animation.PlayAnimationOnAvatar(string _PlayerUUID, string _EmoteID)
Last updated
Was this helpful?