using UnityEngine; using UnityEngine.XR; public class XRResolutionSettings : MonoBehaviour { [Range(1.0f, 4.0f)] public float resolutionScale = 1.5f; // 可通过Inspector调整 void Start() { // 设置Eye Buffer分辨率缩放 XRSettings.eyeTextureResolutionScale = resolutionScale; Debug.Log($"XR渲染分辨率缩放已设置为: {resolutionScale}"); } }