Hi all, today I will summarize 10 tips and tricks when working with unity for everyone that I find quite useful and should pay attention, both for newbies and those who have worked with unity3D for a long time.

1. Transform shortcut. Simple but extremely important to minimize you have to manipulate the mouse and convenient when manipulating 3D objects.

Keystroke Command Description
Q Pan
W Move
E Rotate
R Scale
T Rect Tool

2. Save changes in playmode Sometimes there are changes in play mode (usually for testing) but you want to save them to save time in editing more in editor mode. It’s basically changes to properties in components, so simply use unity’s copy component function to save these changes. Remember that after copying the compnent in playmode, you need to paste it back into the gameobject you want to change in editor mode.

3. Use an empty game object as the parent Always choose an empty game object as the top because this will be quite useful when you want to manage quite a lot of game objects into a group. Typically when designing a level for a scene or when you have a lot of models that want to connect with each other. Then moving, rotating or scaling the top game object (parent) will completely synchronize the child game objects for you.

4. Getting events for animation With unity we can completely listen to animation events with each frame, this is of course very convenient instead of having to check these events in the code. Suppose for each action hit of the main character, we will create some events as follows: Event start: after the main character brings his hand forward, after about 50 frames, we will generate a particle effect that lights up the entire area around the arm. Event end: before the end of about 50 frames, we will generate another effect that explodes a halo. To do this, you work on the animation tab and select the add event menu for the frame you want.

5.Prefab There are 2 tips with prefab as follows, usually mostly for beginners: Quick create prefab: in addition to creating the prefab menu, you can completely drag the game object from the hierachy to the project tab to quickly create a prefab. On the inspector, we have an apply button to save all changes to the prefab and affect other game objects that use this prefab without having to recreate or overwrite the old prefab (in contrast to apply, we can completely revert to it. to get the value back before saving)

6. Quality settings The quality setting is quite important with different platforms, it is natural and the properties should also be studied. However, sometimes there are simple things like lighting using quality settings (in fast mode) resulting in us accidentally not being able to see shadows in editor mode, making many of you very confused. Then we will need to check the quality setting.

7. Best fit mode for text Best fit is a nice option that unity provides for text game objects, with this mode depending on the min, max value of the font size, the text will always be displayed in the rectangle of the game object. This is especially helpful when testing or viewing logs with platforms that cannot run debug point at runtime. Either you can test in-game scenarios, dialogues without depending on the design team or take time to implement text frames, chat frames.

8. Toggle groups Using toggle button is quite convenient in unity but sometimes we don’t notice unity also provides an additional component called toogle group. Toogle group helps to synchronize the toogle buttons in the group it manages. For example, simply selecting 1 button will unselect the remaining buttons. Mostly because of the habit before unity UI and newcomers will not notice that they will often write code for this part themselves, and sometimes if you are not skillful, it is very rooted to create bugs.

9. Lightmapping checklist Baking lighting is something you will definitely have to implement in most 3D games. And with a 3D game where the level is quite complex, containing many light sources, models … the baking time will be extremely long, especially on devices with low configuration. So make it a habit to make a checklist so that the results of baking are always the way you want them to be.

10. Focus with the divine F key 😛 ^^ The last tip that can’t be missed is the use of “F” hot key to focus on the gameobject you want to manipulate. Regardless of whether it is a 2D game or a 3D game, this is extremely important, especially for those who are new to unity. When selecting a game object and using the “F” hot key, unity will automatically focus on the unity editor to make it easier for you to manipulate the gameobject you need to manipulate. Even the above hierachy when you select a game object and you only see the name and don’t know what game object this object is, you often use the “F” hotkey to unity focus and give you a view. The most detailed information about the game object you want to see. 

Above are 10 simple tips and tricks but extremely useful that I find when you are new to or want to pass on to others about unity should also refer. In the next part, I will continue to post more advanced tips and tricks for you guys 😃 Thanks 4 views!