예제 #1
0
        /// <summary>
        /// Overridden to handle synchronizing time on the timeline instance.
        /// </summary>
        /// <param name="playable">The Playable that owns the current PlayableBehaviour.</param>
        /// <param name="info">A FrameData structure that contains information about the current frame context.</param>
        public override void PrepareFrame(Playable playable, FrameData info)
        {
#if UNITY_EDITOR
            if (m_Rebalancer != null)
            {
                m_Rebalancer.Rebalance();
            }
#endif

            // force seek if we are being evaluated
            //  or if our time has jumped. This is used to
            //  resynchronize
            Evaluate(playable, info);
        }
예제 #2
0
        /// <summary>
        /// Overridden to handle synchronizing time on the timeline instance.
        /// </summary>
        /// <param name="playable">The Playable that owns the current PlayableBehaviour.</param>
        /// <param name="info">A FrameData structure that contains information about the current frame context.</param>
        public override void PrepareFrame(Playable playable, FrameData info)
        {
#if UNITY_EDITOR
            if (m_Rebalancer != null)
            {
                m_Rebalancer.Rebalance();
            }
            // avoids loop creating a time offset during framelocked playback
            // if the timeline duration does not fall on a frame boundary.
            if (playableLooped != null && info.timeLooped)
            {
                playableLooped.Invoke(playable);
            }
#endif

            // force seek if we are being evaluated
            //  or if our time has jumped. This is used to
            //  resynchronize
            Evaluate(playable, info);
        }