|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using Cysharp.Threading.Tasks;
|
using ProjSG.Resource;
|
|
public class FontUtility
|
{
|
// T044: Fonts loaded via FontUtility.InitAsync or UILoader.LoadFont
|
// Actual location: Assets/ResourcesOut/Font/
|
|
public static Font preferred
|
{
|
get { return ResourceCacheManager.Instance.GetCached<Font>("Assets/ResourcesOut/Font/GameFont1.ttf"); }
|
}
|
|
public static Font secondary
|
{
|
get { return ResourceCacheManager.Instance.GetCached<Font>("Assets/ResourcesOut/Font/GameFont2.ttf"); }
|
}
|
|
/// <summary>
|
/// US2: Async initialization — fallback API if preload is not yet available.
|
/// </summary>
|
public static async UniTask InitAsync()
|
{
|
// Fallback: async load and cache via ResManager
|
await ResManager.Instance.LoadAssetAsync<Font>("Font", "GameFont1");
|
await ResManager.Instance.LoadAssetAsync<Font>("Font", "GameFont2");
|
}
|
|
}
|