Use Debug.Break() to pause Unity editor from the code

You can pause your game from the editor any time you want. But did you know that you can trigger the pause from the code based on some condition? There’s a console option called Error Pause. When enabled, it will pause your game when any run-time error occurs. When your game is paused, you can easily investigate what is […]

Read More…

Use unitypackage files to share part of your project

Did you know that there’s an easier way to share your Unity project files than zipping it all into a single archive? Check the unitypackage file format! Unitypackage is a basic distribution format of the Unity Asset Store and you might not have even known about it because it is completely transparent for the end user! Yet you can […]

Read More…

ExecuteInEditMode will run your script in edit mode

You might be familiar with the workflow that all of your game scripts are working only when you hit the Play button. Did you know that you can force some scripts to be running even when you’re in the edit mode? Why would you do that? I mean that you may have player scripts, enemies scripts, weapons […]

Read More…

Console log can show you which object is the creator

Most probably you already know about Debug.Log() function and its variations, but did you know that you can use it to find a particular object on the scene? Why would you do that? For instance, let’s say that you’re creating a shooting game. When a player shoots the object, you want to check if the bullet hits […]

Read More…

Hold the Ctrl key to snap objects to the grid

Did you know that when you hold the Ctrl key in the Scene view while moving the object its position will snap to the grid? [gfycat data_id=”DazzlingCautiousAfricanjacana”] You can fine-tune your Snap settings by selecting Edit -> Snap Settings from the main menu.   As you can see, you can not only snap object position, but scale and […]

Read More…