Search Unity

Track Count = 1 from addressables on build

Discussion in 'Timeline' started by DenisKen, Dec 2, 2021.

  1. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    I have 2 projects.
    1 with addressables prefabs and another to receive this prefabs.

    Everything works well but when I try to load Timeline the track count that should be 5 is 1.

    I tried differents ways Loading asset, loading timeline playable, removing director from prefab, none of this worked...

    Build WebGL:
    upload_2021-12-2_12-52-32.png

    On editor:
    upload_2021-12-2_13-11-0.png


    My code attached:
     

    Attached Files:

  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    This question (or a variation on it) has come up quite a bit recently.

    This thread has a similar issue and solved it by having a Timeline in the base executable with the track types getting stripped.
    My comment on this other thread has some hints on how to diagnose this.

    If neither of these help, then feel free to give us more info on your situation.
     
  3. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    Hi! Thank you for the answer. I have a question, where I find UnityLinker_Diagnostics folder? Is it needed to install UnityLinker package or somenthing?

    Can you explain the step-b-step to build with UnityLinker enabled? I setup the [Preserve] on scripts but the error still happnes
     
    Last edited: Dec 6, 2021
  4. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    So, it seems I have been misinformed.
    These diagnostic folder require a non-release build :(

    Also, from your deleted comment:

    "Another weird behaviour is that sometimes when I build my game for WebGL the addressables timeline works... and when I close unity and build again the error returns, it's occurs in 30% of builds."

    That seems extremely weird to me. If it was a stripping issue, I would expect it to always be the same. Maybe try to see what changes between builds.

    At this point, I have reached the limit of my (theoric) knowledge on code stripping, and if you want further help, I will need a reproduction project to be able to help you.
     
  5. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    What do you mean with non-release build? Is it another way to build or is inaccessible to me to get this diagnostics?
     
  6. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    It is not accessible outside Unity or source code builds of Unity, sadly.
     
  7. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    Hi, David, Can you confirm of my preserve implementation is ok?

    Was add Timeline into unity's packages
    upload_2021-12-9_11-4-38.png

    In Timeline/runtime/activation/ActivationTrack.cs I added [assembly: Preserve] on namespace and [UnityEngine.Scripting.Preserve] on ActivationTrack class
    upload_2021-12-9_11-11-24.png

    link.xml was created and added in Assets folder.
    upload_2021-12-9_11-14-32.png
     
  8. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    This looks correct as far as I understand it. Actually, from my understanding, just the attribute should be enough.

    If that doesn't fix it, I would look for compilation errors, exceptions, etc happening during the build process or during loading.
     
  9. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
  10. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    Here is the addressable builder log
     

    Attached Files:

  11. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    That's great.
    Could you please also file a bug report using the bug reporter?
    You can attach the rar files to it, give a general description of how to reproduce this.
    You can also reference this thread in your bug description.

    You will get a bug number, which you can paste here too.

    This will ensure proper tracking, give you something to monitor, and make sure it doesn't get lost if I get hit by a bus.
     
  12. DenisKen

    DenisKen

    Joined:
    Jul 22, 2015
    Posts:
    9
    DavidGeoffroy likes this.