Search Unity

Question Assigning a Marker, on a public field on a Marker.

Discussion in 'Timeline' started by CyRaid, Oct 28, 2021.

  1. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    As the subject says, I can't drag a Marker to the inspector, how would I set (for example, in my case), drag a 'time marker' to the 'travel marker' (which when it reaches it, it rewinds back to the time marker).

    Edit: Let's make it a bit more clear. Let's say on TravelMarker you have a serialized field called 'timeMarker', and when it shows up in the inspector, you want to try and click and drag one of your markers to that field, but you can't.
     
    Last edited: Oct 28, 2021
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I assume you are creating a custom TravelMarker marker class, with a property of type TimeMarker (another custom Marker class you create)? If I have understood correctly, I found this YouTube video helpful putting it all together:
     
  3. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    Thank you for the reply, though I didn't quite get where he assigned the marker from the timeline to another marker.
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    He didn't assign a marker specifically. In your case you would have a property of type "Marker" (or the IMarker interface in inherits from) I assume. I was not sure what you were doing at present from your post, so just making guesses.
     
  5. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    Oh, I should probably see if I can make my question a bit more clear. Thanks for the feedback on the question!