// Use this for initialization void Awake() { if (reference == null) { reference = this; } }
public static async UniTask ResourceUpToDate(string path, bool isScene = false) { // if (!await ShowDownloadDialog()) // throw new OperationCanceledException(); try { if (!BundlesManager.Instance.IsBundlesCached(BundlesManager.BundleName(path, isScene))) { ShowLoadingProgress("", 0); } await BundlesManager.Instance.LoadBundleForResource(path, isScene, UIManager.Popup <LoadingPopup>()); HideLoadingProgress(); Debug.Log($"ResourcesUpToDate -> Done "); } catch (Exception e) { Debug.LogError($"ResourceUpToDate error: for {e.Message} -> {e.StackTrace}"); HideLoadingProgress(); await UIManager.Popup <InfoPopup>().Text("#RESOURCE_NOT_FOUND".Lcz()).ShowAsync(); throw; } }
private void Awake() { _instance = this; GetServerBundlesInfo().Forget(); }