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

LoadAssetAsync automatically instantiate gameObject and call Awake

Discussion in 'Addressables' started by dimmduh1, May 21, 2021.

  1. dimmduh1

    dimmduh1

    Joined:
    Feb 5, 2021
    Posts:
    24
    I'm trying to load asset via
    Code (CSharp):
    1.  handler = assetReference.LoadAssetAsync<GameObject>();
    2. handler.WaitForCompletion();
    In playmode in editor.
    But this Instantiates gameObject and execute Awake.

    Stack shows It calls from AssetDatabaseProvider.cs#114
     
    Last edited: May 21, 2021
  2. dimmduh1

    dimmduh1

    Joined:
    Feb 5, 2021
    Posts:
    24
    It seems bug
    when I select "Play mode Script" - use existing build, Awake does not call when loading asset.
     
  3. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    350