36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class Bule_SceneManager : MonoBehaviour
|
|
{
|
|
public GameObject obj1;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
string[] tmp = File.ReadAllLines(Application.streamingAssetsPath + "/Display1.txt");
|
|
string[] tmps = File.ReadAllLines(Application.streamingAssetsPath + "/Display2.txt");
|
|
|
|
Display.displays[0].Activate();
|
|
//Screen.SetResolution(int.Parse(tmp[0]), int.Parse(tmp[1]), true);
|
|
Display.displays[1].SetRenderingResolution(int.Parse(tmp[0]), int.Parse(tmp[1]));
|
|
Display.displays[1].Activate();
|
|
// Display.displays[1].SetParams(int.Parse(tmps[0]), int.Parse(tmps[1]), 0, 0);
|
|
Display.displays[1].SetRenderingResolution(int.Parse(tmps[0]), int.Parse(tmps[1]));
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.JoystickButton4))
|
|
{
|
|
|
|
SceneManager.LoadScene("main_");
|
|
obj1.SetActive(true);
|
|
}
|
|
}
|
|
}
|