Skip to content

Commit f30cfdd

Browse files
committed
[修改]1. 修改默认开放系统信息命令
1 parent 00d95a4 commit f30cfdd

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Runtime/DebugLogConsole.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ static DebugLogConsole()
131131
AddCommand("help", "Prints all commands", LogAllCommands);
132132
AddCommand<string>("help", "Prints all matching commands", LogAllCommandsWithName);
133133
#endif
134-
#if IDG_ENABLE_HELPER_COMMANDS || IDG_ENABLE_SYSINFO_COMMAND
135-
AddCommand( "sysinfo", "Prints system information", LogSystemInfo );
136-
#endif
134+
AddCommand("sysinfo", "Prints system information", LogSystemInfo);
135+
137136

138137
#if UNITY_EDITOR || !NETFX_CORE
139138
// Find all [ConsoleMethod] functions
@@ -294,11 +293,11 @@ public static void LogSystemInfo()
294293
{
295294
StringBuilder stringBuilder = new StringBuilder(1024);
296295
stringBuilder.Append("Rig: ").AppendSysInfoIfPresent(SystemInfo.deviceModel).AppendSysInfoIfPresent(SystemInfo.processorType)
297-
.AppendSysInfoIfPresent(SystemInfo.systemMemorySize, "MB RAM").Append(SystemInfo.processorCount).Append(" cores\n");
296+
.AppendSysInfoIfPresent(SystemInfo.systemMemorySize, "MB RAM").Append(SystemInfo.processorCount).Append(" cores\n");
298297
stringBuilder.Append("OS: ").Append(SystemInfo.operatingSystem).Append("\n");
299298
stringBuilder.Append("GPU: ").Append(SystemInfo.graphicsDeviceName).Append(" ").Append(SystemInfo.graphicsMemorySize)
300-
.Append("MB ").Append(SystemInfo.graphicsDeviceVersion)
301-
.Append(SystemInfo.graphicsMultiThreaded ? " multi-threaded\n" : "\n");
299+
.Append("MB ").Append(SystemInfo.graphicsDeviceVersion)
300+
.Append(SystemInfo.graphicsMultiThreaded ? " multi-threaded\n" : "\n");
302301
stringBuilder.Append("Data Path: ").Append(Application.dataPath).Append("\n");
303302
stringBuilder.Append("Persistent Data Path: ").Append(Application.persistentDataPath).Append("\n");
304303
stringBuilder.Append("StreamingAssets Path: ").Append(Application.streamingAssetsPath).Append("\n");
@@ -629,7 +628,7 @@ private static void AddCommand(string command, string description, MethodInfo me
629628
int parameterSignatureStartIndex = methodSignature.Length;
630629

631630
methodSignature.Append("[").Append(GetTypeReadableName(parameterTypes[i])).Append(" ")
632-
.Append((parameterNames != null && i < parameterNames.Length && !string.IsNullOrEmpty(parameterNames[i])) ? parameterNames[i] : parameters[i].Name).Append("]");
631+
.Append((parameterNames != null && i < parameterNames.Length && !string.IsNullOrEmpty(parameterNames[i])) ? parameterNames[i] : parameters[i].Name).Append("]");
633632

634633
if (i < parameterTypes.Length - 1)
635634
methodSignature.Append(" ");
@@ -737,8 +736,8 @@ public static string GetAutoCompleteCommand(string commandStart, string previous
737736
{
738737
commandIndex = ~commandIndex;
739738
return (commandIndex < methods.Count && caseInsensitiveComparer.IsPrefix(methods[commandIndex].command, commandStart, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace))
740-
? methods[commandIndex].command
741-
: null;
739+
? methods[commandIndex].command
740+
: null;
742741
}
743742

744743
// Find the next command that starts with commandStart and is different from previousSuggestion

0 commit comments

Comments
 (0)