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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Traverse all PlayableDirector ExposedReferences

Discussion in 'Timeline' started by Flag74, Nov 30, 2018.

  1. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    Is there a way to iterate through PlayableDirector ExposedReferences ? (I have to clear some values that I don't know the PropertyNameID of)
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    There isn't an API to do that. You can probably do it using SerializedObjects/Properties - it's an array of PropertyName, Object pairs named "m_ExposedReferences".

    There is a ClearReferenceValue, but you need to know the name of the property you want for that.
     
  3. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    too bad :(
    Do you know if there's a way to mantain unique ids for Timeline clips?
    I can generate a GUID if it is null but every time a clip is duplicated, the id is duplicated too and it looks like there's no way to know if a clip is created by duplicating it?
    any solution/workaround?
    thx
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Are you using the editor or script or duplicate? Duplicating a clip in editor should create a unique id for any exposed references, but maybe you have a case that we aren't accounting for?
     
  5. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    Using editor's Duplicate command. I have custom Track/Clip with a custom exposed references manager.
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Sorry for the delayed reply - feel free to file a bug with a repro case and we will have a look.