Asset Bundles and Timeline iOS

Hi, I am working on a project that uses asset-bundles for the scenes, these contain Timelines in them.
In the editor they work fine and on android they work fine but on iOS the same content causes a full crash of the app when trying to play the timeline.

I have then included the same timeline asset in a built in scene built and ran the timeline on iOS no problems, also this then causes the asset-bundled timelines to work fine.

What is going on? is there a limitation? or a setting or include? something?

help please.

Thanks.

If your assetbundles contain timelines but your app doesn’t, what can happen is the timeline code can get stripped from the application.

You can avoid it by not stripping the timeline assembly (UnityEngine.Timeline.dll) using this

Thanks for the reply. I cant seem to get this solution to work. Probably as I don’t have a clue what the XML needs to be populated with.

Currently I have this :

<linker>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.Timeline.dll" preserve="all"/>
    <type fullname="UnityEngine.Playables.dll" preserve="all"/>
  </assembly>
</linker>

I have tried several different variations. But I’m just stabbing in the dark.

The assembly is UnityEngine.Timeline. Timeline is a separate dll from the rest of Unity.

<linker>
       <assembly fullname="UnityEngine.Timeline" preserve="all"/>
</linker>

This is not working for me. I create the link.xml file and have placed it in the asset folder as well.

I am using unity 2018.2.14f1 as well.

You may also need to make sure playable code doesn’t get stripped, similar to your original post.

  <assembly fullname="UnityEngine">
    <namespace fullname="UnityEngine.Playables" preserve="all"/>
  </assembly>

Thanks working now, for reference this is the link.xml used.

<linker>
    <assembly fullname="UnityEngine.Timeline" preserve="all"/>
    <assembly fullname="UnityEngine">
      <namespace fullname="UnityEngine.Playables" preserve="all"/>
    </assembly>
</linker>
1 Like

I just had the same problem and the link.xml modification solved the problem. But shouldn’t disabled Code Stripping in the Player Settings also take care of it? In my case it didn’t. I had to put the lines in the link.xml.

I had the same problem,and it works with link.xml, Thank you very much

1 Like

I spent some time struggling with this, as of today with 2019.2.11f1 the line that you need to put in your link.xml is:

For some reason the assemblies coming from the package manager are not in the UnityEngine assemblies, they are found in “Unity”.

2 Likes

This fixed the issue for me in 2019.2.12f1, thanks!

I suppose you need to add particularly an assembly name to link.xml, which you can find in asmdef file. That’s the reason why UnityEngine.Timeline doesn’t work, because its name in asmdef is Unity.Timeline. For example, Cinemachine’s assembly name is simply Cinemachine, not Unity.Cinemachine or UnityEngine.Cinemachine (you can check it here https://github.com/Unity-Technologies/com.unity.cinemachine/blob/master/com.unity.cinemachine/Runtime/com.unity.cinemachine.asmdef)

Apparently, a bit inconsistent assembly naming makes developers more sophisticated in problem solving :).

Also I find that sometimes project reimport is needed to make link.xml changes to be applied to a new build, if you already have a build cache (which I think is not that comfy to use).