Class Avatar

    Definition

    Namespace:
    Tizen.AIAvatar
    Assembly:
    Tizen.AIAvatar.dll

    The Avatar class displays 3D avatars and provides easy access to their animations. This class is a sub-class of the Model class which allows us to easily control the Avatar's animations. Avatar also supports AR Emoji for humanoid-based 3D models.

    public class Avatar : Model, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    View
    Model
    Avatar
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Constructors

    View Source

    Avatar()

    Create an initialized AvatarModel.

    Declaration
    public Avatar()
    View Source

    Avatar(string, string)

    Create an initialized Avatar.

    Declaration
    public Avatar(string avatarUrl, string resourceDirectoryUrl = "")
    Parameters
    Type Name Description
    string avatarUrl

    avatar file url.(e.g. glTF).

    string resourceDirectoryUrl

    The url to derectory containing resources: binary, image etc.

    Remarks

    If resourceDirectoryUrl is empty, the parent directory url of avatarUrl is used for resource url.

    http://tizen.org/privilege/mediastorage for local files in media storage. http://tizen.org/privilege/externalstorage for local files in external storage.

    View Source

    Avatar(Avatar)

    Copy constructor.

    Declaration
    public Avatar(Avatar avatar)
    Parameters
    Type Name Description
    Avatar avatar

    Source object to copy.

    View Source

    Avatar(AvatarInfo)

    Create an initialized AREmojiDefaultAvatar.

    Declaration
    public Avatar(AvatarInfo avatarInfo)
    Parameters
    Type Name Description
    AvatarInfo avatarInfo

    Properties

    View Source

    Properties

    The AvatarProperties property gets or sets the AvatarProperties object containing various information about the Avatar.

    Declaration
    public AvatarProperties Properties { get; set; }
    Property Value
    Type Description
    AvatarProperties

    Methods

    View Source

    PauseEyeBlink()

    Pauses the eye blink animation for the current avatar.

    Declaration
    public void PauseEyeBlink()
    View Source

    PauseMotionAnimation()

    Pauses the currently playing avatar animation.

    Declaration
    public void PauseMotionAnimation()
    View Source

    PlayAnimation(int, int, bool, int)

    Plays the specified avatar animation based on its index within the available animations and an optional duration and loop count.

    Declaration
    public void PlayAnimation(int index, int duration = 3000, bool isLooping = false, int loopCount = 1)
    Parameters
    Type Name Description
    int index

    The zero-based index of the desired avatar animation within the list of available animations.

    int duration

    The duration of the animation in milliseconds (default is 3000).

    bool isLooping

    A boolean indicating whether the animation should be looped or not.

    int loopCount

    The number of times to repeat the animation if it's set to loop.

    View Source

    PlayAnimation(AnimationInfo, int, bool, int)

    Plays the specified avatar animation with an optional duration and loop count.

    Declaration
    public void PlayAnimation(AnimationInfo animationInfo, int duration = 3000, bool isLooping = false, int loopCount = 1)
    Parameters
    Type Name Description
    AnimationInfo animationInfo

    The AnimationInfo object containing information about the desired avatar animation.

    int duration

    The duration of the animation in milliseconds (default is 3000).

    bool isLooping

    A boolean indicating whether the animation should be looped or not.

    int loopCount

    The number of times to repeat the animation if it's set to loop.

    View Source

    PlayAnimation(MotionData, int, bool, int)

    Plays the specified avatar animation with MotionData and an optional duration and loop count.

    Declaration
    public void PlayAnimation(MotionData motionData, int duration = 3000, bool isLooping = false, int loopCount = 1)
    Parameters
    Type Name Description
    MotionData motionData

    The MotionData object containing information about the desired avatar animation.

    int duration

    The duration of the animation in milliseconds (default is 3000).

    bool isLooping

    A boolean indicating whether the animation should be looped or not.

    int loopCount

    The number of times to repeat the animation if it's set to loop.

    View Source

    StartEyeBlink()

    Starts the eye blink animation for the current avatar.

    Declaration
    public void StartEyeBlink()
    View Source

    StopEyeBlink()

    Stops the eye blink animation for the current avatar.

    Declaration
    public void StopEyeBlink()
    View Source

    StopMotionAnimation()

    Stops the currently playing avatar animation.

    Declaration
    public void StopMotionAnimation()

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Extension Methods

    EXamlExtensions.LoadFromEXaml<T>(T, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    EXamlExtensions.LoadFromEXamlPath<TXaml>(TXaml, string)
    EXamlExtensions.LoadFromEXamlPath<T>(T, Type)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX