Search Unity

Possible regression in Addressables 0.6.6? Or intended behavior?

Discussion in 'Addressables' started by RecursiveFrog, Mar 7, 2019.

  1. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    @unity_bill
    I don't know if this is intended functionality in 0.6.6 but this definitely did not happen in previous versions.

    In Unity 2018.3.7f1 I have a nested prefab structure in which:

    • Container Prefab <- Addressable
      • Contained Prefab 0 <-Not Addressable
      • Contained Prefab 1 <-Not Addressable
      • ... <- Not Addressable
    Each of the Contained Prefabs has an Animator, and that Animator references an Avatar and an AnimatorController. In all previous versions of Addressables, if I were to load that container prefab, all my animations would work as expected. However, in 0.6.6 when I load the prefab, my animations won't play at all.

    First, I tried making the AnimatorController addressable, but that did not solve the issue.

    When I went into Packed Play Mode, I discovered that the avatar was missing from every contained prefab. So, I went to the Avatar's prefab and gave it an Address.

    This seems to solve the problem... But this was never a problem before 0.6.6. Is this new behavior intended? Were we always supposed to explicitly address Avatars and AnimatorControllers?

    Avatar_0.png Avatar_1.png
     
    MNNoxMortem likes this.
  2. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    If I understood you correctly, I have seen this issue before with prefabs containing a reference to a scriptable object but the scriptable object isn't an addressable asset. The scriptable object is not loaded and null when instantiating the prefab via addressables.
    Somehow it can't always link assets that are supposed to be built in.
     
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    sub-prefabs should not be "addressable" in the sense that you could load them by name. But they should be included in the build and loaded when you load the parent.

    If you can create a repro project, I would appreciate you filing a bug against Unity and putting the case number here. Then we can dig into the problem.
     
    MNNoxMortem likes this.
  4. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    Thanks for the clarification.

    Unfortunately my isolation build doesn't display this behavior. I don't yet know why this would happen, since it does consistently repro in my project that I've used and upgraded since the 0.4.x release. I will follow up if I can isolate the issue.
     
    unity_bill likes this.
  5. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    This is resolved for me. As it turns out, there was an issue in my original codebase where Assets were unloaded prematurely, and this was disguised by giving the addresses to the nested objects within the container prefab.
     
    unity_bill likes this.