技能主要更新,修复卡顿并加入动画,以及各种其他更新。
This commit is contained in:
@@ -66,7 +66,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (resolution_Dropdown == null) return;
|
||||
if (tempFreeResOptionIndex >= 0) return;
|
||||
var opt = new Dropdown.OptionData("自由分辨率");
|
||||
var opt = new Dropdown.OptionData("���ɷֱ���");
|
||||
resolution_Dropdown.options.Add(opt);
|
||||
tempFreeResOptionIndex = resolution_Dropdown.options.Count - 1;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (screenMode_Dropdown == null) return;
|
||||
|
||||
var options = new List<string>() { "窗口(自由窗口)", "全屏(自适应)", "无边框窗口" };
|
||||
var options = new List<string>() { "����(���ɴ���)", "ȫ��(����Ӧ)", "�ޱ߿�" };
|
||||
screenMode_Dropdown.ClearOptions();
|
||||
screenMode_Dropdown.AddOptions(options);
|
||||
|
||||
@@ -141,21 +141,21 @@ public class graphicSettings : MonoBehaviour
|
||||
Screen.fullScreen = false;
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ApplyWindowStyleNextFrame(true));
|
||||
Screen.SetResolution(Screen.width, Screen.height, FullScreenMode.Windowed);
|
||||
Screen.SetResolution(Screen.width, Screen.height, FullScreenMode.Windowed, Screen.currentResolution.refreshRateRatio);
|
||||
}
|
||||
else if (index == 1)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
|
||||
Screen.fullScreen = true;
|
||||
Resolution res = Screen.currentResolution;
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.ExclusiveFullScreen, res.refreshRate);
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.ExclusiveFullScreen, res.refreshRateRatio);
|
||||
}
|
||||
else if (index == 2)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
|
||||
Screen.fullScreen = true;
|
||||
Resolution res = Screen.currentResolution;
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.FullScreenWindow, res.refreshRate);
|
||||
Screen.SetResolution(res.width, res.height, FullScreenMode.FullScreenWindow, res.refreshRateRatio);
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ApplyWindowStyleNextFrame(false));
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class graphicSettings : MonoBehaviour
|
||||
|
||||
foreach (var r in availableResolutions)
|
||||
{
|
||||
options.Add($"{r.x} × {r.y}");
|
||||
options.Add($"{r.x} �� {r.y}");
|
||||
}
|
||||
|
||||
resolution_Dropdown.ClearOptions();
|
||||
@@ -292,7 +292,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
resolution_Dropdown.SetValueWithoutNotify(savedResIndex);
|
||||
var sav = availableResolutions[savedResIndex];
|
||||
Screen.SetResolution(sav.x, sav.y, Screen.fullScreenMode, Screen.currentResolution.refreshRate);
|
||||
Screen.SetResolution(sav.x, sav.y, Screen.fullScreenMode, Screen.currentResolution.refreshRateRatio);
|
||||
RemoveTempFreeOptionIfExists();
|
||||
}
|
||||
else if (savedResIndex == -1)
|
||||
@@ -301,9 +301,9 @@ public class graphicSettings : MonoBehaviour
|
||||
int ch = PlayerPrefs.GetInt("customResH", -1);
|
||||
if (cw > 0 && ch > 0)
|
||||
{
|
||||
Screen.SetResolution(cw, ch, Screen.fullScreenMode, Screen.currentResolution.refreshRate);
|
||||
Screen.SetResolution(cw, ch, Screen.fullScreenMode, Screen.currentResolution.refreshRateRatio);
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} × {ch}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} �� {ch}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ public class graphicSettings : MonoBehaviour
|
||||
else
|
||||
{
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} × {Screen.height}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} �� {Screen.height}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
}
|
||||
@@ -355,8 +355,7 @@ public class graphicSettings : MonoBehaviour
|
||||
if (index >= availableResolutions.Count) return;
|
||||
var r = availableResolutions[index];
|
||||
FullScreenMode mode = Screen.fullScreenMode;
|
||||
int refresh = Screen.currentResolution.refreshRate;
|
||||
Screen.SetResolution(r.x, r.y, mode, refresh);
|
||||
Screen.SetResolution(r.x, r.y, mode, Screen.currentResolution.refreshRateRatio);
|
||||
PlayerPrefs.SetInt("resolutionIndex", index);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
@@ -373,7 +372,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (frameRate_Dropdown == null) return;
|
||||
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "无限制", "垂直同步" };
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "������", "��ֱͬ��" };
|
||||
frameRate_Dropdown.ClearOptions();
|
||||
frameRate_Dropdown.AddOptions(fpsOptions);
|
||||
|
||||
@@ -433,13 +432,13 @@ public class graphicSettings : MonoBehaviour
|
||||
}
|
||||
else if (index == fpsValues.Length)
|
||||
{
|
||||
// 无限制
|
||||
// ������
|
||||
QualitySettings.vSyncCount = 0;
|
||||
Application.targetFrameRate = -1; // unlimited / platform default
|
||||
}
|
||||
else if (index == fpsValues.Length + 1)
|
||||
{
|
||||
// 垂直同步
|
||||
// ��ֱͬ��
|
||||
QualitySettings.vSyncCount = 1; // enable vsync
|
||||
Application.targetFrameRate = -1;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class readDeviceInfo : MonoBehaviour
|
||||
{
|
||||
string str;
|
||||
if (value == null) str = "";
|
||||
else if (value is bool b) str = b ? "启用" : "禁用";
|
||||
else if (value is bool b) str = b ? "����" : "����";
|
||||
else str = value.ToString();
|
||||
|
||||
sb.AppendLine($"<b>{title}</b>");
|
||||
@@ -60,46 +60,46 @@ public class readDeviceInfo : MonoBehaviour
|
||||
}
|
||||
|
||||
AddEntry("ƽ̨", Application.platform.ToString());
|
||||
AddEntry("运行目录", Application.dataPath);
|
||||
AddEntry("persistent 数据路径", Application.persistentDataPath);
|
||||
AddEntry("����Ŀ¼", Application.dataPath);
|
||||
AddEntry("persistent ����·��", Application.persistentDataPath);
|
||||
|
||||
AddEntry("操作系统", SystemInfo.operatingSystem);
|
||||
AddEntry("设备名称", SystemInfo.deviceName);
|
||||
AddEntry("设备型号", SystemInfo.deviceModel);
|
||||
AddEntry("设备唯一ID", SystemInfo.deviceUniqueIdentifier);
|
||||
AddEntry("����ϵͳ", SystemInfo.operatingSystem);
|
||||
AddEntry("�豸����", SystemInfo.deviceName);
|
||||
AddEntry("�豸�ͺ�", SystemInfo.deviceModel);
|
||||
AddEntry("�豸ΨһID", SystemInfo.deviceUniqueIdentifier);
|
||||
|
||||
AddEntry("CPU", SystemInfo.processorType);
|
||||
AddEntry("CPU核心数", SystemInfo.processorCount);
|
||||
AddEntry("系统内存 (MB)", SystemInfo.systemMemorySize);
|
||||
AddEntry("CPU������", SystemInfo.processorCount);
|
||||
AddEntry("ϵͳ�ڴ� (MB)", SystemInfo.systemMemorySize);
|
||||
|
||||
AddEntry("图形设备名称", SystemInfo.graphicsDeviceName);
|
||||
AddEntry("图形设备供应商", SystemInfo.graphicsDeviceVendor);
|
||||
AddEntry("ͼ���豸����", SystemInfo.graphicsDeviceName);
|
||||
AddEntry("ͼ���豸��Ӧ��", SystemInfo.graphicsDeviceVendor);
|
||||
AddEntry("DirectX", SystemInfo.graphicsDeviceType.ToString());
|
||||
AddEntry("显存 (MB)", SystemInfo.graphicsMemorySize);
|
||||
AddEntry("�Դ� (MB)", SystemInfo.graphicsMemorySize);
|
||||
|
||||
AddEntry("屏幕分辨率", $"{Screen.currentResolution.width} x {Screen.currentResolution.height} @ {Screen.currentResolution.refreshRate}Hz");
|
||||
AddEntry("屏幕DPI", Screen.dpi);
|
||||
AddEntry("显示模式", Screen.fullScreenMode.ToString());
|
||||
AddEntry("��Ļ�ֱ���", $"{Screen.currentResolution.width} x {Screen.currentResolution.height} @ {Screen.currentResolution.refreshRateRatio.value:0.##}Hz");
|
||||
AddEntry("��ĻDPI", Screen.dpi);
|
||||
AddEntry("��ʾģʽ", Screen.fullScreenMode.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
AddEntry("电池电量", $"{SystemInfo.batteryLevel * 100:F0}%");
|
||||
AddEntry("��ص���", $"{SystemInfo.batteryLevel * 100:F0}%");
|
||||
}
|
||||
catch
|
||||
{
|
||||
AddEntry("电池状态", "不支持");
|
||||
AddEntry("���״̬", "��֧��");
|
||||
}
|
||||
|
||||
AddEntry("浮动·本索尼克谱面编辑器", "v1.1h02e");
|
||||
AddEntry("浮动·浮动小游戏引擎", "v1.301");
|
||||
AddEntry("本游戏版本号", "code::testingVersion1062");
|
||||
AddEntry("登录渠道", "Steam Client");
|
||||
AddEntry("�����������������༭��", "v1.1h02e");
|
||||
AddEntry("����������С��Ϸ����", "v1.301");
|
||||
AddEntry("����Ϸ�汾��", "code::testingVersion1062");
|
||||
AddEntry("��¼����", "Steam Client");
|
||||
|
||||
AddEntry(".NET Framework", "8.0 +");
|
||||
AddEntry("最大纹理尺寸", SystemInfo.maxTextureSize);
|
||||
AddEntry("��������ߴ�", SystemInfo.maxTextureSize);
|
||||
|
||||
AddEntry("禁用后台运行", Application.runInBackground);
|
||||
AddEntry("多线程渲染", SystemInfo.graphicsMultiThreaded);
|
||||
AddEntry("���ú�̨����", Application.runInBackground);
|
||||
AddEntry("���߳���Ⱦ", SystemInfo.graphicsMultiThreaded);
|
||||
|
||||
string output = sb.ToString();
|
||||
|
||||
@@ -138,7 +138,7 @@ public class readDeviceInfo : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
string path = UnityEditor.EditorUtility.SaveFilePanel("保存设备信息", desktop, "device_info", "txt");
|
||||
string path = UnityEditor.EditorUtility.SaveFilePanel("�����豸��Ϣ", desktop, "device_info", "txt");
|
||||
return string.IsNullOrEmpty(path) ? null : path;
|
||||
#elif UNITY_STANDALONE_WIN
|
||||
try
|
||||
@@ -152,7 +152,7 @@ public class readDeviceInfo : MonoBehaviour
|
||||
ofn.fileTitle = new string('\0', 260);
|
||||
ofn.maxFileTitle = ofn.fileTitle.Length;
|
||||
ofn.initialDir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
ofn.title = "保存设备信息";
|
||||
ofn.title = "�����豸��Ϣ";
|
||||
ofn.defExt = "txt";
|
||||
ofn.flags = OpenFileNameFlags.OFN_OVERWRITEPROMPT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user