Skip to content

Commit dd6542d

Browse files
author
Jiang Yin
committed
调整 Debugger
1 parent c06eb45 commit dd6542d

11 files changed

+35
-63
lines changed

Scripts/Runtime/Debugger/DebuggerComponent.EnvironmentInformationWindow.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
using GameFramework;
99
using UnityEngine;
10+
#if UNITY_5_5_OR_NEWER
11+
using UnityEngine.Rendering;
12+
#endif
1013

1114
namespace UnityGameFramework.Runtime
1215
{
@@ -62,7 +65,9 @@ protected override void OnDrawScrollableWindow()
6265
DrawItem("Internet Reachability:", Application.internetReachability.ToString());
6366
DrawItem("Background Loading Priority:", Application.backgroundLoadingPriority.ToString());
6467
DrawItem("Is Playing:", Application.isPlaying.ToString());
65-
#if UNITY_5_3 || UNITY_5_4
68+
#if UNITY_5_5_OR_NEWER
69+
DrawItem("Splash Screen Is Finished:", SplashScreen.isFinished.ToString());
70+
#else
6671
DrawItem("Is Showing Splash Screen:", Application.isShowingSplashScreen.ToString());
6772
#endif
6873
DrawItem("Run In Background:", Application.runInBackground.ToString());

Scripts/Runtime/Debugger/DebuggerComponent.OperationSettingsWindow.cs renamed to Scripts/Runtime/Debugger/DebuggerComponent.OperationsWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ namespace UnityGameFramework.Runtime
1111
{
1212
public partial class DebuggerComponent
1313
{
14-
private sealed class OperationSettingsWindow : ScrollableDebuggerWindowBase
14+
private sealed class OperationsWindow : ScrollableDebuggerWindowBase
1515
{
1616
protected override void OnDrawScrollableWindow()
1717
{
18-
GUILayout.Label("<b>Operation Settings</b>");
18+
GUILayout.Label("<b>Operations</b>");
1919
GUILayout.BeginVertical("box");
2020
{
2121
ObjectPoolComponent objectPoolComponent = GameEntry.GetComponent<ObjectPoolComponent>();

Scripts/Runtime/Debugger/DebuggerComponent.OperationSettingsWindow.cs.meta renamed to Scripts/Runtime/Debugger/DebuggerComponent.OperationsWindow.cs.meta

File renamed without changes.

Scripts/Runtime/Debugger/DebuggerComponent.QualityInformationWindow.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,26 @@ public partial class DebuggerComponent
1313
{
1414
private sealed class QualityInformationWindow : ScrollableDebuggerWindowBase
1515
{
16+
private bool m_ApplyExpensiveChanges = false;
17+
1618
protected override void OnDrawScrollableWindow()
1719
{
20+
GUILayout.Label("<b>Quality Level</b>");
21+
GUILayout.BeginVertical("box");
22+
{
23+
int currentQualityLevel = QualitySettings.GetQualityLevel();
24+
25+
DrawItem("Current Quality Level:", QualitySettings.names[currentQualityLevel]);
26+
m_ApplyExpensiveChanges = GUILayout.Toggle(m_ApplyExpensiveChanges, "Apply expensive changes on quality level change.");
27+
28+
int newQualityLevel = GUILayout.SelectionGrid(currentQualityLevel, QualitySettings.names, 3, "toggle");
29+
if (newQualityLevel != currentQualityLevel)
30+
{
31+
QualitySettings.SetQualityLevel(newQualityLevel, m_ApplyExpensiveChanges);
32+
}
33+
}
34+
GUILayout.EndVertical();
35+
1836
GUILayout.Label("<b>Rendering Information</b>");
1937
GUILayout.BeginVertical("box");
2038
{
@@ -27,6 +45,7 @@ protected override void OnDrawScrollableWindow()
2745
DrawItem("Anti Aliasing:", QualitySettings.antiAliasing.ToString());
2846
DrawItem("Realtime Reflection Probes:", QualitySettings.realtimeReflectionProbes.ToString());
2947
DrawItem("Billboards Face Camera Position:", QualitySettings.billboardsFaceCameraPosition.ToString());
48+
DrawItem("Resolution Scaling Fixed DPI Factor:", QualitySettings.resolutionScalingFixedDPIFactor.ToString());
3049
}
3150
GUILayout.EndVertical();
3251

@@ -41,6 +60,7 @@ protected override void OnDrawScrollableWindow()
4160
#endif
4261
DrawItem("Shadow Projection:", QualitySettings.shadowProjection.ToString());
4362
DrawItem("Shadow Distance:", QualitySettings.shadowDistance.ToString());
63+
DrawItem("Shadowmask Mode:", QualitySettings.shadowmaskMode.ToString());
4464
DrawItem("Shadow Near Plane Offset:", QualitySettings.shadowNearPlaneOffset.ToString());
4565
DrawItem("Shadow Cascades:", QualitySettings.shadowCascades.ToString());
4666
DrawItem("Shadow Cascade 2 Split:", QualitySettings.shadowCascade2Split.ToString());

Scripts/Runtime/Debugger/DebuggerComponent.QualitySettingsWindow.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

Scripts/Runtime/Debugger/DebuggerComponent.QualitySettingsWindow.cs.meta

Lines changed: 0 additions & 12 deletions
This file was deleted.

Scripts/Runtime/Debugger/DebuggerComponent.SceneInformationWindow.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ protected override void OnDrawScrollableWindow()
2828
DrawItem("Active Scene Build Index:", activeScene.buildIndex.ToString());
2929
DrawItem("Active Scene Is Dirty:", activeScene.isDirty.ToString());
3030
DrawItem("Active Scene Is Loaded:", activeScene.isLoaded.ToString());
31+
DrawItem("Active Scene Is Valid:", activeScene.IsValid().ToString());
3132
DrawItem("Active Scene Root Count:", activeScene.rootCount.ToString());
3233
}
3334
GUILayout.EndVertical();

Scripts/Runtime/Debugger/DebuggerComponent.GeneralSettingsWindow.cs renamed to Scripts/Runtime/Debugger/DebuggerComponent.SettingsWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace UnityGameFramework.Runtime
1212
{
1313
public partial class DebuggerComponent
1414
{
15-
private sealed class GeneralSettingsWindow : ScrollableDebuggerWindowBase
15+
private sealed class SettingsWindow : ScrollableDebuggerWindowBase
1616
{
1717
private DebuggerComponent m_DebuggerComponent = null;
1818
private SettingComponent m_SettingComponent = null;

Scripts/Runtime/Debugger/DebuggerComponent.GeneralSettingsWindow.cs.meta renamed to Scripts/Runtime/Debugger/DebuggerComponent.SettingsWindow.cs.meta

File renamed without changes.

Scripts/Runtime/Debugger/DebuggerComponent.TimeInformationWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected override void OnDrawScrollableWindow()
4040
#endif
4141
DrawItem("Frame Count", Time.frameCount.ToString());
4242
DrawItem("Rendered Frame Count", Time.renderedFrameCount.ToString());
43-
DrawItem("Capture Frame Rate", Time.captureFramerate.ToString());
43+
DrawItem("Capture Framerate", Time.captureFramerate.ToString());
4444
#if UNITY_5_6_OR_NEWER
4545
DrawItem("In Fixed Time Step", Time.inFixedTimeStep.ToString());
4646
#endif

0 commit comments

Comments
 (0)