DownloadManager
来源:互联网 发布:京麦工作台和淘宝助理 编辑:程序博客网 时间:2024/05/22 04:59
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement;using System;public class DownloadManager : MonoBehaviour { private static DownloadManager _instance; public static DownloadManager Instacne { get { if (_instance == null) { _instance = FindObjectOfType(typeof(DownloadManager)) as DownloadManager; } return _instance; } } public delegate void LoadCallBack(params object[] args); public void LoadScene(string name, LoadCallBack callBack, params object[] args) { StartCoroutine(Load(name,callBack,args)); } AsyncOperation async = null; private IEnumerator Load(string name, LoadCallBack callBack, params object[] args) { async = SceneManager.LoadSceneAsync(name); yield return async; Resources.UnloadUnusedAssets(); GC.Collect(); if (callBack != null) { callBack(args); } async = null; }// Use this for initializationvoid Start () {}// Update is called once per framevoid Update () {}}
0 0
- DownloadManager
- DownloadManager
- DownloadManager
- DownloadManager
- DownloadManager
- Downloadmanager
- DownloadManager
- DownloadManager
- DownloadManager
- DownloadManager
- DownloadManager
- DownloadManager
- DownLoadManager
- DownloadManager
- DownloadManager使用
- DownloadManager Example
- DownloadManager使用
- DownloadManager 解析
- Vim插件之YouCompleteMe
- The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class fi
- QT:鼠标事件
- MySql--函数
- 93. Restore IP Addresses
- DownloadManager
- QT:键盘事件
- ResourcesManager
- QT:SQLite数据库 '增、删、改、查'
- UIManager
- QT:在Qt中使用SQLite数据库
- UIBase
- greenDAO 3.2 初探
- LoginPanel