public override IEnumerator DownloadData() { yield return(StartCoroutine(data.GetAudio(1))); Debug.Log(data.audioBundle); AssetBundleLoadAssetOperation request = BundleManager.LoadAssetAsync(data.audioBundle[0], data.audioBundle[1], typeof(AudioClip)); if (request == null) { yield break; } yield return(StartCoroutine(request)); data.introAudio = request.GetAsset <AudioClip>(); request = BundleManager.LoadAssetAsync(data.audioBundle[2], data.audioBundle[3], typeof(AudioClip)); if (request == null) { yield break; } yield return(StartCoroutine(request)); data.detailAudio = request.GetAsset <AudioClip>(); BundleManager.UnloadBundle(data.audioBundle[0]); //Debug.Log(data.introAudio + " - " + data.detailAudio); }
// Use this for initialization IEnumerator Start() { data = new Object3Ddata(); data.id = id; yield return(StartCoroutine(data.GetAudio(1))); StartCoroutine(DataStorage.Instance.Download <BiaChuQuyen>(this, true)); source = GetComponent <AudioSource>(); EventManager.Instance.AddListener("OnShowTime", OnEvent); EventManager.Instance.AddListener("OnFinishMoveToObject", OnEvent); EventManager.Instance.AddListener("OnMoveToObject", OnEvent); pointOfView = transform.TransformPoint(pointOfView); }
// Use this for initialization IEnumerator Start() { #region Download Model at the start data = new Object3Ddata(); data.id = id; yield return(StartCoroutine(data.GetAudio(1))); data.model = modelPrefab; StartCoroutine(DataStorage.Instance.Download <Object3D>(this, true)); #endregion source = GetComponent <AudioSource>(); EventManager.Instance.AddListener("OnShowTime", OnEvent); EventManager.Instance.AddListener("OnFinishMoveToObject", OnEvent); EventManager.Instance.AddListener("OnMoveToObject", OnEvent); pointOfView = transform.TransformPoint(pointOfView); }
// Use this for initialization IEnumerator Start() { data = new Object3Ddata(); data.id = id; yield return StartCoroutine(data.GetAudio(1)); StartCoroutine(DataStorage.Instance.Download<BiaChuQuyen>(this, true)); source = GetComponent<AudioSource>(); EventManager.Instance.AddListener("OnShowTime", OnEvent); EventManager.Instance.AddListener("OnFinishMoveToObject", OnEvent); EventManager.Instance.AddListener("OnMoveToObject", OnEvent); pointOfView = transform.TransformPoint(pointOfView); }
// Use this for initialization IEnumerator Start() { #region Download Model at the start data = new Object3Ddata(); data.id = id; yield return StartCoroutine(data.GetAudio(1)); data.model = modelPrefab; StartCoroutine(DataStorage.Instance.Download<Object3D>(this, true)); #endregion source = GetComponent<AudioSource>(); EventManager.Instance.AddListener("OnShowTime", OnEvent); EventManager.Instance.AddListener("OnFinishMoveToObject", OnEvent); EventManager.Instance.AddListener("OnMoveToObject", OnEvent); pointOfView = transform.TransformPoint(pointOfView); }