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