mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-21 10:22:37 +08:00
23 lines
747 B
C#
23 lines
747 B
C#
using System.Collections;
|
|
using Coffee.UIEffects;
|
|
using UnityEngine;
|
|
using UnityEngine.AddressableAssets;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class HotUpdate : MonoBehaviour
|
|
{
|
|
private IEnumerator Start()
|
|
{
|
|
const string k_SettingsAddress = "Assets/ProjectSettings/UIEffectProjectSettings.asset";
|
|
yield return Addressables.LoadAssetAsync<UIEffectProjectSettings>(k_SettingsAddress);
|
|
|
|
#if UNITY_2022_2_OR_NEWER
|
|
while (UIEffectProjectSettings.shaderVariantCollection.WarmUpProgressively(5) == false) yield return null;
|
|
#else
|
|
UIEffectProjectSettings.shaderVariantCollection.WarmUp();
|
|
#endif
|
|
|
|
yield return SceneManager.LoadSceneAsync(gameObject.scene.buildIndex + 1, LoadSceneMode.Single);
|
|
}
|
|
}
|