I’m a fast learner.

Last post I complained about Unity’s apparent inability to garbage collect its own textures that it loads. I originally thought it was my problem, and wasted a lot of time trying to fix a problem that wasn’t there. Once I knew it was a Unity issue, I could build a workaround.

So when I ran into the error “Encryption and decryption failed”, I spent about five minutes looking through what I wrote before thinking, Hold on, last time it was Unity’s fault. Let me check that first. Guess what? It was a Unity issue.

To put it simply, TLS is a method of keeping your data safe from hackers or whoever. It stands for Transport Layer Security, and is updated from time to time to increase the security and implement new methods of encryption. Unity implements a version of Mono that does NOT have support for the latest version.

When was the version that Unity doesn’t support released? 10 years ago. Mhm. That was my reaction too. Implementing support for that wasn’t fun, and required some refactoring of my code to work around the issue.

If you stumbled upon this issue because you’re in the same conundrum, use the UnityWebRequest instead of the C# WebClient or WebRequest method. However, you have to run it in a Coroutine that can yield to the download, otherwise it won’t complete.


My Patreon | My Website

One thought on “I’m a fast learner.”

Leave a Reply

Your email address will not be published. Required fields are marked *