33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace BFEditor
|
|
{
|
|
public class GameSettingWindow : EditorWindow {
|
|
// private bool NotchScreenSimulate = false;
|
|
|
|
private void Awake () {
|
|
// NotchScreenSimulate = PlayerPrefs.GetInt (BF.SafeAreaManager.NOTCH_SCREEN_SIMULATE, 0) == 1;
|
|
}
|
|
|
|
public GameSettingWindow () {
|
|
titleContent = new GUIContent ("游戏设置");
|
|
}
|
|
void OnGUI () {
|
|
// GUILayout.BeginHorizontal ("刘海屏模拟");
|
|
// bool isSimulate = EditorGUILayout.Toggle ("刘海屏模拟(Editor):", NotchScreenSimulate, GUILayout.Width (300));
|
|
// if (isSimulate != NotchScreenSimulate) {
|
|
// NotchScreenSimulate = isSimulate;
|
|
// PlayerPrefs.SetInt (BF.SafeAreaManager.NOTCH_SCREEN_SIMULATE, NotchScreenSimulate ? 1 : 0);
|
|
// Debug.Log ("Editor模式 刘海屏模拟是否开启:" + NotchScreenSimulate);
|
|
// }
|
|
// GUILayout.EndHorizontal ();
|
|
}
|
|
|
|
public static void ShowWindow () {
|
|
var window = GetWindow<GameSettingWindow> ();
|
|
window.Show ();
|
|
}
|
|
}
|
|
}
|