docs.unity.cn
    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 Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Friday, March 4, 2022
    Terms of use