Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Asset Bundles and Timeline iOS

Discussion in 'Timeline' started by lloydhooson, Nov 20, 2018.

  1. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    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.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    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
     
  3. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    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 :

    Code (CSharp):
    1. <linker>
    2.   <assembly fullname="UnityEngine">
    3.     <type fullname="UnityEngine.Timeline.dll" preserve="all"/>
    4.     <type fullname="UnityEngine.Playables.dll" preserve="all"/>
    5.   </assembly>
    6. </linker>
    7.  
    I have tried several different variations. But I'm just stabbing in the dark.
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    The assembly is UnityEngine.Timeline. Timeline is a separate dll from the rest of Unity.

    Code (CSharp):
    1. <linker>
    2.        <assembly fullname="UnityEngine.Timeline" preserve="all"/>
    3. </linker>
     
  5. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    This is not working for me. I create the link.xml file and have placed it in the asset folder as well.
     
  6. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    I am using unity 2018.2.14f1 as well.
     
  7. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    You may also need to make sure playable code doesn't get stripped, similar to your original post.

    Code (CSharp):
    1.   <assembly fullname="UnityEngine">
    2.     <namespace fullname="UnityEngine.Playables" preserve="all"/>
    3.   </assembly>
     
  8. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    Thanks working now, for reference this is the link.xml used.

    Code (CSharp):
    1. <linker>
    2.     <assembly fullname="UnityEngine.Timeline" preserve="all"/>
    3.     <assembly fullname="UnityEngine">
    4.       <namespace fullname="UnityEngine.Playables" preserve="all"/>
    5.     </assembly>
    6. </linker>
     
    seant_unity likes this.
  9. stefanob

    stefanob

    Joined:
    Nov 26, 2012
    Posts:
    75
    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.
     
  10. zzw8866755

    zzw8866755

    Joined:
    Mar 13, 2019
    Posts:
    1
    I had the same problem,and it works with link.xml, Thank you very much
     
    sherpa21 likes this.
  11. halzate93

    halzate93

    Joined:
    Apr 24, 2013
    Posts:
    6
    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:

    <assembly fullname="Unity.Timeline" preserve="all"/>

    For some reason the assemblies coming from the package manager are not in the UnityEngine assemblies, they are found in "Unity".
     
    unity_y5grgymbtg and joelyusj like this.
  12. Spikmun

    Spikmun

    Joined:
    Feb 3, 2013
    Posts:
    2
    This fixed the issue for me in 2019.2.12f1, thanks!
     
  13. LinaEagle

    LinaEagle

    Joined:
    Mar 15, 2018
    Posts:
    6
    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-Technologi...emachine/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).