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

@@ -35,8 +35,8 @@ namespace Cryville.Common {
return null;
else if (type.IsAssignableFrom(value.GetType()))
return value;
else if (type.IsEnum && value is string) {
return Enum.Parse(type, (string)value);
else if (type.IsEnum && value is string strValue) {
return Enum.Parse(type, strValue);
}
throw new InvalidCastException(string.Format("Cannot cast {0} to {1}", value.GetType(), type));
}