docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ProvideInstance

    ProvideInstance(IInstanceProvider, IResourceLocation, InstantiationParameters)

    Asynchronously instantiate a prefab (GameObject) at the specified location.

    Declaration
    public AsyncOperationHandle<GameObject> ProvideInstance(IInstanceProvider provider, IResourceLocation location, InstantiationParameters instantiateParameters)
    Parameters
    Type Name Description
    IInstanceProvider provider

    An implementation of IInstanceProvider that will be used to instantiate and destroy the GameObject.

    IResourceLocation location

    Location of the prefab.

    InstantiationParameters instantiateParameters

    A struct containing the parameters to pass the the Instantiation call.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    Async operation that will complete when the prefab is instantiated.

    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)