Question by
AevinGames · Oct 23, 2016 at 03:58 PM ·
c#wwwdropbox
Dropbox showing html instead of text...
This is the script I've been working on is meant to be showing the text in this dropbox link.... but it's showing HTML. I have no clue whats causing this so please help.
public class LOAD : MonoBehaviour {
public string url = "https://www.dropbox.com/s/y4bnrkils20qgk9/News.txt ";
public string News1;
void Start () {
StartCoroutine(LoadText());
}
// Update is called once per frame
IEnumerator LoadText()
{
WWW guiwww = new WWW(url);
yield return guiwww;
News1 = guiwww.text;
}
public void OnClickTest()
{
Debug.Log(News1);
}
}
Comment
Best Answer
Answer by AevinGames · Oct 24, 2016 at 04:07 PM
To all of those looking for an answer... I've found it. pastebin.com and use the RAW link. You can edit it but it takes 10-30 seconds and an app restart to work.
I also changed the script: using UnityEngine; using System.Collections;
public class Test : MonoBehaviour {
public string url = "http://pastebin.com/raw/nyt87sPm";
public string News1;
WWW guiwww;
void Start()
{
StartCoroutine(LoadLik());
}
// Update is called once per frame
IEnumerator LoadLik()
{
guiwww = new WWW(url);
yield return guiwww;
OnClickTestP();
}
public void OnClickTestP()
{
News1 = guiwww.text;
Debug.Log(News1);
}
}
Your answer
Follow this Question
Related Questions
What's wrong with my audiostream on android? 0 Answers
WWW not working 2 Answers
How to load textures on run-time for a game that is built for WebGL 0 Answers
Loading an 'UI skin pack' 1 Answer
consume a php webservice in Unity3D C# 2 Answers