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

Represents the materials for the avatar's skin. Depending on how it is set up, colors for these materials can be adjusted. More...

Inheritance diagram for Astra.Asset.FigureItem:

Public Member Functions

BoneItem FindBoneInRigsByGuid (string _gid)
 Get the bone for the given id More...
 
void AddEyes (EyeItem _ei)
 Add the given EyeItem to the figure More...
 
Material GetMaterialAtSubmeshId (string submeshId)
 Retrieve the Unity Material that has the given submesh ID More...
 
delegate void PostSwap (bool success)
 
ApiJobNoResult Swap (string newFigureId, PostSwap callback=null, int parentJobId=Job.kNoParentJobId)
 Do an in place swap of the Figure without the visual artifacts of the previous one dissappearing first More...
 
ApiJobNoResult Swap (FigureItem newFigureItem, PostSwap callback=null, bool destroyFigureItem=true, int parentJobId=Job.kNoParentJobId)
 Do an in place swap of the Figure without the visual artifacts of the previous one dissappearing first More...
 
override bool ApplyColor (Color color, int subMaterialSlot=0, int materialSlot=-1)
 Sets the color tints for the skin

Parameters
colorThe color you want to tint, blends on alpha channel
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot, defaults to 0
More...
 
override bool ClearColor (int subMaterialSlot=0, int materialSlot=-1)
 Clears the color assignment for this material More...
 
override? Color GetColor (int subMaterialSlot, int materialSlot)
 Gets the first color for a IColorInterface in the skin for the given slot More...
 
override int GetColorOptionCount (int materialSlot)
 Get the number of color options for the given sub material slot More...
 
override List< List< Color > > GetColorPaletteOptions (int materialSlot)
 Get the color options for what can go into the given sub material slot More...
 
override int GetMaterialCount ()
 Retrieves the number of materials assigned to meshes on this CompoundItem More...
 
- Public Member Functions inherited from Astra.Asset.CompoundItem
string GetHELRegionGroup ()
 Get the region that this asset is assigned to
 
delegate void initcompleted (string _guid)
 
void Show ()
 
void Hide ()
 
virtual MaterialItem FindMaterialItemByMaterial (Material _mat)
 Finds the Material item instance for the given material More...
 
virtual List< string > DiscoverMaterialAssignments (MeshItem _mi)
 Get the list of ids for MaterialItems attached to the given MeshItem More...
 
FindByGuid< T > (string _gid)
 Finds an item in this CompoundItem with the given guid More...
 
virtual void CleanDictionaries ()
 Clear all item tracking dictionaries
 
delegate void OnPostDriveBlendshape (string instanceId)
 
virtual void DriveBlendshape (string _bsId, float _value)
 Set the blend value for a blendshape that is part of this CompoundItem More...
 
delegate void PostDriveRigTargets (RigManager.MorphedRig morphedRig=null)
 
virtual void DriveRigTargets (PostDriveRigTargets callback=null, int parentJobId=Job.kNoParentJobId)
 Drive the Rig Targets More...
 
delegate void PostGenerateNewMorphedRigs (RigManager.MorphedRig morphedRig)
 
bool CopyMaterialIntoColorData (int subMaterialSlot=-1, int materialSlot=-1)
 Do not use. Necessary to be defined due to the IColorInterface More...
 
void MarkAIMasksDirty ()
 Signals that the alpha injection masks have changed. If this component has an target mesh with _AlphaTex slots it will trigger a recompute of those masks for the next frame
 
void OnBeforeSceneSerialize ()
 Fired before a scene is saved in the Unity Editor NOTE: this is never fired in runtime builds More...
 
void OnAfterSceneDeserialize ()
 Fired after a scene has loaded NOTE: this IS fired in both the Unity Editor and runtime builds More...
 
bool IsSceneSerialized ()
 Tells the system if the object has been serialized or not. This should report True if and only if OnBeforeSceneSerialize was triggered and serialized and it has not yet been deserialized More...
 
- Public Member Functions inherited from Astra.Asset.ItemBase
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...
 

Public Attributes

EyeItem Eyes
 
- Public Attributes inherited from Astra.Asset.CompoundItem
ItemDict Meshes = new ItemDict()
 Dictionary of Meshes that are part of this CompoundItem
 
ItemDict Rigs = new ItemDict()
 Dictionary of Rigs that are part of this CompoundItem
 
ItemDict Materials = new ItemDict()
 Dictionary of Materials that are part of this CompoundItem
 
ItemDict MaterialVariations = new ItemDict()
 Dictionary of Material Variations that are part of this CompoundItem
 
ItemDict Textures = new ItemDict()
 Dictionary of Textures that are part of this CompoundItem
 
SerializableDictionarySS SubmeshToMaterialMap = new SerializableDictionarySS()
 Maps materials to their target submeshes
 
SerializableDictionarySDecal DecalLoadJobResults = new SerializableDictionarySDecal()
 These decals should be driven when attached to something and/or loaded, they are not representative of the DecalItems attached to a mesh, for that see MeshItem which are the targets of DecalItems
 
LODGroup LODController
 
AvatarItem avatar
 
bool CullingLOD
 
float CullingThreshhold
 
SchematicType protoType
 
bool mappable
 
List< string > HELRegions = new List<string>()
 
int HELZBias = 0
 
List< string > Tags = new List<string>()
 

Protected Member Functions

override void Awake ()
 
void Start ()
 
- Protected Member Functions inherited from Astra.Asset.CompoundItem
virtual void OnDestroy ()
 
void GenerateNewMorphedRigs (RigItem[] rigItems, Dictionary< string, float > weights, List< PrimitiveMorphable > primitiveMorphables, List< PrimitiveRig > primitiveRigs, PostGenerateNewMorphedRigs callback=null, int parentJobId=Job.kNoParentJobId)
 
- Protected Member Functions inherited from Astra.Asset.ItemBase
void TrackId (string id)
 
void UntrackIds ()
 

Protected Attributes

int[] _skinMaterialSlots = null
 
- Protected Attributes inherited from Astra.Asset.CompoundItem
bool _isSceneSerialized = false
 
- Protected Attributes inherited from Astra.Asset.ItemBase
List< string > _trackingIds = null
 

Properties

MeshItem BodyMeshItem [get]
 Returns the MeshItem for the body of the figure
 
- Properties inherited from Astra.Asset.ItemBase
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
 
- Properties inherited from Astra.Asset.IAstraBaseInterface
string AstraGuid [getset]
 
string AstraName [getset]
 
string AstraInstanceId [getset]
 

Additional Inherited Members

- Events inherited from Astra.Asset.CompoundItem
initcompleted InitCompleted
 

Detailed Description

Represents the materials for the avatar's skin. Depending on how it is set up, colors for these materials can be adjusted.

Member Function Documentation

◆ AddEyes()

void Astra.Asset.FigureItem.AddEyes ( EyeItem  _ei)
inline

Add the given EyeItem to the figure

Parameters
_eiEyeItem to add

◆ ApplyColor()

override bool Astra.Asset.FigureItem.ApplyColor ( Color  color,
int  subMaterialSlot = 0,
int  materialSlot = -1 
)
inlinevirtual

Sets the color tints for the skin

Parameters
colorThe color you want to tint, blends on alpha channel
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot, defaults to 0

Reimplemented from Astra.Asset.CompoundItem.

◆ Awake()

override void Astra.Asset.FigureItem.Awake ( )
inlineprotectedvirtual

Reimplemented from Astra.Asset.CompoundItem.

◆ ClearColor()

override bool Astra.Asset.FigureItem.ClearColor ( int  subMaterialSlot = 0,
int  materialSlot = -1 
)
inlinevirtual

Clears the color assignment for this material

Parameters
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot, defaults to 0<

Reimplemented from Astra.Asset.CompoundItem.

◆ FindBoneInRigsByGuid()

BoneItem Astra.Asset.FigureItem.FindBoneInRigsByGuid ( string  _gid)
inline

Get the bone for the given id

Parameters
_gidId of the bone to retrieve

◆ GetColor()

override? Color Astra.Asset.FigureItem.GetColor ( int  subMaterialSlot,
int  materialSlot 
)
inlinevirtual

Gets the first color for a IColorInterface in the skin for the given slot

Parameters
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot<

Reimplemented from Astra.Asset.CompoundItem.

◆ GetColorOptionCount()

override int Astra.Asset.FigureItem.GetColorOptionCount ( int  materialSlot)
inlinevirtual

Get the number of color options for the given sub material slot

Parameters
subMaterialSlotWhich sub material slot (0->3)

Reimplemented from Astra.Asset.CompoundItem.

◆ GetColorPaletteOptions()

override List< List< Color > > Astra.Asset.FigureItem.GetColorPaletteOptions ( int  materialSlot)
inlinevirtual

Get the color options for what can go into the given sub material slot

Parameters
subMaterialSlotWhich sub material slot (0->3)

Reimplemented from Astra.Asset.CompoundItem.

◆ GetMaterialAtSubmeshId()

Material Astra.Asset.FigureItem.GetMaterialAtSubmeshId ( string  submeshId)
inline

Retrieve the Unity Material that has the given submesh ID

Parameters
submeshIdID of the material to look for

◆ GetMaterialCount()

override int Astra.Asset.FigureItem.GetMaterialCount ( )
inlinevirtual

Retrieves the number of materials assigned to meshes on this CompoundItem

Reimplemented from Astra.Asset.CompoundItem.

◆ Swap() [1/2]

ApiJobNoResult Astra.Asset.FigureItem.Swap ( FigureItem  newFigureItem,
PostSwap  callback = null,
bool  destroyFigureItem = true,
int  parentJobId = Job.kNoParentJobId 
)
inline

Do an in place swap of the Figure without the visual artifacts of the previous one dissappearing first

Parameters
newFigureItemFigure item to swap into its place
callbackCallback called when the operation is complete. Optional.
destroyFigureItemWhether the previous figure item should be destroyed. Defaults to true.
parentJobIdId of the parent job, if it applies. Optional.

◆ Swap() [2/2]

ApiJobNoResult Astra.Asset.FigureItem.Swap ( string  newFigureId,
PostSwap  callback = null,
int  parentJobId = Job.kNoParentJobId 
)
inline

Do an in place swap of the Figure without the visual artifacts of the previous one dissappearing first

Parameters
newFigureIdAstraGuid for the new figure to apply
callbackCallback called when the operation is complete. Optional.
parentJobIdId of the parent job, if it applies. Optional.

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