WuhuIslandTesting/Library/PackageCache/com.unity.addressables@1.21.12/Tests/Editor/DocExampleCode/PrintBucketInformation.cs

28 lines
798 B
C#
Raw Permalink Normal View History

2025-01-07 02:06:59 +01:00
namespace AddressableAssets.DocExampleCode
{
#region SAMPLE
#if (UNITY_EDITOR && ENABLE_CCD)
using System.Threading.Tasks;
using UnityEditor.AddressableAssets.Build;
public class BuildHooks
{
static void AddBuildHook()
{
CcdBuildEvents.PrependPreBuildEvent(PrintBucketInformation);
CcdBuildEvents.PrependPreUpdateEvent(PrintBucketInformation);
}
static async Task<bool> PrintBucketInformation(AddressablesDataBuilderInput input)
{
UnityEngine.Debug.Log($"Environment: {CcdManager.EnvironmentName}");
UnityEngine.Debug.Log($"Bucket: {CcdManager.BucketId}");
UnityEngine.Debug.Log($"Badge: {CcdManager.Badge}");
return true;
}
}
#endif
#endregion
}