docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GltfEntityAsset

    Loads a glTF from a MonoBehaviour but instantiates Entities. Intermediate solution and drop-in replacement for GltfAsset TODO: To be replaced with a pure ECS concept

    Inheritance
    object
    GltfEntityAsset
    Namespace: GLTFast
    Assembly: glTFast.dots.dll
    Syntax
    public class GltfEntityAsset : GltfAssetBase

    Properties

    FullUrl

    Declaration
    public string FullUrl { get; }
    Property Value
    Type Description
    string

    InstantiationSettings

    Declaration
    public InstantiationSettings InstantiationSettings { get; set; }
    Property Value
    Type Description
    InstantiationSettings

    LoadOnStartup

    Automatically load at start

    Declaration
    public bool LoadOnStartup { get; set; }
    Property Value
    Type Description
    bool

    SceneId

    Scene to load (-1 loads glTFs default scene)

    Declaration
    protected int SceneId { get; }
    Property Value
    Type Description
    int

    StreamingAsset

    If true, url is treated as relative StreamingAssets path

    Declaration
    public bool StreamingAsset { get; }
    Property Value
    Type Description
    bool

    Url

    Declaration
    public string Url { get; }
    Property Value
    Type Description
    string

    Methods

    ClearScenes()

    Removes previously instantiated scene(s)

    Declaration
    public override void ClearScenes()

    GetDefaultInstantiator(ICodeLogger)

    Declaration
    protected override IInstantiator GetDefaultInstantiator(ICodeLogger logger)
    Parameters
    Type Name Description
    ICodeLogger logger
    Returns
    Type Description
    IInstantiator

    Load(string, IDownloadProvider, IDeferAgent, IMaterialGenerator, ICodeLogger)

    Declaration
    public override Task<bool> Load(string gltfUrl, IDownloadProvider downloadProvider = null, IDeferAgent deferAgent = null, IMaterialGenerator materialGenerator = null, ICodeLogger logger = null)
    Parameters
    Type Name Description
    string gltfUrl
    IDownloadProvider downloadProvider
    IDeferAgent deferAgent
    IMaterialGenerator materialGenerator
    ICodeLogger logger
    Returns
    Type Description
    Task<bool>

    PostInstantiation(IInstantiator, bool)

    Declaration
    protected override void PostInstantiation(IInstantiator instantiator, bool success)
    Parameters
    Type Name Description
    IInstantiator instantiator
    bool success

    Start()

    Declaration
    protected virtual void Start()
    In This Article
    Back to top
    Copyright © 2024 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)