Class GltfMaterialExporter
Converts Unity Materials that use a glTFast shader to glTF materials
Implements
Inherited Members
Namespace: GLTFast.Export
Assembly: glTFast.Export.dll
Syntax
public abstract class GltfMaterialExporter : MaterialExportBase, IMaterialExport
Methods
ConvertMaterial(Material, out Material, IGltfWritable, ICodeLogger)
Converts a Unity material into a glTF material
Declaration
public override bool ConvertMaterial(Material unityMaterial, out Material material, IGltfWritable gltf, ICodeLogger logger)
Parameters
Type | Name | Description |
---|---|---|
Material | unityMaterial | |
Material | material | Resulting glTF material |
IGltfWritable | gltf | glTF to export material to. Will be used to add required texture images |
ICodeLogger | logger | Custom logger |
Returns
Type | Description |
---|---|
bool | True if material was converted successfully, false otherwise |
Overrides
GetAlphaCutoff(Material)
Returns that material's alpha cutoff threshold.
Declaration
protected abstract float GetAlphaCutoff(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
float | Alpha cutoff threshold value. |
See Also
GetAlphaMode(Material)
Extracts the glTF alpha mode from a Unity material.
Declaration
protected abstract MaterialBase.AlphaMode GetAlphaMode(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
MaterialBase.AlphaMode | glTF alpha mode. |
See Also
IsDoubleSided(Material)
Indicates whether (back-face) culling should be disabled.
Declaration
protected abstract bool IsDoubleSided(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
bool | True if material does not do back-face culling. False otherwise. |