Search Unity

iOS Timeline / PlayableDirector not working in AssetBundles

Discussion in 'Editor & General Support' started by MartinG, Feb 2, 2018.

  1. MartinG

    MartinG

    Joined:
    Apr 17, 2013
    Posts:
    16
    Hi,

    we have a problem on iOS with AssetBundles, that include Timeline Animations. The AssetBundle is working, but the Animation is not playing. The errors are:

    PlayableAsset returned a null Playable on Instantiate
    PlayableGraph being evaluated with no outputs. Playables will not be updated

    On Android and in Editor Playmode all is working well.

    The Problem seems to be a duplicate to

    https://issuetracker.unity3d.com/is...ading-with-unitywebrequest-dot-getassetbundle

    but this issue seems to be closed as resolved?

    But with Unity 2017.3.0f3 it is still existing.

    Reproduced on iPad 4 iOS 10.3.3
    Reproduced on iPhone 5s iOS 10.2.1
    Used Unity 2017.3.0f3

    IL2CPP Code Stripping was on and off. Both testet, bug everytime. The Timeline was known and exported to the App. Because DummyTimeLines were included for testing.

    AssetBundle was loaded by WWW, AssetBundle.Load and File.ReadAllBytes and get the Bundle from the bytes.

    There seems to be no workaround. The only way is, to rework all Timeline Animations to "Standard AnimationController" Animations and use the old way. With a lot of animations with keys to audio this is not the desired way and Timeline Support would be really great!

    Anyone else having this problem? Is there still a bugreport running? I found only the one above.

    Greetings,

    Martin
     
  2. takuyahimeji

    takuyahimeji

    Joined:
    Feb 26, 2016
    Posts:
    4
    I also have this problem.
     
  3. MartinG

    MartinG

    Joined:
    Apr 17, 2013
    Posts:
    16
  4. lrudel_sega

    lrudel_sega

    Joined:
    Apr 27, 2016
    Posts:
    4
    Just wanted to post for the benefit of others.
    I recently ran into the same issue and wanted to post my work around.

    It's rather simple, but unfortunate to have to do it.

    Just add a PlayableDirector component into a scene that is included in your build. In my case I chose our boot scene.
    Then create a Timeline asset that won't be used. I named it emptyTimeline for clarity.
    Assign this to your PlayableDirector and the problem should be resolved.

    It's worth noting you will also get this issue on Android if using IL2CPP builds or with Mono builds using a stripping level other than disabled.

    upload_2018-10-10_16-10-4.png
     
    xeniaosense and MartinG like this.
  5. MartinG

    MartinG

    Joined:
    Apr 17, 2013
    Posts:
    16
    Yes, that´s the workaround we used too. (see my reply from March 28)

    I should close this thread :D
     
  6. atrukhan_innogames

    atrukhan_innogames

    Joined:
    Feb 1, 2018
    Posts:
    1
    The alternative is to create "link.xml" file which includes classes from "UnityEngine.Playables" namespace. This also solves the issue.
     
  7. Bystander333

    Bystander333

    Joined:
    Jan 11, 2018
    Posts:
    6
    Didn't have a great deal of luck with link.xml, it appeared to work at first then stopped.
    Simpler solution even than including a timeline in a non-bundled scene is simply to create an empty .playable file in Resources/. It'll only be about 200 bytes, that seems to prevent stripping.
    e.g. In any scene add a Timeline, save the playable to resources, delete the timeline.
     
  8. danbfx

    danbfx

    Joined:
    Feb 22, 2011
    Posts:
    40
    Has this been addressed by Unity?
     
  9. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309