absolutUrl has null character at end of string and debugging using Mono

The docs. about absolutUrl (Unity - Scripting API: Application.absoluteURL) isn’t full, please specify that at the end there is a end of string (On WebGL).

That may cause some problems (I had), when you try to read a file (in my case was configs) in same “url position”.

About debugging using Mono, please specify that debugging won’t work if there is installed multiple versions of Unity (in my case Unity 5.0 and Unity 5.1).

Hi ZeN12,

Thanks for the feedback, I’m looking into this.

Confirmed, in WebGL you currently get a stray \0 (ascii zero) character on the end of the string which can mess things up in more ways than one. This is a bug, so it wouldn’t really be correct to document this behaviour as it is not intended.

I would suggest until we release a fix, you should add code for detecting and removing this character before processing the string as normal. For example:

string url = Application.absoluteURL;
url = url.Replace(((char)0).ToString(),"");