| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using Cysharp.Threading.Tasks; |
| | | using ProjSG.Resource; |
| | | |
| | | public class ShaderUtility |
| | | { |
| | |
| | | Shader.SetGlobalColor("_Gbl_Wat", new Color(1, 1, 1, 1)); |
| | | } |
| | | |
| | | [System.Obsolete("US2: Use WarmUpAllAsync. Sync loading removed. Final preload+cache pattern in T044.")] |
| | | public static void WarmUpAll() |
| | | { |
| | | // US2: Sync AB loading removed. Use WarmUpAllAsync instead. |
| | | Shader.WarmupAllShaders(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// US2: Async shader warm up via YooAsset. Temporary API — will be replaced by preload+cache in T044. |
| | | /// </summary> |
| | | public static async UniTask WarmUpAllAsync() |
| | | { |
| | | if (AssetSource.isUseAssetBundle) |
| | | { |
| | | AssetBundleUtility.Instance.Sync_LoadAllAssets("Graphic/Shader"); |
| | | Shader.WarmupAllShaders(); |
| | | await YooAssetService.Instance.LoadAllAssetsAsync<Shader>("Assets/ResourcesOut/Shader"); |
| | | } |
| | | Shader.WarmupAllShaders(); |
| | | } |
| | | |
| | | |