Search Unity

Objects referenced by track

Discussion in 'Timeline' started by sp-sergio-gil, Jan 19, 2018.

  1. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    Hi!

    Can I have the objects referenced by the track like we are doing in the MixerBehaviour in

    Code (CSharp):
    1. public override void ProcessFrame(Playable playable, FrameData info, object playerData)
    2. {
    3.             var trackBinding = playerData as Transform;
    4.             if(trackBinding == null)
    5.             {
    6.                 return;
    7.             }
    but from the tween behaviour from

    Code (CSharp):
    1. public override void OnGraphStart(Playable playable)
    2.         {
    In my case I'm using the TransformTween example but I want at some point to add a bool called UseCurrentFromValue that will setup the initial startpoint to the current Transform.position