Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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