Local Player
To register/unregister your local player avatars:
Copy KinetixCore.Animation.RegisterLocalPlayerCustom(Avatar _Avatar,
Transform _RootTransform,
EExportType _ExportType)
Copy KinetixCore.Animation.UnregisterLocalPlayer()
Get callbacks to get informed when an animation is played on local player:
Copy event Action<AnimationIds> KinetixCore.Animation.OnPlayedAnimationLocalPlayer
To retrieve AnimationClip Legacy to and play it in your system for your local player:
Copy KinetixCore.Animation.GetRetargetedAnimationClipLegacyForLocalPlayer(AnimationIds _AnimationIds,
Action<AnimationClip> _OnSuccess,
Action _OnFailure = null)
Remote Peers
To register/unregister remote peer avatars:
Copy KinetixCore.Network.RegisterRemotePeerCustom(string _RemotePeerUUID,
Transform _RootTransform,
EExportType _ExportType)
Copy KinetixCore.Network.UnregisterRemotePeer(string _RemotePeerUUID)
Copy KinetixCore.Network.UnregisterAllRemotePeers()
Get callbacks to get informed when an animation is played on remote peer:
Copy event Action<string, AnimationIds> KinetixCore.Network.OnPlayedAnimationRemotePeer
To retrieve AnimationClip Legacy to and play it in your system for remote peer:
Copy 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.
Copy string PlayerUUID = KinetixCore.Animation.RegisterLocalPlayerCustom(Avatar _Avatar, Transform _RootTransform, EExportType _ExportType)
You then load the animations for the avatar UUID:
Copy KinetixCore.Animation.LoadAvatarAnimation(string _PlayerUUID, string _EmoteID, string _LockId, Action _OnSuccess = null)
And play the animation with:
Copy KinetixCore.Animation.PlayAnimationOnAvatar(string _PlayerUUID, string _EmoteID)
Last updated 11 months ago