Astra Unity 2.6.6
Astra Unity Plugin
|
CompoundItem is the base class for all Items that are aggregates of element items (MeshItems, RigItems, MaterialItems). This class tracks and mainipulates it's component element items. It's responsible for LOD Groups, driving morphs, mapping bones to meshes. CompoundItems are the engine specific expression of information contained within PrimitiveSchematics. More...
Public Member Functions | |
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... | |
T | 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) |
virtual bool | ApplyColor (Color color, int subMaterialSlot=0, int materialSlot=0) |
Sets the color tints for materials underneath the compound item Defaults to the first color, if using Astra/Eyes slot 0 is _ColorPrimary and slot 1 is _ColorSecondary If you want to use a custom shader call your slots _Color[0->N] for color tint options More... | |
virtual bool | ClearColor (int subMaterialSlot=0, int materialSlot=-1) |
Clears the color assignment for this material More... | |
virtual ? Color | GetColor (int subMaterialSlot, int materialSlot) |
Gets the first color for a IColorInterface in the compound item for the given slot More... | |
bool | CopyMaterialIntoColorData (int subMaterialSlot=-1, int materialSlot=-1) |
Do not use. Necessary to be defined due to the IColorInterface More... | |
virtual List< List< Color > > | GetColorPaletteOptions (int subMaterialSlot) |
Get the color options for what can go into the given sub material slot More... | |
virtual int | GetColorOptionCount (int subMaterialSlot) |
Get the number of color options for the given sub material slot More... | |
virtual int | GetMaterialCount () |
Retrieves the number of materials assigned to meshes on this CompoundItem 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 | |
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 | |
virtual void | Awake () |
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 | |
bool | _isSceneSerialized = false |
Protected Attributes inherited from Astra.Asset.ItemBase | |
List< string > | _trackingIds = null |
Events | |
initcompleted | InitCompleted |
Additional Inherited Members | |
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] |
CompoundItem is the base class for all Items that are aggregates of element items (MeshItems, RigItems, MaterialItems). This class tracks and mainipulates it's component element items. It's responsible for LOD Groups, driving morphs, mapping bones to meshes. CompoundItems are the engine specific expression of information contained within PrimitiveSchematics.
|
inlinevirtual |
Sets the color tints for materials underneath the compound item Defaults to the first color, if using Astra/Eyes slot 0 is _ColorPrimary and slot 1 is _ColorSecondary If you want to use a custom shader call your slots _Color[0->N] for color tint options
color | The color you want to tint, blends on alpha channel |
subMaterialSlot | Which sub material slot (0->3) |
materialSlot | Which submesh material slot, defaults to 0 |
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.EyeItem, and Astra.Asset.FigureItem.
|
inlinevirtual |
Clears the color assignment for this material
subMaterialSlot | Which sub material slot (0->3) |
materialSlot | Which submesh material slot, defaults to 0< |
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.EyeItem, and Astra.Asset.FigureItem.
|
inline |
Do not use. Necessary to be defined due to the IColorInterface
Implements Astra.Asset.IColorInterface.
|
inlinevirtual |
Get the list of ids for MaterialItems attached to the given MeshItem
_mi |
|
inlinevirtual |
Set the blend value for a blendshape that is part of this CompoundItem
_bsId | ID of the blendshape to drive |
_value | Value to drive the blendshape to |
Reimplemented in Astra.Asset.EyeItem.
|
inlinevirtual |
Drive the Rig Targets
callback | Callback called when operation is complete |
parentJobId | Parent job id, if any |
|
inline |
Finds an item in this CompoundItem with the given guid
T | Type of item to look for |
_gid | Guid of item to look for |
T | : | ItemBase |
|
inlinevirtual |
Finds the Material item instance for the given material
_mat | Material to look for |
|
inlinevirtual |
Gets the first color for a IColorInterface in the compound item for the given slot
subMaterialSlot | Which sub material slot (0->3) |
materialSlot | Which submesh material slot< |
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.FigureItem.
|
inlinevirtual |
Get the number of color options for the given sub material slot
subMaterialSlot | Which sub material slot (0->3) |
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.FigureItem.
|
inlinevirtual |
Get the color options for what can go into the given sub material slot
subMaterialSlot | Which sub material slot (0->3) |
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.FigureItem.
|
inlinevirtual |
Retrieves the number of materials assigned to meshes on this CompoundItem
Implements Astra.Asset.IColorInterface.
Reimplemented in Astra.Asset.FigureItem.
|
inline |
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
Implements Astra.Asset.ISceneSerializable.
|
inline |
Fired after a scene has loaded NOTE: this IS fired in both the Unity Editor and runtime builds
Implements Astra.Asset.ISceneSerializable.
|
inline |
Fired before a scene is saved in the Unity Editor NOTE: this is never fired in runtime builds
Implements Astra.Asset.ISceneSerializable.