Posts Tagged custom

JSON Is Incredibly Bloated

Tags: , , ,

In previous articles I’ve compared the performance of various JSON libraries. Unity’s built-in JsonUtility usually comes out on top, but that conclusion loses sight of the bigger picture. JsonUtility is only really fast when you compare it to other JSON libraries. Compared to non-JSON alternatives, it’s ludicrously slow and oversized. Today’s article compares JSON to an alternative format to highlight just how bloated JSON is.

Read the rest of this article »

8 Comments

Custom ErrorEvents

Tags: , , ,

Chances are you’ve been bitten by the ErrorEvent class at some point while programming AS3. It’s the asynchronous equivalent to throw an Error and it happens when, for example, a Loader‘s load fails. If you write any code that performs an asynchronous task, perhaps more file loading, you too may want a way to inform users of your class that the task has failed. Just like with Event, it’s nice to be able to add data on to the standard ErrorEvent class. How does this work? Let’s dig in and find out.

Read the rest of this article »

3 Comments