Class GltfMaterialsHelper
Provides helper methods for configuring AssetLoaderOptions to use the glTF2StandardMaterialMapper, ensuring that glTF 2.0 materials are applied correctly during model loading.
Inherited Members
Namespace: TriLibCore.Utils
Assembly: Assembly-CSharp.dll
Syntax
[CreateAssetMenu(menuName = "TriLib/MaterialsHelper/Gltf Materials Helper", fileName = "GltfMaterialsHelper")]
public class GltfMaterialsHelper : MaterialsHelper
Methods
Setup(ref AssetLoaderOptions)
Configures assetLoaderOptions
to use the glTF2StandardMaterialMapper,
ensuring that glTF materials (such as PBR data) are translated correctly into Unity’s material system.
This method also adjusts certain AssetLoaderOptions fields for optimal glTF handling.
Declaration
public override void Setup(ref AssetLoaderOptions assetLoaderOptions)
Parameters
Type | Name | Description |
---|---|---|
AssetLoaderOptions | assetLoaderOptions | A reference to an AssetLoaderOptions object to configure. If it is |
Overrides
SetupStatic(ref AssetLoaderOptions)
A static convenience method that creates an instance of GltfMaterialsHelper
and invokes Setup(ref AssetLoaderOptions) to apply the glTF2StandardMaterialMapper
and related options to assetLoaderOptions
.
Declaration
public static void SetupStatic(ref AssetLoaderOptions assetLoaderOptions)
Parameters
Type | Name | Description |
---|---|---|
AssetLoaderOptions | assetLoaderOptions | A reference to an existing AssetLoaderOptions object. If |