public void Update()
        {
            if (abcStream == null || streamDescriptor == null)
            {
                return;
            }

            ClampTime();
            if (lastUpdateTime != currentTime || forceUpdate)
            {
                abcStream.vertexMotionScale = vertexMotionScale;
                abcStream.asyncLoad         = asyncLoad;
                if (abcStream.AbcUpdateBegin(startTime + currentTime))
                {
                    lastUpdateTime = currentTime;
                    forceUpdate    = false;
                    updateStarted  = true;
                }
                else
                {
                    abcStream.Dispose();
                    abcStream = null;
                    LoadStream(false);
                }
            }
        }
Exemplo n.º 2
0
 void LateUpdate()
 {
     if (Stream != null && streamDescriptor != null)
     {
         ClampTime();
         if (m_LastUpdateTime != currentTime || m_ForceUpdate)
         {
             if (Stream.AbcUpdate(currentTime + startFrame * streamDescriptor.FrameLength + streamDescriptor.abcStartTime, vertexMotionScale, interpolateSamples))
             {
                 m_LastUpdateTime = currentTime;
                 m_ForceUpdate    = false;
             }
             else
             {
                 Stream.Dispose();
                 LoadStream();
             }
         }
     }
 }