Search Unity

How to use array properties in 2019.2 Timeline

Discussion in 'Timeline' started by kasa_huang, Aug 20, 2019.

  1. kasa_huang

    kasa_huang

    Joined:
    Apr 10, 2015
    Posts:
    2
    Hello everyone,
    In 2019.1 timeline, we can use array properties and serialize it in custom timeline clip.
    like this example

    Code (CSharp):
    1. [System.Serializable]
    2. public class AudioPlayer : PlayableBehaviour
    3. {
    4.    public float m_volume;
    5.    public float[] m_aisacs;
    6. }
    Declare array "m_aisacs".


    In Timeline recording mode, change the Aisacs size in inspector and serialize.


    Then we can modify the array properties' value.

    But same code in 2019.2 Timeline.

    Because custom track has not recording mode, we can't change value in inspector.
    And can't serialize array properties.

    Is there any way to use array properties like in 2019.1 timeline?
    Thanks.
     
    Last edited: Sep 16, 2019
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    That's looks like a bug that was introduced. Off hand the only workaround I'm aware of is to not use an array (use N floats instead) - but that will break any existing data you have animated. Otherwise you may need to try to use the animation window.

    I would expect any data authored with 2019.1 to still work in 2019.2, but this looks like a fix we will need to address. I'd recommend filing a bug. It will give us your exact repro case, plus let you track when the fix lands.
     
    kasa_huang likes this.
  3. kasa_huang

    kasa_huang

    Joined:
    Apr 10, 2015
    Posts:
    2
    Thanks for the help, I will file the bug.
     
    julienb likes this.