Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About SFManager Update Advance

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
515 Views, 3 Replies

About SFManager Update Advance

In The SFCamera.cs LateUpdate()

 

SFMgr.Advance (Time.deltaTime);

 

It's fine,but when i change TimeScale,

timescale will effect UI Update,

 

so i fix 

 

SFMgr.Advance(Time.realtimeSinceStartup - m_fLastRealTime);
m_fLastRealTime = Time.realtimeSinceStartup;

 

 

but that will let UI became fast.

 

Is have any solution not affected timescale.Thanks

3 REPLIES 3
Message 2 of 4
beneton
in reply to: Anonymous

It can be fixed if you extend SFCamera and make SFCamera.LateUpdate virtual.

 

Then, in your SFCamera, you override LateUpdate and make it this way:

 

public override void LateUpdate ()
{
    if ( GAME IS PAUSED ) {
        if (SFMgr != null){
            SFMgr.Advance (lastDeltaTime);
        }
    } else {
        lastDeltaTime = Time.deltaTime;
        base.LateUpdate ();
    }
}

 

I hope it helps,

cheers,

 

beneton

Message 3 of 4
Anonymous
in reply to: beneton

Thanks beneton, It's useful
Message 4 of 4
beneton
in reply to: Anonymous

There is actually a better solution I think.

You can set "AdvanceWhenGamePaused = true;" on your classes that extends Movie.

 

This will make them Advance even when TimeScale is 0. 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report