void Update()
    {
        if (mMovie == null)
        {
            return;
        }

        mTime += Time.deltaTime * mTimeMultipler;
        mMovie.SetTime(mTime);
        mMovie.Update();
        string Line = mMovie.UpdateString(false);

        if (Line != null)
        {
            if (mLines == null)
            {
                mLines = new List <string>();
            }

            mLines.Add(Line);

            if (mLines.Count > mMaxLines)
            {
                mLines.RemoveRange(0, mLines.Count - mMaxLines);
            }
        }
    }
    void UpdateMovie()
    {
        //	queue not initialised (we haven't started)
        if (mFilenameQueue == null)
        {
            return;
        }

        //	see if movie is finished to move onto next
        if (mMovie != null)
        {
            //	update time
            MovieTime += Time.deltaTime * MovieTimeScalar;
            mMovie.SetTime(MovieTime);


            //	check duration
            var Duration    = mMovie.GetDurationMs();
            var CurrentTime = mMovie.GetTimeMs();
            if (Duration > 0 && CurrentTime >= Duration)
            {
                mMovie = null;
                System.GC.Collect();
            }
            else
            {
                //Debug.Log("Current duration: " + CurrentTime + "/" + Duration );
            }
        }

        //	need to alloc next
        if (mMovie == null)
        {
            if (mFilenameQueue.Count == 0)
            {
                Debug.Log("queue finished.... ");
                OnFinished();
                return;
            }

            var Filename = mFilenameQueue [0];
            mFilenameQueue.RemoveAt(0);

            try {
                mMovie = new PopMovie(Filename, MovieParameters);

                if (mEnableDebugLog)
                {
                    PopMovie.EnableDebugLog = true;
                }
            } catch (System.Exception e) {
                Debug.LogError("Error creating movie; " + e.Message);
                if (mErrorText != null)
                {
                    mErrorText.text = e.Message;
                }
            }
        }

        if (mMovie != null)
        {
            mMovie.Update();
        }
    }