• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
FPS Cap (Desktop Mode / non-VR)

Paid Plugins + Scripts FPS Cap (Desktop Mode / non-VR)

Go to pay site

vamplugins

Active member
Joined
Aug 5, 2022
Messages
85
Reactions
126
vamplugins submitted a new resource:

FPS Cap (Desktop Mode / non-VR) - A small convenience plugin to limit the fps / frames per second in desktop mode

FPS Cap (Desktop Mode / non-VR)
A small convenience plugin to limit the fps / frames per second in desktop mode

Join my Patreon to get instant access to all of my 11 VAM Plugins and future updates:
  • Clothing and Hair Favorites
  • Clothing and Hair Preload Customizations
  • Restrict VR HUD Rotation
  • Delete Obsolete Packages
  • and more
Note: my plugins require an external software: BepInEx, a modding software for Unity games. Virt-A-Mate is made with...

Read more about this resource...
 
FYI - this plugin has the same feature and doesn't require external program

Unless I missed something? I'm only pointing this out as I too created a plugin to do this until I realised it had already been done
 
FYI - this plugin has the same feature and doesn't require external program

Unless I missed something? I'm only pointing this out as I too created a plugin to do this until I realised it had already been done

I haven't tested the plugin you've mentioned, but what my plugin does is that you can enter the coordinates directly, so that you can precisely position or rotate a component. E.g. say you wanted to place a character at precisely ( 100 | 0 | 0 ) or you want to rotate the arm to exactly 45 degrees then you can enter these values directly instead of using the gizmo / handle, which may be more accurate if you want to align multiple objects.
 
Limiting fps is as easy as Application.targetFrameRate = 60;
I don't know why there's a paid plugin for this requiring BepInEx.

In case anyone needs this feature and doesn't want to use the aforementioned MacGruber Essentials, here you go:
Code:
using UnityEngine;

namespace TBD
{
    public class FramerateCap : MVRScript
    {
        private int _originalFramerate;
        private UIDynamicSlider _framerateSlider;
        private JSONStorableFloat _framerate;

        public override void Init()
        {
            _originalFramerate = Application.targetFrameRate;
            _framerate = new JSONStorableFloat("framerate", _originalFramerate, v =>
            {
                if (v < 1) _framerate.val = 1;
                else Application.targetFrameRate = (int)v;
            }, 1f, 140f, false, true);

            RegisterFloat(_framerate);
            _framerateSlider = CreateSlider(_framerate);
        }

        public void OnEnable() => Application.targetFrameRate = (int)_framerate.val;
        public void OnDisable() => Application.targetFrameRate = _originalFramerate;

        public void OnDestroy()
        {
            Application.targetFrameRate = _originalFramerate;

            if (_framerateSlider != null) RemoveSlider(_framerateSlider);
        }
   }
}
 

Attachments

  • TBD.FramerateCap.cs
    1 KB · Views: 0
Back
Top Bottom