https://forum.unity.com/threads/ios-timeline-playabledirector-not-working-in-assetbundles.515426/
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
There is a workaround posted in another thread:
https://forum.unity.com/threads/timelines-do-not-work-in-scene-bundles-on-ios.496157/
Look at the post of
ZeFirestarter from 13.2.2018. The workaround worked for us.
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.
Yes, that´s the workaround we used too. (see my reply from March 28)
I should close this thread
The alternative is to create "link.xml" file which includes classes from "UnityEngine.Playables" namespace. This also solves the issue.
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.
Has this been addressed by Unity?
https://issuetracker.unity3d.com/is...ctor-dot-playable-when-used-in-an-assetbundle
Code (JavaScript):
<assembly fullname="UnityEngine.Timeline">
<namespace fullname="UnityEngine.Timeline" preserve="all"/>
</assembly>