DecalItems are attached to MeshItems and apply a blended material on top of an existing material. They can either completely replace the textures or be smoothly blended into the textures based on the PrimitiveDecal.MaterialTarget[x].MaterialBlendingFunction
More...
|
void | MarkDirty () |
| Used to manually trigger that a decal needs to be rebuilt. Use of this is only necessary if you directly manipulate the internal material of the decal. This will signal that the next frame should update DecalItem.Sync the decal.
|
|
void | SetReferencedItems (bool referenced) |
| Used to override the internal check for ReferenceItems and DereferenceItems This is ONLY useful if you're procedurally creating these assets yourself This will set the internal cache flag for reference counting w/o changing references More...
|
|
void | ReferenceItems (bool force=false) |
| Increments any references such as textures or materials This is used internally when creating and cloning items More...
|
|
void | DereferenceItems () |
| Inverses ReferenceItems, does nothing if not referenced
|
|
void | Sync (bool refresh=false, int parentJobId=Job.kNoParentJobId) |
| Immediately schedule a reapply of the decal to the mesh, if needed.
It will only be reapplied if the decal is marked dirty, or if refresh is true. This will trigger the MeshItem.SyncDecals call for you. More...
|
|
void | RemoveConflictingDecals () |
| Looks for other decals on this applied MeshItem and removes them. This is useful if you only want a single decal applie to a MeshItem at one time. This is automatically done for you if you use DecalLoadJob.DecalLoadOptions.autoEvict when loading a decal.
|
|
Color? | GetColor (int submaterialSlot, int materialSlot=0) |
| Retrieve the color tint for decal materials NOTE: materialSlot is IGNORED it's here so the function sig matches MeshItem More...
|
|
bool | ApplyColor (Color color, int submaterialSlot=0, int materialSlot=0) |
| Set the color tint for decal materials NOTE: materialSlot is IGNORED it's here so the function sig matches MeshItem More...
|
|
bool | ClearColor (int subMaterialSlot=0, int materialSlot=0) |
| Erases the existing color from the material/decal if any are set NOTE: materialSlot is IGNORED it's here so the function sig matches MeshItem More...
|
|
void | SyncColorsIntoMaterial () |
| Used to copy any color data from the Colors dictionary into the DecalMaterials used by the decal system. This is useful if you are manipulating the Colors dictionary yourself manually and want them applied after. You can ignore this call if you are not manually altering the Colors dictionary. The inverse of this is CopyMaterialIntoColorData.
|
|
bool | CopyMaterialIntoColorData (int subMaterialSlot=-1, int materialSlot=-1) |
| Copies the "base material tints" from DecalMaterials into the Colors property. NOTE: materialSlot is IGNORED it's here so the function sig matches MeshItem The inverse of this is SyncColorsIntoMaterial. More...
|
|
List< List< Color > > | GetColorPaletteOptions (int subMaterialSlot) |
| Get the color options for what can go into the given sub material slot More...
|
|
int | GetColorOptionCount (int subMaterialSlot) |
| Get the number of color options for the given sub material slot More...
|
|
int | GetMaterialCount () |
| Return the number of subMaterials this DecalItem has More...
|
|
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...
|
|
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...
|
|
|
List< MaterialTarget > | materialTargets = new List<MaterialTarget>() |
|
string | morphGuid |
|
float | Layer = 1.0f |
| The stacking order, used with albedo and metals
|
|
float | Strength = 1.0f |
| if 0 none of the decal is visible, if 1 100% opacity, can be overdriven, range is 0->1 if overdriven you will end up with odd colors
|
|
List< string > | Tags = new List<string>() |
| List of tags assigned to this DecalItem
|
|
SerializableDictionaryIColor | Colors = new SerializableDictionaryIColor() |
| Allows tinting of the decal by material assignment just like MeshItem, this is just a handy way to normalize these values when we apply this tint to the material itself in the decal key is the "submaterialslot" not material slot (right now decals are limited to a single material)
|
|
SerializableDictionarySMat | DecalMaterials = new SerializableDictionarySMat() |
| The decal materials currently being used. It is unadvised to access these materials yourself rather let the decal system handle them for you. Key is the submesh guid being targetted. Value is the unity material that is generated. More...
|
|
|
override McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
|
override McsSdk20.Primitives.SchematicType | SchematicType [get] |
|
bool | IsApplied [get] |
| Whether the DecalItem is currently visible/enabled
|
|
MeshItem | MeshItem [get] |
| This is the mesh we're being applied to, it might be a figure or clothing or anything else
|
|
string | MeshId [get] |
| Guid of the MeshItem this decal is attached to
|
|
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] |
|
DecalItems are attached to MeshItems and apply a blended material on top of an existing material. They can either completely replace the textures or be smoothly blended into the textures based on the PrimitiveDecal.MaterialTarget[x].MaterialBlendingFunction