ðŸŽĒUnity's Animator System

SDK Integration if you are using the official animator system from Unity.

Our SDK offers functions in order to handle smoothly Unity's Animation system.

Local player:

To register/unregister your local player animator :

KinetixCore.Animation.RegisterLocalPlayerAnimator(Animator _Animator)
KinetixCore.Animation.UnregisterLocalPlayer()

To stop animation on local player :

KinetixCore.Animation.StopAnimationOnLocalPlayer()

Learn more about our Animation functions in KinetixCore.Animation

Remote Peers:

To register/unregister remote peer animators :

KinetixCore.Network.RegisterRemotePeerAnimator(string _RemotePeerUUID, 
                                               Animator _Animator)
KinetixCore.Network.UnregisterRemotePeer(string _RemotePeerUUID)
KinetixCore.Network.UnregisterAllRemotePeers()

Learn more about our Network functions in KinetixCore.Network

Using your custom uploaded avatar for Contact-Aware Retargeting

First, check Avatar Upload to get the UUID of one of your uploaded avatar.

Then, when registering your local player, you can pass the UUID of one of your uploaded avatar, this will allow the SDK to automatically use your custom retargeted emotes.

KinetixCore.Animation.RegisterLocalPlayerAnimator(Animator _Animator, string _AvatarID)

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.RegisterAvatarAnimator(Animator _Animator)

You then load the animations with 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)

Loading the full emote and getting the duration :

To get the Duration of an emote, you must first get a KinetixClip object. You can easily get it via the code sample

KinetixCore.Animation.LoadLocalPlayerAnimation("MyEmoteId", "myLockIdForExampleMyGameName", 
        _OnSuccess: (_Clip) => {
            Debug.Log("Clip started loading and can begin streaming: " + _Clip.Duration);
        },
        _OnComplete: (_Clip) => {
            Debug.Log("The emote was fully downloaded and is loaded: " + _Clip.Duration);
        },
        _OnFailure: () => {
            Debug.LogError("Unable to load emote.");
        });

Please note:

  • You can have the duration in the OnSuccess callback

  • The OnComplete callback ensures the full clip is available

Last updated