This article shows you how to change the screen size at run time via script, while avoiding the unexpected pitfalls that can occur, as well as other topics, such as toggling full screen and windowed modes, limiting frame rate, toggling vsync, and setting the resolution.
How To Make A Custom Mouse Cursor – Unity
This is a quick guide on how to make a 2D, custom mouse cursor in Unity, from making the texture, getting it into Unity, and then actually using it in your game.
How To Detect Any Key Press But Ignore Mouse – Unity C#
This shows you how to check if any key key is being pressed on the keyboard and NOT the mouse in the correct way. There are some incorrect methods shown on the internet elsewhere.
How To Not Destroy Objects Between Scenes – Unity C#
This tutorial teaches you how to keep game objects from being destroyed when loading a new Unity scene. It will preserve them between multiple scenes.
How To Do Secure Saving with Binary – Unity C#
This tutorial shows you an easy, secure way to save and load your games data, converting it to binary (machine code), to make it hard for players to modify your data.
How To Change Sprites Colour Or Transparency – Unity C#
If you've ever wanted to write a script that could make your sprite flash a different colour or turn them transparent in Unity, there's an easy way. I did this in various ways in my game Puzzledorf. One example is the fireworks that explode when you do something right: Or making the Press Any Key... Continue Reading →
How To Do Lerping – Unity C#
Moving one object towards another is a simple enough task, and a Lerp is a good way to get the job done. Lerping can also be used to gradually change one value into another. It's easy to do wrong, so I'll talk about the right way if you want to get a constant speed.
How To Do 2D Top-Down Movement – Unity C#
This post describes how to create a simple movement for a 2D top-down game, and it assumes that the reader is a beginner in such topics.
How To Do Vector MoveTowards – Unity C#
A common task is moving one object towards another position in Unity. Assuming you want constant, linear speed, there are two methods I will discuss: Lerp and MoveTowards.
How To Optimize a Unity Game
Last year I was working on a big RPG project as part of my studies. It looked great but didn't run so well on the ps4 dev kit. After a lot of tweaking I got it from a pretty stuttery frame rate to something smooth. This guide will tell you how I did it.