private static object WWWLoadUserImportAsset(string assetUsageIdx, string path, UserImportAssetType type) { Debug.Log("WWW fild load try : " + path); WWW www = new WWW("file://" + path); switch (type) { case UserImportAssetType.Texture2D: return(www.texture); case UserImportAssetType.AudioClip: return(www.GetAudioClip()); default: Debug.LogError("WWWLoadUserImportAsset Error. type is unknown."); return(null); } }
public UserImportAssetInfo(string name, AudioClip audioClip) { this.assetName = name; this.asset = audioClip; this.type = UserImportAssetType.AudioClip; }
public UserImportAssetInfo(string name, Texture2D texture) { this.assetName = name; this.asset = texture; this.type = UserImportAssetType.Texture2D; }