AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.FPS

Property  -  Static Read Only

Type

int

Description

The target Frames Per Second (FPS) as set by IRetroBlitGame.QueryHardware. The FPS value reflects how many times IRetroBlitGame.Update will be called per second. Depending on system load it may not always be possible for RetroBlit to reach this framerate in realtime, it may potentially lag behind and catch up on subsequent frames.

RB.FPS is equivalent to (1.0f / RB.UpdateInterval).

Internally this property maps to the Unity property Application.targetFrameRate.

Example

void Render()
{
    RB.Print(Vector2i.zero, Color.white, "Target FPS: " + RB.FPS);
}

See Also

RB.UpdateInterval
IRetroBlitGame.Update
IRetroBlitGame.QueryHardware