Astra Unity 2.6.6
Astra Unity Plugin
Astra.Asset.CompoundManager Class Reference

Manages all CompoundItems attached to the AvatarItem this manager is associated with More...

Inheritance diagram for Astra.Asset.CompoundManager:

Public Member Functions

ItemDict GetContentList ()
 Gets a copy of the attached compound items on this avatar. More...
 
CompoundItem GetCompoundItem (string guid)
 Retrieve the compound item with the given guid More...
 
List< CompoundItemGetAllCompoundItems ()
 Returns a list of CompoundItems that are attached to the avatar More...
 
Job AddCompoundItem (CompoundItem ci, int parentJobId=Job.kNoParentJobId)
 Attaches a compound item to the avatar. Typically you would load an asset directly onto an avatar, but this is useful to manually attach it if it's already loaded. More...
 
CompoundItem RemoveCompoundItem (string guid, bool delete=true, bool recomputeAI=true)
 Removes an item from the AvatarItem More...
 
void RemoveAllCompoundItems ()
 Removes all compound items on the avatar such as cloth, hair, figures, parts, etc
 
bool HasCompoundItem (string guid)
 Whether the AvatarItem has a CompoundItem with this GUID More...
 

Additional Inherited Members

- Protected Attributes inherited from Astra.Asset.AvatarManagerBase
AvatarItem avatarItem
 

Detailed Description

Manages all CompoundItems attached to the AvatarItem this manager is associated with

Member Function Documentation

◆ AddCompoundItem()

Job Astra.Asset.CompoundManager.AddCompoundItem ( CompoundItem  ci,
int  parentJobId = Job.kNoParentJobId 
)
inline

Attaches a compound item to the avatar. Typically you would load an asset directly onto an avatar, but this is useful to manually attach it if it's already loaded.

Parameters
ciThe compound item to attach
parentJobIdAn optional job id to associate with the parent job
Returns
A job to wait upon

TODO: We need to do everything we need to do before removing the old content otherwise we'll see a few frames with the old content removed before the new content is ready

◆ GetAllCompoundItems()

List< CompoundItem > Astra.Asset.CompoundManager.GetAllCompoundItems ( )
inline

Returns a list of CompoundItems that are attached to the avatar

Returns
List of CompoundItems attached to the AvatarItem

◆ GetCompoundItem()

CompoundItem Astra.Asset.CompoundManager.GetCompoundItem ( string  guid)
inline

Retrieve the compound item with the given guid

Parameters
guidGuid of the compound item to retrieve

◆ GetContentList()

ItemDict Astra.Asset.CompoundManager.GetContentList ( )
inline

Gets a copy of the attached compound items on this avatar.

Returns
A dictionary of items with the key as an instance id and the value is the CompoundItem

◆ HasCompoundItem()

bool Astra.Asset.CompoundManager.HasCompoundItem ( string  guid)
inline

Whether the AvatarItem has a CompoundItem with this GUID

Parameters
guidThe GUID of the CompoundItem to check for
Returns
True if there is a CompoundItem attached with this GUID

◆ RemoveCompoundItem()

CompoundItem Astra.Asset.CompoundManager.RemoveCompoundItem ( string  guid,
bool  delete = true,
bool  recomputeAI = true 
)
inline

Removes an item from the AvatarItem

Parameters
guidThe GUID for the item to remove
deleteWhether the item should be deleted
recomputeAIWhether the alpha texture for the avatar should be recomputed
Returns
The CompoundItem removed, if it was found

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