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

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

Inheritance diagram for Astra.Asset.MorphableManager:

Public Member Functions

ApiJobNoResult ResyncAllMorphables (int parentJobId=Job.kNoParentJobId)
 
MorphableItem GetMorphableItem (string guid)
 Retrieve the MorphableItem with the given guid More...
 
List< MorphableItemGetAllMorphableItems (bool refresh=false, bool includeChildren=false)
 Returns a list of morphable items that are attached to the avatar More...
 
bool HasRigTarget ()
 Returns true if one of the morphable items attached to the avatar has a rig target More...
 
ApiJobNoResult SetMorph (string morphGUID, float amount, bool delay=false, string maskGUID=null, bool allowProjection=true, int parentJobId=Job.kNoParentJobId)
 A super easy way to drive a morph, this will auto cascade for you More...
 
delegate void PreMorphableProjection (MorphableItem morphableItem)
 
ApiJobNoResult RemoveMorph (string morphGUID)
 Removes a morph from the avatar and all children. This returns a job that can be waited on. More...
 
ApiJobNoResult RemoveMorph (MorphableItem morphableItem)
 
ApiJobNoResult RemoveAllMorphs ()
 Remove all Morphable items. This returns a job that can be waited on.
 

Public Attributes

string DefaultMaskGUID = null
 The default GUID of the mask to be used if a MorphItem does not supply it's own mask. This mask is used as part of the item projection process.
 
System.Guid cachedMorphableGUID
 A new GUID to be used if one of the MorphItems has a Rigtarget. This GUID will be unique to each avater and will be used to to create an rigTargetGUID for each meshItem More...
 

Events

PreMorphableProjection OnPreMorphableProjection
 Fired right before we trip Projection when calling SetMorph
 

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

◆ GetAllMorphableItems()

List< MorphableItem > Astra.Asset.MorphableManager.GetAllMorphableItems ( bool  refresh = false,
bool  includeChildren = false 
)
inline

Returns a list of morphable items that are attached to the avatar

Parameters
refreshNot currently implemented
includeChildrenWhether all children of this AvatarItem should be searched
Returns
List of MorphableItems attached to the AvatarItem

◆ GetMorphableItem()

MorphableItem Astra.Asset.MorphableManager.GetMorphableItem ( string  guid)
inline

Retrieve the MorphableItem with the given guid

Parameters
guidGuid of the item to retrieve

◆ HasRigTarget()

bool Astra.Asset.MorphableManager.HasRigTarget ( )
inline

Returns true if one of the morphable items attached to the avatar has a rig target

Returns

◆ RemoveMorph()

ApiJobNoResult Astra.Asset.MorphableManager.RemoveMorph ( string  morphGUID)
inline

Removes a morph from the avatar and all children. This returns a job that can be waited on.

Parameters
morphGUIDThe id you want to remove
Returns

◆ SetMorph()

ApiJobNoResult Astra.Asset.MorphableManager.SetMorph ( string  morphGUID,
float  amount,
bool  delay = false,
string  maskGUID = null,
bool  allowProjection = true,
int  parentJobId = Job.kNoParentJobId 
)
inline

A super easy way to drive a morph, this will auto cascade for you

Parameters
morphGUIDThe id of the morph you want to drive
amountHow much you want to morph by, 0=none, 1=100%. Note, you can overdrive morphs with negative values or values above 1
delayIf true, instead of immediately driving the morph they will be queued up and done en mass, NOTE: currently not implemented
maskGUIDIf set, this mask will be used to assist projection in not using specific verts for influence (eg: an ears mask)
allowProjectionIf set, projection will be applied to the specified morph. Set to false if this should be delayed
Returns
A job that contains the morph items and meshes driven along with the various callbacks normally in a Job

Member Data Documentation

◆ cachedMorphableGUID

System.Guid Astra.Asset.MorphableManager.cachedMorphableGUID

A new GUID to be used if one of the MorphItems has a Rigtarget. This GUID will be unique to each avater and will be used to to create an rigTargetGUID for each meshItem

summary>Removes all blendshapes from SkinnedMeshRenderer components


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