diff --git a/Runtime/Utility/Utility.Http.cs b/Runtime/Utility/Utility.Http.cs index 85f0b71..28fe650 100644 --- a/Runtime/Utility/Utility.Http.cs +++ b/Runtime/Utility/Utility.Http.cs @@ -1,6 +1,4 @@ -#if ZSTRING_SUPPORT - -using System.Collections.Generic; +using System.Collections.Generic; using Cysharp.Threading.Tasks; using UnityEngine; using UnityEngine.Networking; @@ -104,4 +102,3 @@ namespace AlicizaX } } } -#endif diff --git a/Runtime/Utility/Utility.Text.cs b/Runtime/Utility/Utility.Text.cs index 1ad1a28..3a1bf0d 100644 --- a/Runtime/Utility/Utility.Text.cs +++ b/Runtime/Utility/Utility.Text.cs @@ -1,10 +1,12 @@ -using Cysharp.Text; +#if ZSTRING_SUPPORT +using Cysharp.Text; +#endif namespace AlicizaX { public static partial class Utility { - public static class Text + public static class Text { /// /// 获取格式化字符串。 @@ -19,8 +21,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg); +#else + return string.Format(format, arg); +#endif } /// @@ -38,8 +43,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2); +#else + return string.Format(format, arg1, arg2); +#endif } /// @@ -59,8 +67,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3); +#else + return string.Format(format, arg1, arg2, arg3); +#endif } /// @@ -82,8 +93,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4); +#else + return string.Format(format, arg1, arg2, arg3, arg4); +#endif } /// @@ -107,8 +121,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5); +#endif } /// @@ -134,8 +151,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6); +#endif } /// @@ -163,8 +183,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +#endif } /// @@ -194,8 +217,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +#endif } /// @@ -227,8 +253,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); +#endif } /// @@ -262,8 +291,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); +#endif } /// @@ -299,8 +331,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); +#endif } /// @@ -338,8 +373,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); +#endif } /// @@ -379,8 +417,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); +#endif } /// @@ -422,8 +463,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); +#endif } /// @@ -467,8 +511,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); +#endif } /// @@ -514,8 +561,11 @@ namespace AlicizaX { throw new GameFrameworkException("Format is invalid."); } - +#if ZSTRING_SUPPORT return ZString.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); +#else + return string.Format(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); +#endif } } }