Humanoid Control for Unity  v3
Passer.Humanoid.AvatarManager Class Reference

Unity Inspector

Manage avatar meshes for a humanoid

The avatar manger can be used to manage multiple avatar meshes for a single humanoid. It is supported single player and networking setups.

Inherits MonoBehaviour.

Public Member Functions

void NextAvatar ()
 Replaces the current avatar by the next avatar in the list. More...
 
void PreviousAvatar ()
 Replaces the current avatar by the previous avatar in the list. More...
 
void SetAvatar (int avatarIndex)
 This will replace the current avatar with the avatar indicated by the avatarIndex. More...
 

Static Public Member Functions

static int mod (int k, int n)
 

Public Attributes

int currentAvatarIndex = 0
 The index of the current avatar in the list More...
 
Animator[] fpAvatars = new Animator[0]
 The list of avatars for the humanoid More...
 
Animator[] tpAvatars = new Animator[0]
 The list of third person avatar for networked humanoids More...
 

Protected Member Functions

virtual void Start ()
 

Member Function Documentation

◆ NextAvatar()

void Passer.Humanoid.AvatarManager.NextAvatar ( )

Replaces the current avatar by the next avatar in the list.

This will wrap around when the last avatar is the current avatar.

◆ PreviousAvatar()

void Passer.Humanoid.AvatarManager.PreviousAvatar ( )

Replaces the current avatar by the previous avatar in the list.

This will wrap around when the first avatar is the current avatar.

◆ SetAvatar()

void Passer.Humanoid.AvatarManager.SetAvatar ( int  avatarIndex)

This will replace the current avatar with the avatar indicated by the avatarIndex.

Parameters
avatarIndexThe index of the avatar in the list of avatars

Member Data Documentation

◆ currentAvatarIndex

int Passer.Humanoid.AvatarManager.currentAvatarIndex = 0

The index of the current avatar in the list

◆ fpAvatars

Animator [] Passer.Humanoid.AvatarManager.fpAvatars = new Animator[0]

The list of avatars for the humanoid

For networked avatars this avatar will be used for the local client.

◆ tpAvatars

Animator [] Passer.Humanoid.AvatarManager.tpAvatars = new Animator[0]

The list of third person avatar for networked humanoids

This is the avatar which will be used to show a player of remote clients. When no third person avatar is specified, the first person avatar will be used as the third person avatar.


The documentation for this class was generated from the following file: