AvatarItem is a collection of compound items that represents a character or actor in the application space. It holds reference to a single instance to a figure (adding a new figure will evict) the current figure. Avatars are loading using the Astra.Core.Avatar class. As changes are made to the Avatar, the changes can be saved to the Astra service via the SaveAvatar method.
More...
|
ApiJobNoResult | ApplyAsset (CatalogEntry catalogEntry) |
| Used to apply an asset to an avatar, whether it is a morph, a clothing item, or a figure. More...
|
|
ApiJobNoResult | ApplyAssets (List< CatalogEntry > catalogEntries) |
| Used to apply a set of assets to an avatar More...
|
|
void | RemoveAsset (CatalogEntry catalogEntry) |
| Used to remove an asset such as a ClothItem from an avatar. More...
|
|
void | RemoveAsset (string guid) |
| Used to remove an asset such as a ClothItem from an avatar. More...
|
|
ApiJobNoResult | RemoveAllItems () |
| Removes all compound items except figures (so just hair, cloth, etc), decals, and morphs from the current avatar. More...
|
|
ApiJobNoResult | SaveAvatar () |
| Saves the Avatar by serializing into an recipe and stores both locally and remotely. You can then use the GUID later to load the saved Avatar upon success. More...
|
|
string | GetRecipe () |
| Retrieves a JSON encoded avatar recipe this is the same recipe stored in SaveAvatar but does not save the avatar More...
|
|
void | RemoveAstraComponents () |
| Removes astra components off the avatar and it's child objects. This is useful if you plan to export Astra somewhere where the components will not be used/referenced, ie: you're moving the avatar to another system that doesn't use Astra and need the references removed.
|
|
ItemBase | GetItemFromGuid (string guid) |
| Retrieves the ItemBase for the given asset if the asset is attached to the Avatar. More...
|
|
void | SetEyeModifier (EyeModifierRecord emr) |
| Stores and applies the EyeModifierRecord for this AvatarItem, which can be used to adjust eye parameters, does nothing if there is no EyeItem found More...
|
|
EyeModifierRecord | GetEyeModifier () |
| Retrieves the EyeModifierRecord for this AvatarItem, which can be used to adjust eye parameters. More...
|
|
AvatarLoadJob | LoadFromGuid (string guid) |
| A convenience function that loads the avatar provided by guid into the current avatar NOTE: this functinos the same as using Loader.LoadAvatar More...
|
|
bool | Compatible (CompoundItem compoundItem) |
| Tells you if a CompoundItem is compatible with this AvatarItem More...
|
|
virtual CompoundItem | FindParentCompound () |
| Find the parent CompoundItem which this Item is attached to, if it exists, otherwise null
|
|
virtual AvatarItem | FindAvatarItem () |
| Returns the AvatarItem this item is attached to (if found, note may return null)
|
|
virtual RigItem | FindRigItem () |
| Finds the current RigItem associated on this Avatar Hierarchy More...
|
|
|
Texture2D | Thumbnail |
| Retrieves the texture which is a thumbnail of this Avatar
|
|
|
override McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
|
override McsSdk20.Primitives.SchematicType | SchematicType [get] |
|
BodyManager | BodyManager [get] |
|
AnimationManager | AnimationManager [get] |
|
CompoundManager | CompoundManager [get] |
|
MorphableManager | MorphableManager [get] |
|
DecalManager | DecalManager [get] |
|
MaterialManager | MaterialManager [get] |
|
AlphaMaskManager | AlphaMaskManager [get] |
|
virtual McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
| Retrieve the primitive type for this item
|
|
virtual McsSdk20.Primitives.SchematicType | SchematicType [get] |
| Retrieve the schematic type for this item
|
|
string | AstraGuid [getset] |
| Guid for this item to identify it in the Astra Service
|
|
string | AstraName [getset] |
| Display name for this item
|
|
string | AstraInstanceId [getset] |
| Guid representing an instance of this item
|
|
string | AstraGuid [getset] |
|
string | AstraName [getset] |
|
string | AstraInstanceId [getset] |
|
AvatarItem is a collection of compound items that represents a character or actor in the application space. It holds reference to a single instance to a figure (adding a new figure will evict) the current figure. Avatars are loading using the Astra.Core.Avatar class. As changes are made to the Avatar, the changes can be saved to the Astra service via the SaveAvatar method.
◆ ApplyAsset()
Used to apply an asset to an avatar, whether it is a morph, a clothing item, or a figure.
- Parameters
-
◆ ApplyAssets()
Used to apply a set of assets to an avatar
- Parameters
-
catalogEntries | List of CatalogEntries for assets to apply |
- Returns
◆ Compatible()
bool Astra.Asset.AvatarItem.Compatible |
( |
CompoundItem |
compoundItem | ) |
|
|
inline |
◆ GetEyeModifier()
◆ GetItemFromGuid()
ItemBase Astra.Asset.AvatarItem.GetItemFromGuid |
( |
string |
guid | ) |
|
|
inline |
Retrieves the ItemBase for the given asset if the asset is attached to the Avatar.
- Parameters
-
guid | The Guid of the asset you're looking for |
- Returns
◆ GetRecipe()
string Astra.Asset.AvatarItem.GetRecipe |
( |
| ) |
|
|
inline |
Retrieves a JSON encoded avatar recipe this is the same recipe stored in SaveAvatar but does not save the avatar
- Returns
- A JSON encoded string containing avatar recipe information
◆ LoadFromGuid()
A convenience function that loads the avatar provided by guid into the current avatar NOTE: this functinos the same as using Loader.LoadAvatar
- Parameters
-
guid | The guid you want to load |
- Returns
- A job you can listen to for state/success/data/etc
◆ RemoveAllItems()
Removes all compound items except figures (so just hair, cloth, etc), decals, and morphs from the current avatar.
This will reset any applied items on the avatar as well as simply removing the components.
◆ RemoveAsset() [1/2]
void Astra.Asset.AvatarItem.RemoveAsset |
( |
CatalogEntry |
catalogEntry | ) |
|
|
inline |
Used to remove an asset such as a ClothItem from an avatar.
- Parameters
-
◆ RemoveAsset() [2/2]
void Astra.Asset.AvatarItem.RemoveAsset |
( |
string |
guid | ) |
|
|
inline |
Used to remove an asset such as a ClothItem from an avatar.
- Parameters
-
guid | The asset GUID you're attempting to remove |
◆ SaveAvatar()
Saves the Avatar by serializing into an recipe and stores both locally and remotely. You can then use the GUID later to load the saved Avatar upon success.
- Returns
- A job which you can wait upon for completion for success or failure, if a failure occurs please check the native logs
◆ SetEyeModifier()
The documentation for this class was generated from the following file:
- Assets/Astra/Asset/Avatar/AvatarItem.cs