public string ReadMeta() { string returnMeta = mTargetMetadata; //Debug.Log ("Meta Data:" + returnMeta); MetaDataFields loadedData = JsonUtility.FromJson <MetaDataFields>(returnMeta); //Debug.Log(loadedData.Editor); // Debug.Log(loadedData.Android); // Debug.Log(loadedData.iOS); // PLatform Specific runtime if (Application.platform == RuntimePlatform.WindowsEditor) { editorUrl = loadedData.Editor; return(loadedData.Editor); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { return(loadedData.Android); } else //(Application.platform == RuntimePlatform.Android) { return(loadedData.iOS); } //return returnMeta; }
/*void DownloadBundleScript() * { * WebClient client = new WebClient(); * client.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler( DownloadFileCompleted ); * //client.DownloadFileAsync ((new Uri (url, Application.dataPath + "/" + "ui_controller.javascript"))); * Uri u = new UriBuilder(url).Uri; * client.DownloadFileAsync (u, Application.dataPath + "/" + "ui_controller.javascript"); * //Debug.Log(Path.GetFileName(Application.dataPath)); * while (client.IsBusy) { } * * DirectoryInfo dir = new DirectoryInfo(Application.dataPath); * FileInfo[] info = dir.GetFiles("*.*"); * * foreach (FileInfo f in info) * { * Debug.Log(f.ToString()); * } * } * void DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) * { * if (e.Error == null) * { * DestroyLoadingAnimation (); * } * } */ /******************************************************************************************************************************** ********************************************************************************************************************************/ public string ReadMetaUrl() { returnMeta = mTargetMetadata; //Debug.Log ("Meta Data:" + returnMeta); MetaDataFields loadedData = JsonUtility.FromJson <MetaDataFields>(returnMeta); //Debug.Log(loadedData.Editor); // Debug.Log(loadedData.Android); // Debug.Log(loadedData.iOS); // PLatform Specific runtime _wLoad = loadedData.W_Download; _IsArt = loadedData.Art; _artist = loadedData.Artist; _artistEmail = loadedData.Artist_Email; string a = loadedData.Editor; string b = loadedData.Android; string c = loadedData.iOS; string d = loadedData.EditorMatUrl; string e = loadedData.AndroidMatUrl; string f = loadedData.iOSMatUrl; _extendedTracking = loadedData.ExtendedTracking; _isScript = loadedData.Is_Script; Debug.Log("here here here here hereh here hereh ereh ereh ere"); Debug.Log(_wLoad); Debug.Log(_IsArt); Debug.Log(_artist); Debug.Log(_artistEmail); Debug.Log(a); Debug.Log(b); Debug.Log(c); Debug.Log(d); Debug.Log(e); Debug.Log(f); Debug.Log("here here here here hereh here hereh ereh ereh ere"); if (Application.platform == RuntimePlatform.IPhonePlayer) { matUrl = loadedData.iOSMatUrl; return(loadedData.iOS); } else if (Application.platform == RuntimePlatform.Android) { matUrl = loadedData.AndroidMatUrl; return(loadedData.Android); } else //(Application.platform == RuntimePlatform.Android) { matUrl = loadedData.EditorMatUrl; editorUrl = loadedData.Editor; return(loadedData.Editor); } //return returnMeta; }