WWW.EscapeURL not working as described

On the Unity support website it says:

// This will print the string "Testing%201%2C2%2C3" to the console
print(WWW.EscapeURL("Testing 1,2,3"));

When I try this on a Mac build I get the result:
Testing+1,2,3

This is a pain as I am using WWW.EscapeURL and mailto command and I’m getting an email full of "+"s instead of spaces. Not ideal. Anybody know how to fix this or an alternative to use?

I have the same problem. Have you find the answer?

3 Answers

3

I’m not sure about the behavior of EscapeURL, but if you are encoding the body of an e-mail you should use HTMLEncode that comes with .Net. You can find more information about it here.

According to the support site EscapeURL is for “building web page parameters”, such as a web address, not web page content.

Have you tried System.Uri.EscapeUriString()?

HttpUtility.UrlEncode(text);

Good point. Ok, well, I think a Sprite sheet should be no different from other components in an animation. You should be able to have the same animation and just change the Sprite sheet. I have used the same animations on different objects on multiple occasions and you just have to make sure that the children of the animator that are affected by the animation have the same naming conventions. In your case, you probably just need to swap the Sprite sheet out and as long as the individual sprites have the same naming convention, it should work.

What I’m saying should be a similar process as: https://docs.unity3d.com/Packages/com.unity.2d.animation@2.2/manual/SpriteSwapIntro.html Instead of different characters, you have just different tool skins for the same character. This should be trivial to setup