TriLib
Search Results for

    Show / Hide Table of Contents

    Class GltfMaterialsHelper

    Provides helper methods for configuring AssetLoaderOptions to use the glTF2StandardMaterialMapper, ensuring that glTF 2.0 materials are applied correctly during model loading.

    Inheritance
    object
    Object
    ScriptableObject
    MaterialsHelper
    GltfMaterialsHelper
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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 null, the method creates a default set of loader options.

    Overrides
    MaterialsHelper.Setup(ref AssetLoaderOptions)

    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 null, this method generates a default set of loader options before configuring glTF-specific materials.

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top Generated by DocFX