Last active
December 19, 2015 02:39
-
-
Save tsubaki/5885092 to your computer and use it in GitHub Desktop.
URLがブラウザにキャッシュされた場合の対処。つまりGETパラメータに適当な値を付与してユニークURLとする。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
public class BundleDownload : MonoBehaviour | |
{ | |
public string url = "http://*******.unity3d"; | |
IEnumerator Start () | |
{ | |
string tempurl = string.Format ( | |
"{0}?datetime={1}", | |
url, | |
DateTime.Now.ToFileTime ()); | |
WWW www = new WWW (tempurl); | |
yield return www; | |
AssetBundle ab = www.assetBundle; | |
// 何らかの読み込み処理 | |
ab.Unload (false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment