I’m working on an application where the user simply pastes multiple lines of links/ urls into a GUI.TextArea, and after that he will have all those links opened on his browser, each line of link being a different tab on the browser.
The problem I’m having is to tell unity how to differentiate the lines of links. In my tests I couldn’t tell the engine when a link ended and when the next one started, and the result was that just one tab opened with everything on the same URL - which obviously resulted in a broken page.
The correct way would be: if the stringA is written on the first line, stringA is the first link. Anything written on the second line would be the second link to be opened on another browser tab, and so on.
All I have atm is this:
var links : String = "Paste your links here...";
function OnGUI ()
{
links = GUI.TextArea (Rect (10, 10, 200, 100), links);
if(GUI.Button(Rect (10, 150, 200, 50), "Open!"))
{
Application.OpenURL(links);
}
}
This should be simple… I have another small problem but I won’t flood this topic.
Thanks!