Search Unity

a timeline in a prefab has its playableAssets.outputs.Count incomplete on first mobile device run.

Discussion in 'Timeline' started by andreivictor, Apr 18, 2019.

  1. andreivictor

    andreivictor

    Joined:
    Jun 26, 2018
    Posts:
    3
    Hi we are using 2017.3.1p1 and we are encountering a very weird problem on a prefab containing a timeline asset and PlayableDirector when run on a mobile device (Android/IOS) for the first time.

    1. We load the assetbundle which has the prefab
    2. I check the contents of the playableAssets.outputs of the prefab and the contents are only 2 but the expected is 6.
    3. Obviously, this caused the Instantiated timeline cutscene we made are missing a lot of stuff. (we iterate the outputs to perform a SetGenericBinding)
    4. We replay steps 1-3 over and over and the problem still persists.
    5. It only gets fixed (playableAssets.outputs.Count is 6 as expected) when we kill the app and load it up again. It will work from then on.

    I made several tests to confirm it is not the asset bundle loading or any of the activities prior to playing the cutscene is causing it. We are just puzzled on how this happens and how to make this work properly without requiring to kill and then load the app.

    This problem doesn't occur on Editor.
     
    Last edited: Apr 18, 2019
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    That's strange. Do you know what type of tracks it loads and what type it doesn't?
     
  3. andreivictor

    andreivictor

    Joined:
    Jun 26, 2018
    Posts:
    3
    @seant_unity : Thank you for replying for my inquiry. With your question on the type, I re-did my tests while displaying the information requested.

    Let me first show the problematic prefab content:

    The binding information as follows:
    A: modifies Transform position and rotation; and this will be SetGenericBinding at runtime.
    B: contains AnimationClips to be played; and this will be SetGenericBinding at runtime.
    C: contains playback of sounds
    D: modifies Transform position; and this will be SetGenericBinding at runtime.
    E: animator that plays an animation idle state; and this will be SetGenericBinding at runtime.
    F: modifies Transform position and rotation, and Camera.field of view

    I printed out the bindings of the prefab at runtime. In my version of unity I printed out the PlayableBinding.sourceBindingType.Name.

    When the problem happens (outputs.Count = 2), only bindings C (Audio Source) & E (Animator) are available.

    When the problem doesn't happen (outputs.Count = 6), all bindings are there and types are as follows:
    A (null), B (null), C (AudioSource), D (null), E (Animator), F (null)

    What's interesting in printing out the types as per your request, is that all bindings with null types didn't appear on the problematic case. Although, I don't know what that implies, or if its the cause, or what to do about it.