refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -13,7 +13,7 @@ namespace Cryville.Common {
/// <param name="s">The file name or file path.</param>
/// <returns>The file name or file path with the extension removed.</returns>
public static string TrimExt(string s) {
return s.Substring(0, s.LastIndexOf("."));
return s[..s.LastIndexOf(".")];
}
/// <summary>
/// Converts the value of a <see cref="TimeSpan" /> to a human-readable string.
@@ -52,12 +52,12 @@ namespace Cryville.Common {
public static string GetProcessPathFromCommand(string command) {
command = command.Trim();
if (command[0] == '"') {
return command.Substring(1, command.IndexOf('"', 1) - 1);
return command[1..command.IndexOf('"', 1)];
}
else {
int e = command.IndexOf(' ');
if (e == -1) return command;
else return command.Substring(0, e);
else return command[..e];
}
}
}