docs.unity3d.com
    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023