Class StandardMaterialMapper
Converts TriLib virtual materials into Unity Standard materials. This mapper is designed to work with the Unity Standard shader and processes texture maps and various material properties (e.g., diffuse, glossiness, metallic, emission, normal, occlusion, and displacement) using an asynchronous coroutine pipeline.
Inheritance
Object
ScriptableObject
MaterialMapper
StandardMaterialMapper
Inherited Members
MaterialMapper.CheckingOrder
MaterialMapper.DisableAlpha
MaterialMapper.ApplyMaterialToRenderer(MaterialRendererContext)
MaterialMapper.Cleanup(MaterialRendererContext)
MaterialMapper.Map(MaterialMapperContext)
MaterialMapper.CheckTextureOffsetAndScaling(TextureLoadingContext)
MaterialMapper.CheckTextureOffsetAndScalingCoroutine(TextureLoadingContext)
MaterialMapper.BuildMaterial(MaterialMapperContext)
MaterialMapper.RegisteredMapperNamespaces
MaterialMapper.RegisteredMappers
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
Namespace: TriLibCore.Mappers
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
[CreateAssetMenu(menuName = "TriLib/Mappers/Material/Standard Material Mapper", fileName = "StandardMaterialMapper")]
public class StandardMaterialMapper : MaterialMapper
Fields
ForceShaderVariantCollection
Declaration
public bool ForceShaderVariantCollection
Field Value
Type | Description |
---|---|
bool |
Properties
CutoutMaterialPreset
Declaration
public override Material CutoutMaterialPreset { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.CutoutMaterialPreset
CutoutMaterialPresetNoMetallicTexture
Declaration
public override Material CutoutMaterialPresetNoMetallicTexture { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.CutoutMaterialPresetNoMetallicTexture
ExtractMetallicAndSmoothness
Declaration
public override bool ExtractMetallicAndSmoothness { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
TriLibCore.Mappers.MaterialMapper.ExtractMetallicAndSmoothness
LoadingMaterial
Declaration
public override Material LoadingMaterial { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.LoadingMaterial
MaterialPreset
Declaration
public override Material MaterialPreset { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.MaterialPreset
MaterialPresetNoMetallicTexture
Declaration
public override Material MaterialPresetNoMetallicTexture { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.MaterialPresetNoMetallicTexture
TransparentComposeMaterialPreset
Declaration
public override Material TransparentComposeMaterialPreset { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.TransparentComposeMaterialPreset
TransparentComposeMaterialPresetNoMetallicTexture
Declaration
public override Material TransparentComposeMaterialPresetNoMetallicTexture { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.TransparentComposeMaterialPresetNoMetallicTexture
TransparentMaterialPreset
Declaration
public override Material TransparentMaterialPreset { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.TransparentMaterialPreset
TransparentMaterialPresetNoMetallicTexture
Declaration
public override Material TransparentMaterialPresetNoMetallicTexture { get; }
Property Value
Type | Description |
---|---|
Material |
Overrides
TriLibCore.Mappers.MaterialMapper.TransparentMaterialPresetNoMetallicTexture
UseShaderVariantCollection
Declaration
public override bool UseShaderVariantCollection { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
TriLibCore.Mappers.MaterialMapper.UseShaderVariantCollection
UsesCoroutines
Declaration
public override bool UsesCoroutines { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
TriLibCore.Mappers.MaterialMapper.UsesCoroutines
Methods
ApplyGlossinessMapTexture(TextureLoadingContext)
Declaration
protected virtual IEnumerable ApplyGlossinessMapTexture(TextureLoadingContext textureLoadingContext)
Parameters
Type | Name | Description |
---|---|---|
TextureLoadingContext | textureLoadingContext |
Returns
Type | Description |
---|---|
IEnumerable |
GetDiffuseColorName(MaterialMapperContext)
Declaration
public override string GetDiffuseColorName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetDiffuseColorName(TriLibCore.MaterialMapperContext)
GetDiffuseTextureName(MaterialMapperContext)
Declaration
public override string GetDiffuseTextureName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetDiffuseTextureName(TriLibCore.MaterialMapperContext)
GetEmissionColorName(MaterialMapperContext)
Declaration
public override string GetEmissionColorName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetEmissionColorName(TriLibCore.MaterialMapperContext)
GetGlossinessOrRoughnessName(MaterialMapperContext)
Declaration
public override string GetGlossinessOrRoughnessName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetGlossinessOrRoughnessName(TriLibCore.MaterialMapperContext)
GetGlossinessOrRoughnessTextureName(MaterialMapperContext)
Declaration
public override string GetGlossinessOrRoughnessTextureName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetGlossinessOrRoughnessTextureName(TriLibCore.MaterialMapperContext)
GetMetallicName(MaterialMapperContext)
Declaration
public override string GetMetallicName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetMetallicName(TriLibCore.MaterialMapperContext)
GetMetallicTextureName(MaterialMapperContext)
Declaration
public override string GetMetallicTextureName(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
string |
Overrides
TriLibCore.Mappers.MaterialMapper.GetMetallicTextureName(TriLibCore.MaterialMapperContext)
IsCompatible(MaterialMapperContext)
Declaration
public override bool IsCompatible(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
bool |
Overrides
TriLibCore.Mappers.MaterialMapper.IsCompatible(TriLibCore.MaterialMapperContext)
MapCoroutine(MaterialMapperContext)
Declaration
public override IEnumerable MapCoroutine(MaterialMapperContext materialMapperContext)
Parameters
Type | Name | Description |
---|---|---|
MaterialMapperContext | materialMapperContext |
Returns
Type | Description |
---|---|
IEnumerable |
Overrides
TriLibCore.Mappers.MaterialMapper.MapCoroutine(TriLibCore.MaterialMapperContext)