Table of contents
Preface
This article solves the problem of customizing the resolution of unity output when running
method
After modifying the output and resolution of the following code, mount it on an empty object
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ActiveDisplay : MonoBehaviour {
void Awake() {
for (int i = 0; i < Display.displays.Length; i++) { //There can be multiple outputs, corresponding to multiple displays
Display.displays[i].Activate();
Screen.SetResolution(1920, 1080, true); //Change here to the resolution that needs to be output
}
}
}