Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Gameobject instantiate vs addressable instantiateasync

Discussion in 'Addressables' started by Nithinsvs, Jun 30, 2023.

  1. Nithinsvs

    Nithinsvs

    Joined:
    Sep 3, 2017
    Posts:
    28
    So, after Addressables.Loadassetasync , should I call regular Gameobject.Instantiate or Addressebles.InstantiateAsync ? Which is preferred over the other and why?
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,769
    If you've loaded the reference, you should just use normal
    Object.Instantiate()
    .

    If you haven't loaded it, you can use
    Addressables.InstantiateAsync
    or AssetReference.InstantiateAsync to make an instance, though this isnt the recommended way. Better to just do the first way, load the reference, instantiate normally.
     
  3. Nithinsvs

    Nithinsvs

    Joined:
    Sep 3, 2017
    Posts:
    28
    Thank you..