Files
Hasebe/Library/PackageCache/com.unity.addressables@42676f2a154e/Runtime/ResourceManager/CcdManager.cs
T
2026-09-21 12:15:57 +03:00

45 lines
1.3 KiB
C#

using System;
#if UNITY_EDITOR
using UnityEngine;
#endif
#if ENABLE_CCD
/// <summary>
/// CcdManager is a static class used to determine where to point Addressables when loading resources stored in CCD.
/// </summary>
public static class CcdManager
{
/// <summary>
/// Name of the environment that the project should use.
/// </summary>
public static string EnvironmentName { get; set; }
/// <summary>
/// Id of the bucket that the project should use.
/// </summary>
public static string BucketId { get; set; }
/// <summary>
/// Name of the badge the project should use.
/// </summary>
public static string Badge { get; set; }
#if UNITY_EDITOR
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static void ResetStaticsOnLoad()
{
EnvironmentName = string.Empty;
BucketId = string.Empty;
Badge = string.Empty;
}
#endif
/// <summary>
/// Determines if the CcdManager has been configured
/// </summary>
/// <returns>True if all fields have been set. False, otherwise.</returns>
public static bool IsConfigured()
{
return !string.IsNullOrEmpty(EnvironmentName) && !string.IsNullOrEmpty(BucketId) && !string.IsNullOrEmpty(Badge);
}
}
#endif