Add this component to any object and it'll set the target frame rate and vsync count. Note that vsync count must be 0 for the target FPS to work.
More...
|
int | TargetFPS = 300 |
| the target FPS you want the game to run at, that's up to how many times Update will run every second More...
|
|
int | RenderFrameInterval = 0 |
| the number of frames to wait before rendering the next one. 0 will render every frame, 1 will render every 2 frames, 5 will render every 5 frames, etc More...
|
|
int | VSyncCount = 0 |
| whether vsync should be enabled or not (on a 60Hz screen, 1 : 60fps, 2 : 30fps, 0 : don't wait for vsync) More...
|
|
bool | EnableNumberShortcuts = false |
| if this is true, the user can press a number key to change the target FPS (1 : 10fps, 2 : 20fps, etc) More...
|
|
|
virtual void | Start () |
| On start we change our target fps and vsync settings More...
|
|
virtual void | Update () |
| On update we check for input if needed More...
|
|
virtual void | OnValidate () |
| When a value gets changed in the editor, we update our settings More...
|
|
virtual void | UpdateSettings () |
| Updates the target frame rate value and vsync count setting More...
|
|
virtual void | HandleInput () |
| Checks for presses on 0-9 keys and changes the target FPS accordingly More...
|
|
Add this component to any object and it'll set the target frame rate and vsync count. Note that vsync count must be 0 for the target FPS to work.
◆ HandleInput()
virtual void MoreMountains.Tools.MMFPSUnlock.HandleInput |
( |
| ) |
|
|
protectedvirtual |
Checks for presses on 0-9 keys and changes the target FPS accordingly
◆ OnValidate()
virtual void MoreMountains.Tools.MMFPSUnlock.OnValidate |
( |
| ) |
|
|
protectedvirtual |
When a value gets changed in the editor, we update our settings
◆ Start()
virtual void MoreMountains.Tools.MMFPSUnlock.Start |
( |
| ) |
|
|
protectedvirtual |
On start we change our target fps and vsync settings
◆ Update()
virtual void MoreMountains.Tools.MMFPSUnlock.Update |
( |
| ) |
|
|
protectedvirtual |
On update we check for input if needed
◆ UpdateSettings()
virtual void MoreMountains.Tools.MMFPSUnlock.UpdateSettings |
( |
| ) |
|
|
protectedvirtual |
Updates the target frame rate value and vsync count setting
◆ EnableNumberShortcuts
bool MoreMountains.Tools.MMFPSUnlock.EnableNumberShortcuts = false |
if this is true, the user can press a number key to change the target FPS (1 : 10fps, 2 : 20fps, etc)
◆ RenderFrameInterval
int MoreMountains.Tools.MMFPSUnlock.RenderFrameInterval = 0 |
the number of frames to wait before rendering the next one. 0 will render every frame, 1 will render every 2 frames, 5 will render every 5 frames, etc
◆ TargetFPS
int MoreMountains.Tools.MMFPSUnlock.TargetFPS = 300 |
the target FPS you want the game to run at, that's up to how many times Update will run every second
◆ VSyncCount
int MoreMountains.Tools.MMFPSUnlock.VSyncCount = 0 |
whether vsync should be enabled or not (on a 60Hz screen, 1 : 60fps, 2 : 30fps, 0 : don't wait for vsync)
The documentation for this class was generated from the following file:
- F:/Github/Store/Feel/Assets/Feel/MMTools/Accessories/MMPerformance/MMFPSUnlock.cs