Astra Unity 2.6.6
Astra Unity Plugin
Astra.Asset.IColorInterface Interface Reference
Inheritance diagram for Astra.Asset.IColorInterface:

Public Member Functions

Color? GetColor (int submaterialSlot, int materialSlot=0)
 Returns a nullable color for the material inside the submaterial slot A color may be null if there is no current tracked value and you must account for this A null is an acceptable color, it means DO NOT OVERRIDE the material's color (think Color(0,0,0,0)) More...
 
bool ApplyColor (Color color, int submaterialSlot=0, int materialSlot=0)
 Sets the color tint for a material Defaults to the first slot of the submaterial Defaults to the first slot of the material if not specified More...
 
bool ClearColor (int subMaterialSlot=0, int materialSlot=0)
 Removes any color tint from the material More...
 
List< List< Color > > GetColorPaletteOptions (int materialSlot)
 
int GetColorOptionCount (int materialSlot)
 
int GetMaterialCount ()
 
bool CopyMaterialIntoColorData (int submaterialSlot=-1, int materialSlot=-1)
 Discover the existing colors that exist on the current material into the serialized values being tracked More...
 

Member Function Documentation

◆ ApplyColor()

bool Astra.Asset.IColorInterface.ApplyColor ( Color  color,
int  submaterialSlot = 0,
int  materialSlot = 0 
)

Sets the color tint for a material Defaults to the first slot of the submaterial Defaults to the first slot of the material if not specified

Parameters
colorThe color you want to tint, blends on alpha channel
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot, defaults to 0
Returns
True if the color was applied, false if it's unable (such as an unsupported shader or a shader that can't tint that slot)

Implemented in Astra.Asset.EyeItem, Astra.Asset.FigureItem, Astra.Asset.CompoundItem, Astra.Asset.DecalItem, and Astra.Asset.MeshItem.

◆ ClearColor()

bool Astra.Asset.IColorInterface.ClearColor ( int  subMaterialSlot = 0,
int  materialSlot = 0 
)

Removes any color tint from the material

Parameters
subMaterialSlotWhich sub material slot (0->3)
materialSlotWhich submesh material slot, defaults to 0
Returns
True if the color was cleared, false if it's unable (such as an unsupported shader or a shader that can't tint that slot)

Implemented in Astra.Asset.CompoundItem, Astra.Asset.EyeItem, Astra.Asset.FigureItem, Astra.Asset.DecalItem, and Astra.Asset.MeshItem.

◆ CopyMaterialIntoColorData()

bool Astra.Asset.IColorInterface.CopyMaterialIntoColorData ( int  submaterialSlot = -1,
int  materialSlot = -1 
)

Discover the existing colors that exist on the current material into the serialized values being tracked

Parameters
submaterialSlotIf -1 copy all sub material colors for the material(s)
materialSlotIf -1 copy all material(s) on this item
Returns
True if everything worked, if false check logs

Implemented in Astra.Asset.CompoundItem, Astra.Asset.DecalItem, and Astra.Asset.MeshItem.

◆ GetColor()

Color? Astra.Asset.IColorInterface.GetColor ( int  submaterialSlot,
int  materialSlot = 0 
)

Returns a nullable color for the material inside the submaterial slot A color may be null if there is no current tracked value and you must account for this A null is an acceptable color, it means DO NOT OVERRIDE the material's color (think Color(0,0,0,0))

Parameters
submaterialSlotShaders support multiple color tints, this is the tint slot of the material
materialSlotThis represents the material slot, or the submesh slot
Returns
A nullable color, if null it means we dopn't know how to find the tint color of the material (or there isn't one for the shader)

Implemented in Astra.Asset.CompoundItem, Astra.Asset.FigureItem, Astra.Asset.MeshItem, and Astra.Asset.DecalItem.

◆ GetColorOptionCount()

int Astra.Asset.IColorInterface.GetColorOptionCount ( int  materialSlot)

◆ GetColorPaletteOptions()

List< List< Color > > Astra.Asset.IColorInterface.GetColorPaletteOptions ( int  materialSlot)

◆ GetMaterialCount()

int Astra.Asset.IColorInterface.GetMaterialCount ( )

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