// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 using UnityEngine; namespace GLTFast.Materials { using Logging; using Schema; /// /// Provides a mechanism to convert glTF materials into Unity Materials /// public interface IMaterialGenerator { /// /// Get fallback material that is assigned to nodes without a material. /// /// If true, material has to support meshes with points topology. /// fallback material UnityEngine.Material GetDefaultMaterial(bool pointsSupport = false); /// /// Converts a glTF material into a Unity . /// might reference textures, which can be queried from . /// /// Source glTF material /// Interface to a loaded glTF's resources (e.g. textures) /// If true, material has to support meshes with points topology. /// Generated Unity Material UnityEngine.Material GenerateMaterial( MaterialBase gltfMaterial, IGltfReadable gltf, bool pointsSupport = false ); /// /// Has to be called prior to . The logger can be used /// to inform users about incidents of arbitrary severity (error,warning or info) /// during material generation. /// /// Logger to be used. void SetLogger(ICodeLogger logger); } }