Data around how Materials are applied to a mesh
More...
|
void | ClearAstraTextures (UnityEngine.Material mat, bool deref=true) |
| Removes any known astra textures from the Unity material using the MaterialTarget.materialPropeties.propertyTextures tuples More...
|
|
void | ClearAstraProceduralTextures (UnityEngine.Material mat) |
| Removes textures such as decals or alpha injection procedural textures as these can be rebuilt More...
|
|
List< string > | GetAllTextureGUIDs () |
| Returns a list of all Astra Texture GUIDs used More...
|
|
Job | LoadAndReinjectTextures (UnityEngine.Material mat) |
|
void | ReinjectTextures (UnityEngine.Material mat) |
|
|
static MaterialTarget | FromPrimitiveMaterial (PrimitiveMaterial pm) |
| Creates a MaterialTarget from the protobuf representation of a material in Astra. This is useful as an optimized form of a material. Note: This doesn't have the same "data" as a true PrimitiveMaterialTarget and instead is done for consistency in material handling. More...
|
|
static MaterialTarget | FromPrimitiveMaterialTarget (PrimitiveMaterialTarget mtSrc) |
| Converts from Astra's PrimitiveMaterialTarget protobuf representation to an optimized C#/Unity representation as MaterialTarget, used during deserialization of materials. NOTE: this will not create the Unity Material, this is safe to run in a side thread More...
|
|
|
string | meshId |
| Which mesh is this material targeting?
|
|
string | submeshId |
| Which submesh from the meshId are we targeting?
|
|
BlendingFunction | materialBlendingFunction |
| When we create a DecalItem how should we blend this material into the decal?
|
|
BlendingFunction | materialBlendingFunctionNormal |
| Used to override the default blend mode if desired
|
|
TintMode | materialTintMode = TintMode.Normal |
| How this asset treats material tinting
|
|
bool | materialTintUserChoiceDisabled = false |
| Whether user tinting options are allowed on this material
|
|
BlendingFunction | materialBlendingFunctionOcclusion |
|
UnityEngine.Material | unityMaterial = null |
| A copy of the pristine-unmodified unity material (clone this, do not modify it)
|
|
MaterialProperties | materialProperties = new MaterialProperties() |
|
|
bool | isSerialized = false |
| This will be true if the textures and others have been unloaded This occurs if assets are saved in the scene
|
|
Data around how Materials are applied to a mesh
◆ ClearAstraProceduralTextures()
void Astra.Asset.MaterialTarget.ClearAstraProceduralTextures |
( |
UnityEngine.Material |
mat | ) |
|
|
inline |
Removes textures such as decals or alpha injection procedural textures as these can be rebuilt
- Parameters
-
mat | The material to scrub using the existing target |
◆ ClearAstraTextures()
void Astra.Asset.MaterialTarget.ClearAstraTextures |
( |
UnityEngine.Material |
mat, |
|
|
bool |
deref = true |
|
) |
| |
|
inline |
Removes any known astra textures from the Unity material using the MaterialTarget.materialPropeties.propertyTextures tuples
- Parameters
-
mat | The material to scrub using the existing target |
deref | Pops references off the texture pool if true |
◆ FromPrimitiveMaterial()
static MaterialTarget Astra.Asset.MaterialTarget.FromPrimitiveMaterial |
( |
PrimitiveMaterial |
pm | ) |
|
|
inlinestatic |
Creates a MaterialTarget from the protobuf representation of a material in Astra. This is useful as an optimized form of a material. Note: This doesn't have the same "data" as a true PrimitiveMaterialTarget and instead is done for consistency in material handling.
- Parameters
-
- Returns
- A MaterialTarget
- See also
- FromPrimitiveMaterialTarget
◆ FromPrimitiveMaterialTarget()
static MaterialTarget Astra.Asset.MaterialTarget.FromPrimitiveMaterialTarget |
( |
PrimitiveMaterialTarget |
mtSrc | ) |
|
|
inlinestatic |
Converts from Astra's PrimitiveMaterialTarget protobuf representation to an optimized C#/Unity representation as MaterialTarget, used during deserialization of materials. NOTE: this will not create the Unity Material, this is safe to run in a side thread
- Parameters
-
mtSrc | The source protobuf object to convert |
- Returns
- A MaterialTarget
◆ GetAllTextureGUIDs()
List< string > Astra.Asset.MaterialTarget.GetAllTextureGUIDs |
( |
| ) |
|
|
inline |
Returns a list of all Astra Texture GUIDs used
- Returns
- A list of strings containing each unique GUID
The documentation for this class was generated from the following file:
- Assets/Astra/Asset/Material/MaterialTarget.cs