Skip to content

Instantly share code, notes, and snippets.

@CynicatPro
Created January 21, 2020 06:17
Show Gist options
  • Save CynicatPro/83c07bf65b43ffbd43810ba836653f41 to your computer and use it in GitHub Desktop.
Save CynicatPro/83c07bf65b43ffbd43810ba836653f41 to your computer and use it in GitHub Desktop.
using UnityEngine;
using UnityEngine.XR;
[DefaultExecutionOrder(-10000)]
public class VRSettings : MonoBehaviour {
public float resolutionScale = 1.4f;
void Awake() {
XRSettings.eyeTextureResolutionScale = resolutionScale;
Time.fixedDeltaTime = Time.timeScale / XRDevice.refreshRate;
Application.targetFrameRate = -1;
Application.runInBackground = true;
QualitySettings.maxQueuedFrames = -1;
QualitySettings.vSyncCount = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment