Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question [Solved] Timeline not building correctly but working in Editor.

Discussion in 'Timeline' started by dudleyhk, Jul 25, 2021.

  1. dudleyhk


    Sep 27, 2017
    Timeline works in Editor but not in build and I feel like I've done all of the suggested fixes mentioned in all the forum posts I can find on this issue. It seems it's common.

    I'm getting a bunch of these messages but I can't find any UNITY_EDITOR references in any of the scripts.

    The referenced script on this Behaviour (Game Object '<null>') is missing!
    A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 64 bytes but expected 1036 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    Solutions Tried:
    1. Make sure all the script class/ file names are the same.
    2. Is code stripped? Backend is Mono and link.xml file with:

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

    3. Dummy Director in the boot scene.
    4. Check for rogue UNITY_EDITOR defs/ Unity Editor Scripts nothing found.
    5. Put the Timeline Assets in to the same folder as the Prefabs.

    The strange thing this is that some of the Audio is playing from the first part of the Timeline but none of the animations or custom scripts are running.

    Not sure if it's related but occasionally the Custom Tracks are unable to load until I run Unity or open up VS.

    I'm looking in at the Asset Bundle Browser now. Some of the Audio Assets are being shared between a couple of Timelines causing the Dependencies Warning. Not sure if that is related??

    Seriously at a loss here. Any help would be appreciated. I can give more information on request.
    Last edited: Jul 26, 2021