Click or drag to resize

DefaultAvatarRenderer Class

An implementation of the SDK's abstract AvatarRenderer class that defines the default avatar that ships with the Immerse SDK. This implementation uses the same model for all avatars, but it differentiates them with colors selected from a list using an index based on the avatar's Visual Id.
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDK.AvatarsAvatarRenderer
            ImmerseSDKDefaultAvatarRenderer

Namespace:  ImmerseSDK
Assembly:  ImmerseSDK.NoDll (in ImmerseSDK.NoDll.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public class DefaultAvatarRenderer : AvatarRenderer

The DefaultAvatarRenderer type exposes the following members.

Constructors
  NameDescription
Private methodStatic memberDefaultAvatarRenderer
Public methodDefaultAvatarRenderer
Initializes a new instance of the DefaultAvatarRenderer class
Top
Methods
  NameDescription
Public methodGetColorForVisualId
Returns a 32bit color value that you have associated with this avatar. The value returned here will be used by the Immerse SDK for things such as highlighting interactive objects and coloring the user's camera button in WebGL.
(Overrides AvatarRendererGetColorForVisualId(Byte).)
Public methodInit
Initialises this avatar renderer, before the SDK can access it. Called by the Immerse SDK when this avatar renderer is attached to it's parent avatar transform in the scene. Use this method to setup the internal state of this avatar renderer based on the state of the application. For example: enable different head or hands, depending on whether the avatar is a local or remote representation.
(Overrides AvatarRendererInit(Avatar).)
Public methodSetVisualId
Sets the visual identity of this avatar. Called by the Immerse SDK when a unique index has been assigned to this avatar's user. Use this to select a unique appearence for each avatar in the scene, other avatars are guaranteed to have a different visualId value.
(Overrides AvatarRendererSetVisualId(Byte).)
Top
Fields
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also