Performance issues with Polygon Colliders

I am currently working on a little mobile 2D game and had a issue that almost drove me crazy. Some objects that were supposed to move across the screen at a constant speed where “stuttering”. I tried different approaches for the way I move the objects but nothing seemed to help.
At some point I started disabling almost everything in my scene and enabling it again one by one. As it turned out the polygon colliders 2D of some objects where really hurting the performance. If you assign a polygon collider to an object Unity will fit it automatically to the shape of the object and I guess most of the time it does a good job at that. In my case however Unity used around 300 points for the polygon collider of a rather simple sprite. Luckily you can edit the points yourself and I was able to recreate the collider using only 18 points and that solved all my performance and “stuttering” issues.

Task List in Visual Studio

In this quicktip I want to show you the Visual Studio task list.

Many of us use keywords like ‘TODO’ or ‘HACK’ in their comments. But this only makes sense if you either got very few source files or a way to see all those comments in a central place. Luckily Visual Studio provides a view for that.

To open it just go to View -> TaskList. A new window will open. In the dropdown that says “User Tasks” simply select “Comments”. Now you see all of those “TODO”s and “HACK”s.

Open the Task List
Open the Task List
Show comments
Show comments

You can even modify the default keywords (actually they are called tokens). To do so go to Tools -> Options and select “Task List”. You can set the priority for each token and also add new ones. Adding is a bit counterintuitive. You have to enter the name for your new token in the name Textbox. After that the add button will be enabled.

Custom tokens
Custom tokens

That’s it for now. See you next time.