{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method TrySetTexture | Unity glTFast | 6.0.1
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TrySetTexture

    TrySetTexture(TextureInfoBase, Material, IGltfReadable, int, int, int, int)

    Attempts assigning a glTF texture to a Unity material.

    Declaration
    protected bool TrySetTexture(TextureInfoBase textureInfo, Material material, IGltfReadable gltf, int texturePropertyId, int scaleTransformPropertyId = -1, int rotationPropertyId = -1, int uvChannelPropertyId = -1)
    Parameters
    Type Name Description
    TextureInfoBase textureInfo

    glTF source texture

    Material material

    target material

    IGltfReadable gltf

    Context glTF

    int texturePropertyId

    Target texture property

    int scaleTransformPropertyId

    Scale/transform (_ST) property

    int rotationPropertyId

    Rotation property

    int uvChannelPropertyId

    UV channel selection property

    Returns
    Type Description
    bool

    True if texture assignment was successful, false otherwise.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)