{!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} Interface IInstantiator | Unity glTFast | 6.0.1
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IInstantiator

    After parsing and loading a glTF's content and converting its content into Unity resources,the second step is instantiation. Implementors of this interface can convert glTF resources into scene objects.

    Namespace: GLTFast
    Assembly: solution.dll
    Syntax
    public interface IInstantiator

    Methods

    Name Description
    AddAnimation(AnimationClip[])

    Adds animation clips to the current scene. Only available if the built-in Animation module is enabled.

    AddCamera(uint, uint)

    Called when a node has a camera assigned

    AddLightPunctual(uint, uint)

    Called when a node has a punctual light assigned (KHR_lights_punctual)

    AddPrimitive(uint, string, MeshResult, uint[], uint?, float[], int)

    Called for adding a Primitive/Mesh to a Node.

    AddPrimitiveInstanced(uint, string, MeshResult, uint, NativeArray<Vector3>?, NativeArray<Quaternion>?, NativeArray<Vector3>?, int)

    Called for adding a Primitive/Mesh to a Node that uses GPU instancing (EXT_mesh_gpu_instancing) to render the same mesh/material combination many times. Similar to/called instead of AddPrimitive(uint, string, MeshResult, uint[], uint?, float[], int), without joints/skin support.

    BeginScene(string, uint[])

    Starts creating a scene instance. Has to be called at first and concluded by calling EndScene(uint[]).

    CreateNode(uint, uint?, Vector3, Quaternion, Vector3)

    Called for every Node in the glTF file

    EndScene(uint[])

    Is called at last, after all scene content has been created. Immediately afterwards the scene will be rendered, so use it to finally prepare the instance.

    SetNodeName(uint, string)

    Sets the name of a node. If a node has no name it falls back to the first valid mesh name. Null 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)