Search Unity

Track cannot be loaded

Discussion in 'Timeline' started by Deleted User, Sep 3, 2019.

  1. Deleted User

    Deleted User

    Guest

    I load scene by AssetBundle, the Console Window show many warning log
    I click the log then Inspector show that's some track log
    And i also find some tracks can't be loaded
    1.jpg 2.jpg
     
    Last edited by a moderator: Sep 3, 2019
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Are all the tracks that aren't loading custom tracks?
     
  3. Deleted User

    Deleted User

    Guest

    Unity track also cannt be loaded. Just like the Animaiton Track in the sc.
    case1: Load scene bundle, load scene, load prefab and timeline bundle then instantiate, track cannt be loaded.
    case2: Load scene bundle, load prefab and timeline bundle then instantiate, its ok. Then load scene, also work.
    The scene bundle dependencies : prefab and timeline bundle
     
    Last edited by a moderator: Sep 3, 2019
  4. Deleted User

    Deleted User

    Guest

    This is test project, version (2018.4.5f1)
    case1:
    1. Open scene(Start) then play
    2. KeyDown.Alpha1, the scene(TestA) loaded
    3. Then KeyDown.A, load and inst prefab, the timeline on the prefab is broken, track cannt be loaded
    case2:
    1. Open scene(Start) then play
    2. KeyDown.Alpha2, the scene(TestB) loaded
    3. Then KeyDown.A, load and inst prefab, the timeline on the prefab is work
     

    Attached Files:

  5. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Try placing the timeline in the same asset bundle as the prefab.
     
  6. Deleted User

    Deleted User

    Guest

    I find the reason.
    Switch Inspector to DebugMode, I find the PlayableDirector have some sceneBinding don't belong to it ref TimelineAsset.
    So when i build the scene AssetBundle, the manifest has a FAKE dependencies
    Its a bug?I test on 2018.4.8f1 and 2019.2.3f1
    Do you have some way to fix this ?
    I have a code fix all scene and prefab PlayableDirector, remove FAKE sceneBinding.
    But i need to this every time beforce Build Project. I have too much prefab (nested) and scene.
     
  7. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    What do you mean by fake? The playable director references the tracks (which are hidden sub assets of the timeline), and should pull the timeline asset into the same bundle. The timeline asset is actually a collection of assets, and the dependencies should be properly included. There could be a bug there, but nothing that I'm aware of in 2018.4.

    If the timeline is getting pulled to multiple bundles, then the assets could be getting distributed among multiple bundles, which is what I suspect is happening. That would explain the timeline being partially loaded (the image you sent has missing anim clips as well, which strongly suggests that).

    If you used multiple timelines on a single director, then the playable director doesn't clear references to the previous timelines tracks. So clearing those is important (this is a known issue that hopefully we have a solution for soon). These can be 'fake' references, and we don't clear them, because binding multiple timelines to a single playable director is useful in some scenarios - but we should update the UI to make it clear that is happening. It didn't appear to be the case in your sample though.

    So, I'd suggest either

    1) Make sure the timeline is assigned to the same bundle as the prefab.
    2) If you want the timeline in a separate bundle, don't include the playable director in the prefab, and instantiate it at runtime.
     
  8. Deleted User

    Deleted User

    Guest

    My FAKE mean:
    The playable director references the tracks dont' remove pre TimelineAssets' track when replace a new TimelineAsset.
    Material have same problem, also include some m_SavedProperties and don't belong to bind shader.
    So i will find some disturbing info when check bundle on the AssetBundle Browser.
    Thanks for your help.
     
  9. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    1) Make sure the timeline is assigned to the same bundle as the prefab.

    -- Can i load timeline assetbundle and then load playable director assetbundle?
     
  10. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    I believe that will work.
     
  11. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    :confused:
    a : AssetBundle.LoadFromFile() to load Timeline assetbundle ----------- assetBundleT
    b : AssetBundle.LoadFromFile() to load PlayableDirector assetbundle - assetBundleP
    c : assetBundleP.LoadAsset() to load PlayableDirector prefab ------------ pd
    d : assetBundleT.LoadAsset() to load Timeline.playable -------------------- asset

    a -> b -> d -> c : asset.outputTrackCount == 4
    a -> b -> c -> d : asset.outputTrackCount == 0

    why should i load dependency asset manually ?
     
  12. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    a -> b -> c -> d : asset.outputTrackCount == 0

    That is curious... Are you assigning the timeline asset manually after it is loaded?

    You probably shouldn't, unless it is referenced by multiple scenes/assets.
     
  13. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    Emm...
    Or do I need to clear references to previous timeline tracks, even if the timeline assetbundle is loaded first ???

    that's my test code and inspector

    PrefabInspect.png TestCode.png
     
  14. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    It appears that only the timeline asset itself is loaded, and none of the tracks. Tracks, PlayableAssets, AnimationClips are all sub-assets inside the playable file. How did you create the asset bundle?
     
  15. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    but a -> b -> d -> c goes right

    and my build code
    buildcode.png
     
  16. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Can you see what is getting packed in each bundle? Is the timeline asset itself getting packed inside the playable director?
     
  17. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    i dont know how to see that ...

    playabledirector.png testtimeline.png

    or need the whole project ?
     
  18. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    It makes sense that a->b->d->c works then, and that is the appropriate way to do it. Load the asset before the object that links to it.

    In the case of a->b->c->d, after 'c', check if playableDirector.playableAsset is set. That would be the timeline asset. It should be null. If it isn't, then that might mean an empty timeline asset is getting loaded, or it is getting split between the two bundles.

    I suspect there is a bug here, I'm just not sure where. Feel free to open a bug and attach it, and our QA team will have a look. Timeline and Assetbundles are complicated because a timeline is a collection of assets in a single file, and it is possible to accidentally split those assets over multiple bundles - which breaks links between them (e.g. timeline asset to tracks, tracks to clip playable assets, clips to animation clips....). I'm guessing that a->b->c->d is causing a timeline asset with broken links to get loaded.
     
  19. wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    wechat_os_Qy06fvcm1PmXkJd4807uh-IWA

    Joined:
    Jan 9, 2020
    Posts:
    8
    thanks.
    emm...
    does "open a bug and attach it" means post a new thread in forums
     
    Last edited: Jan 20, 2020
  20. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Load your repro project in the editor. Then under the Help menu, select 'Report a Bug...'.
     
  21. Psyco92

    Psyco92

    Joined:
    Nov 15, 2013
    Posts:
    22
    Any solution? in a similar situation
     
  22. EP-Toushirou

    EP-Toushirou

    Joined:
    Nov 19, 2019
    Posts:
    40
    Hello, Is the problem founded? Same problem when packed the TimelineAsset in diffrent AssetBundle.
     
    HealthStone likes this.
  23. bangingdev

    bangingdev

    Joined:
    Nov 15, 2020
    Posts:
    12
    This is my solution.
    LoadAllAssets<Timeline> when LoadAssetBundle