浏览代码
Package updates happened, so I need to update the packages, but I don't want to bring in the branch with the existing rate limiting workaround at the same time. So, this is its own changeset. This should match the state of the closed_beta_package_update branch.
/main/staging/rate_limit_data
Package updates happened, so I need to update the packages, but I don't want to bring in the branch with the existing rate limiting workaround at the same time. So, this is its own changeset. This should match the state of the closed_beta_package_update branch.
/main/staging/rate_limit_data
nathaniel.buck@unity3d.com
3 年前
当前提交
2bd692a3
共有 238 个文件被更改,包括 723 次插入 和 693 次删除
-
1Assets/Scripts/Lobby/LobbyAPIInterface.cs
-
16Packages/com.unity.services.authentication/CHANGELOG.md
-
20Packages/com.unity.services.authentication/Editor/AuthenticationAdminClient.cs
-
4Packages/com.unity.services.authentication/Editor/AuthenticationAdminNetworkClient.cs
-
1Packages/com.unity.services.authentication/Editor/AuthenticationIdentifier.cs
-
2Packages/com.unity.services.authentication/Editor/AuthenticationSettingsElement.cs
-
3Packages/com.unity.services.authentication/Editor/IAuthenticationAdminClient.cs
-
2Packages/com.unity.services.authentication/Editor/IdProviderElement.cs
-
2Packages/com.unity.services.authentication/LICENSE.md
-
2Packages/com.unity.services.authentication/README.md
-
26Packages/com.unity.services.authentication/Runtime/AuthenticationAsyncOperation.cs
-
49Packages/com.unity.services.authentication/Runtime/AuthenticationNetworkClient.cs
-
10Packages/com.unity.services.authentication/Runtime/AuthenticationService.cs
-
53Packages/com.unity.services.authentication/Runtime/AuthenticationServiceInternal.cs
-
2Packages/com.unity.services.authentication/Runtime/Core/AccessTokenComponent.cs
-
20Packages/com.unity.services.authentication/Runtime/Core/AuthenticationPackageInitializer.cs
-
1Packages/com.unity.services.authentication/Runtime/Core/PlayerIdComponent.cs
-
100Packages/com.unity.services.authentication/Runtime/IAuthenticationService.cs
-
14Packages/com.unity.services.authentication/Runtime/JwtDecoder.cs
-
15Packages/com.unity.services.authentication/Runtime/Unity.Services.Authentication.api
-
3Packages/com.unity.services.authentication/Runtime/Unity.Services.Authentication.asmdef
-
164Packages/com.unity.services.authentication/Runtime/Utilities/Logger.cs
-
14Packages/com.unity.services.authentication/Runtime/Utilities/Logger.cs.meta
-
11Packages/com.unity.services.authentication/Runtime/Utilities/NetworkingUtilities.cs
-
34Packages/com.unity.services.authentication/Runtime/Utilities/WebRequest.cs
-
10Packages/com.unity.services.authentication/package.json
-
27Packages/com.unity.services.core/CHANGELOG.md
-
6Packages/com.unity.services.core/Editor/Core/BackendHelpers/JsonHelper.cs
-
26Packages/com.unity.services.core/Editor/Core/BackendHelpers/UnityWebRequestHelper.cs
-
33Packages/com.unity.services.core/Editor/Core/Configuration/ProjectConfigurationBuilder.cs
-
3Packages/com.unity.services.core/Editor/Core/Configuration/Unity.Services.Core.Configuration.Editor.asmdef
-
12Packages/com.unity.services.core/Editor/Core/EditorGameService/DefaultCdnConfiguredEndpoint.cs
-
1Packages/com.unity.services.core/Editor/Core/EditorGameService/EditorGameServiceDashboardHelper.cs
-
2Packages/com.unity.services.core/Editor/Core/EditorGameService/EditorGameServiceFlagEnabler.cs
-
10Packages/com.unity.services.core/Editor/Core/EditorGameService/EditorGameServiceRegistry.cs
-
8Packages/com.unity.services.core/Editor/Core/EditorGameService/EditorGameServiceRemoteConfiguration.cs
-
29Packages/com.unity.services.core/Editor/Core/EditorGameService/EditorGameServiceSettingsProvider.cs
-
33Packages/com.unity.services.core/Editor/Core/EditorGameService/ServiceFlagEndpoint.cs
-
2Packages/com.unity.services.core/Editor/Core/ProjectStateManagement/IServiceFlagRequest.cs
-
2Packages/com.unity.services.core/Editor/Core/ProjectStateManagement/IServiceFlags.cs
-
6Packages/com.unity.services.core/Editor/Core/ProjectStateManagement/ProjectStateHelper.cs
-
18Packages/com.unity.services.core/Editor/Core/ProjectStateManagement/ServiceFlagRequest.cs
-
10Packages/com.unity.services.core/Editor/Core/ProjectStateManagement/ServiceFlags.cs
-
2Packages/com.unity.services.core/Editor/Core/UserRoleManagement/IUserRoleRequest.cs
-
5Packages/com.unity.services.core/Editor/Core/UserRoleManagement/UserRoleHandler.cs
-
58Packages/com.unity.services.core/Editor/Core/UserRoleManagement/UserRoleRequest.cs
-
3Packages/com.unity.services.core/Runtime/Configuration/ConfigurationCollectionHelper.cs
-
3Packages/com.unity.services.core/Runtime/Configuration/ConfigurationUtils.cs
-
1Packages/com.unity.services.core/Runtime/Configuration/ProjectConfiguration.cs
-
2Packages/com.unity.services.core/Runtime/Configuration/Utils/StreamingAssetsUtils.cs
-
2Packages/com.unity.services.core/Runtime/Configuration/Utils/UnityWebRequestUtils.cs
-
2Packages/com.unity.services.core/Runtime/Configuration/StreamingAssetsConfigurationLoader.cs
-
3Packages/com.unity.services.core/Runtime/Core.Internal/AssemblyInfo.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/AsyncOperation.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/AsyncOperationAwaiter.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/AsyncOperationBase.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/AsyncOperationExtensions.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/AsyncOperationStatus.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/IAsyncOperation.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/IAsyncOperationAwaiter.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/AsyncOperation/TaskAsyncOperation.cs
-
4Packages/com.unity.services.core/Runtime/Core.Internal/Components/Authentication/IAccessToken.cs
-
4Packages/com.unity.services.core/Runtime/Core.Internal/Components/Authentication/IPlayerId.cs
-
4Packages/com.unity.services.core/Runtime/Core.Internal/Components/Configuration/IProjectConfiguration.cs
-
5Packages/com.unity.services.core/Runtime/Core.Internal/Components/Device/IInstallationId.cs
-
4Packages/com.unity.services.core/Runtime/Core.Internal/Components/Environments/IEnvironments.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/HttpOptions.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/HttpRequest.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/HttpRequestExtensions.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/HttpResponse.cs
-
4Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/IHttpClient.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/ReadOnlyHttpRequest.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Components/Networking/ReadOnlyHttpResponse.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Registry/CircularDependencyException.cs
-
14Packages/com.unity.services.core/Runtime/Core.Internal/Registry/CoreRegistration.cs
-
169Packages/com.unity.services.core/Runtime/Core.Internal/Registry/CoreRegistry.cs
-
8Packages/com.unity.services.core/Runtime/Core.Internal/Registry/CoreRegistryInitializer.cs
-
7Packages/com.unity.services.core/Runtime/Core.Internal/Registry/DependencyTree.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Registry/DependencyTreeInitializeOrderSorter.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Registry/IInitializablePackage.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Registry/IServiceComponent.cs
-
2Packages/com.unity.services.core/Runtime/Core.Internal/Registry/MissingComponent.cs
-
80Packages/com.unity.services.core/Runtime/Core.Internal/Unity.Services.Core.Internal.api
-
16Packages/com.unity.services.core/Runtime/Core.Internal/UnityServicesInitializer.cs
-
60Packages/com.unity.services.core/Runtime/Core.Internal/UnityServicesInternal.cs
-
19Packages/com.unity.services.core/Runtime/Core/Unity.Services.Core.api
-
2Packages/com.unity.services.core/Runtime/Core/Unity.Services.Core.api.meta
-
8Packages/com.unity.services.core/Runtime/Core/UnityServices.cs
-
12Packages/com.unity.services.core/Runtime/Device/UserIdProviders/AndroidUtils.cs
-
2Packages/com.unity.services.core/Runtime/Device/UserIdProviders/NSUserDefaults.cs
-
4Packages/com.unity.services.core/Runtime/Device/UserIdProviders/UnityAdsIdentifier.cs
-
2Packages/com.unity.services.core/Runtime/Device/UserIdProviders/UnityAnalyticsIdentifier.cs
-
2Packages/com.unity.services.core/Runtime/Device/UserIdProviders/IUserIdentifierProvider.cs
-
7Packages/com.unity.services.core/Runtime/Environments/Unity.Services.Core.Environments.api
-
8Packages/com.unity.services.core/Runtime/Environments/Unity.Services.Core.Environments.asmdef
-
1Packages/com.unity.services.core/Runtime/Networking/HttpServiceConfig.cs
-
2Packages/com.unity.services.core/Runtime/Networking/UnityWebRequestClient.cs
-
28Packages/com.unity.services.core/Runtime/Registration/CorePackageInitializer.cs
-
3Packages/com.unity.services.core/Runtime/Registration/Unity.Services.Core.Registration.asmdef
-
11Packages/com.unity.services.core/package.json
|
|||
using System; |
|||
using Unity.Services.Authentication.Utilities; |
|||
using Logger = Unity.Services.Authentication.Utilities.Logger; |
|||
public class AuthenticationService |
|||
/// <summary>
|
|||
/// The entry class to the Authentication Service.
|
|||
/// </summary>
|
|||
public static class AuthenticationService |
|||
/// <summary>
|
|||
/// The default singleton instance to access authentication service.
|
|||
/// </summary>
|
|||
public static IAuthenticationService Instance { get; internal set; } |
|||
} |
|||
} |
|
|||
using System; |
|||
using System.Text; |
|||
using System.Diagnostics; |
|||
using Debug = UnityEngine.Debug; |
|||
/// <summary>
|
|||
/// LogLevel is used to control the logs that are written to Unity for debugging.
|
|||
/// </summary>
|
|||
public enum LogLevel |
|||
{ |
|||
/// <summary>
|
|||
/// Disable all logs from Authentication SDK.
|
|||
/// </summary>
|
|||
Off = 0, |
|||
|
|||
/// <summary>
|
|||
/// Show errors in Authentication SDK.
|
|||
/// </summary>
|
|||
ErrorsOnly = 1, |
|||
|
|||
/// <summary>
|
|||
/// Show warnings and errors in Authentication SDK.
|
|||
/// </summary>
|
|||
WarningsAndErrors = 2, |
|||
|
|||
/// <summary>
|
|||
/// Show all logs in Authentication SDK.
|
|||
/// </summary>
|
|||
Verbose = 3 |
|||
} |
|||
|
|||
interface ILogger |
|||
{ |
|||
void Info(string message); |
|||
void Warning(string message); |
|||
void Error(string message); |
|||
|
|||
void Info(string format, params object[] args); |
|||
void Warning(string format, params object[] args); |
|||
void Error(string format, params object[] args); |
|||
} |
|||
|
|||
class Logger : ILogger |
|||
static class Logger |
|||
readonly string m_Prefix; |
|||
|
|||
delegate void LogMethod(object message); |
|||
|
|||
public LogLevel LogLevel { get; private set; } |
|||
|
|||
public Logger(string prefix, LogLevel logLevel = LogLevel.ErrorsOnly) |
|||
{ |
|||
m_Prefix = prefix; |
|||
LogLevel = logLevel; |
|||
} |
|||
|
|||
public void SetLogLevel(LogLevel level) |
|||
{ |
|||
LogLevel = level; |
|||
} |
|||
|
|||
public void Info(string message) |
|||
{ |
|||
if (LogLevel >= LogLevel.Verbose) |
|||
{ |
|||
Log(Debug.Log, message); |
|||
} |
|||
} |
|||
|
|||
public void Info(string format, params object[] args) |
|||
{ |
|||
if (LogLevel >= LogLevel.Verbose) |
|||
{ |
|||
Log(Debug.Log, format, args); |
|||
} |
|||
} |
|||
|
|||
public void Warning(string message) |
|||
{ |
|||
if (LogLevel >= LogLevel.WarningsAndErrors) |
|||
{ |
|||
Log(Debug.LogWarning, message); |
|||
} |
|||
} |
|||
const string k_Tag = "[Authentication]"; |
|||
public void Warning(string format, params object[] args) |
|||
{ |
|||
if (LogLevel >= LogLevel.WarningsAndErrors) |
|||
{ |
|||
Log(Debug.LogWarning, format, args); |
|||
} |
|||
} |
|||
|
|||
public void Error(string message) |
|||
{ |
|||
if (LogLevel >= LogLevel.ErrorsOnly) |
|||
{ |
|||
Log(Debug.LogError, message); |
|||
} |
|||
} |
|||
|
|||
public void Error(string format, params object[] args) |
|||
{ |
|||
if (LogLevel >= LogLevel.ErrorsOnly) |
|||
{ |
|||
Log(Debug.LogError, format, args); |
|||
} |
|||
} |
|||
|
|||
void Log(LogMethod log, string format, params object[] args) |
|||
{ |
|||
try |
|||
{ |
|||
var sb = new StringBuilder(); |
|||
sb.Append(m_Prefix); |
|||
sb.Append(" "); |
|||
if (args?.Length == 0) |
|||
{ |
|||
// There is no args, so it's supposed to be a raw string to log.
|
|||
// Don't do AppendFormat since it will throw FormatException if the format string contains
|
|||
// placeholder character {}.
|
|||
sb.Append(format); |
|||
} |
|||
else |
|||
{ |
|||
sb.AppendFormat(format, args); |
|||
} |
|||
const string k_VerboseLoggingDefine = "ENABLE_UNITY_AUTHENTICATION_VERBOSE_LOGGING"; |
|||
log(sb.ToString()); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
try |
|||
{ |
|||
// It's possible to get FormatException if the format string doesn't match args.
|
|||
// Fallback to a non-formatted string
|
|||
public static void Log(object message) => Debug.unityLogger.Log(k_Tag, message); |
|||
public static void LogWarning(object message) => Debug.unityLogger.LogWarning(k_Tag, message); |
|||
public static void LogError(object message) => Debug.unityLogger.LogError(k_Tag, message); |
|||
public static void LogException(Exception exception) => Debug.unityLogger.Log(LogType.Exception, k_Tag, exception); |
|||
var sb = new StringBuilder(); |
|||
sb.Append(m_Prefix); |
|||
sb.Append(" ["); |
|||
sb.Append(e.Message); |
|||
sb.Append("] "); |
|||
sb.Append(format); |
|||
foreach (var arg in args) |
|||
{ |
|||
sb.Append(" "); |
|||
sb.Append(arg); |
|||
} |
|||
[Conditional("UNITY_ASSERTIONS")] |
|||
public static void LogAssertion(object message) => Debug.unityLogger.Log(LogType.Assert, k_Tag, message); |
|||
log(sb.ToString()); |
|||
} |
|||
catch |
|||
{ |
|||
// Ignore the exception if it fails again, best effort.
|
|||
// It's possible that log() itself throws exception, then there isn't a good way to write a log.
|
|||
} |
|||
} |
|||
} |
|||
#if !ENABLE_UNITY_SERVICES_VERBOSE_LOGGING
|
|||
[Conditional(k_VerboseLoggingDefine)] |
|||
#endif
|
|||
public static void LogVerbose(object message) => Debug.unityLogger.Log(k_Tag, message); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b00545242abac4441933a4ae8ff83a03 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
fileFormatVersion: 2 |
|||
guid: e6375e7dc6e94704ae9cf19989f51c02 |
|||
timeCreated: 1623256583 |
|
|||
{ |
|||
"name": "com.unity.services.authentication", |
|||
"displayName": "Unity Authentication SDK", |
|||
"version": "0.5.0-preview", |
|||
"version": "0.7.1-preview", |
|||
"com.unity.services.core": "1.1.0-pre.2", |
|||
"com.unity.services.core": "1.1.0-pre.4", |
|||
"com.unity.services.authentication.tests": "0.5.0-preview" |
|||
"com.unity.services.authentication.tests": "0.7.1-preview" |
|||
"footprint": "d6dbb1efb74d58081d3f1b2ba4e0de24ebd466c4" |
|||
"footprint": "39b7ab526678124522acde1e9ef41ad4d2ce8c4a" |
|||
"revision": "724ce4a71dab198ef36654f093af01b116d1c641" |
|||
"revision": "0924832b7ba1efb195eeff4318693daefb886f24" |
|||
} |
|||
} |
|
|||
using Unity.Services.Authentication; |
|||
namespace Unity.Services.Core |
|||
namespace Unity.Services.Core.Internal |
|||
class UnityServicesInitializer |
|||
static class UnityServicesInitializer |
|||
static void Initialize() |
|||
static void CreateStaticInstance() |
|||
UnityServices.Instance = new UnityServicesInternal(); |
|||
UnityServices.Instance = new UnityServicesInternal(CoreRegistry.Instance); |
|||
} |
|||
|
|||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] |
|||
static void EnableServicesInitialization() |
|||
{ |
|||
var instance = (UnityServicesInternal)UnityServices.Instance; |
|||
instance.EnableInitialization(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 295d3524c32b2aa4d965b9308be33e37 |
|||
guid: 75ba8cc18b7164eb6aa7a8c4e64fbd25 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|
|||
// This file is generated. Do not modify by hand. |
|||
// XML documentation file not found. To check if public methods have XML comments, |
|||
// make sure the XML doc file is present and located next to the scraped dll |
|||
namespace Unity.Services.Core.Environments |
|||
{ |
|||
[System.Runtime.CompilerServices.Extension] public static class EnvironmentsOptionsExtensions |
|||
{ |
|||
[System.Runtime.CompilerServices.Extension] public static Unity.Services.Core.InitializationOptions SetEnvironmentName(Unity.Services.Core.InitializationOptions self, string environmentName); |
|||
} |
|||
} |
|
|||
{ |
|||
"name": "com.unity.services.core", |
|||
"displayName": "Services Core", |
|||
"version": "1.1.0-pre.2", |
|||
"version": "1.1.0-pre.4", |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.nuget.newtonsoft-json": "2.0.0" |
|||
"com.unity.modules.unitywebrequest": "1.0.0" |
|||
"com.unity.services.core.tests": "1.1.0-pre.2" |
|||
"com.unity.services.core.tests": "1.1.0-pre.4" |
|||
"footprint": "187a0fc7bf76eaef62cb959fb5d0873dde9c81b0" |
|||
"footprint": "2087c58489377c591143067b3823dcb95ae0d0dd" |
|||
"revision": "54737111b425289a3e8540a7ffe6bd4cdfbaf535" |
|||
"revision": "13eac0cd38d1a3ff7f8099590c524a7043817cb2" |
|||
} |
|||
} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue