Unity using tips

1. Editor coloring in run mode

When I first started using Unity, it often happened that the game content was modified while the Game was running, and after finishing running, and returning to the Scene window, all the modifications just made to the game were restored to the original state.

At this time, you can modify the color of the editor in the running state to play the role of prompting and warning.

Mac:Unity>Preferences>Colors>Playmode tint

Windows:Edit>Preferences>Colors>Playmode tint

When the game is running, the editor will have a superimposed color, prompting the operator that it is currently running, and any current changes will not be left.

2. Unit Snapping

Move an object by a fixed unit distance

Shortcut key: Ctrl/Cmd + left mouse button

In addition to movement, the same applies to rotation and scaling of objects

You can adjust the unit amount required for each alignment or the angle of each rotation through: Edit>Grid and Snap Setting

3. Vertex Snapping

When the move option is selected, press the V key and find that the three-color cube has become a hollow box. At this time, the vertex alignment mode is turned on. Press the left mouse button and move to the target, and there will be an adsorption Feel.

4. Surface Snapping

In fact, it is to align the surface of the collision body of the two objects, so the alignment object must have a collision body

Shortcut key: Ctrl/Cmd + Shift (with the move tool selected)

Find that the sphere always fits the surface of the cube

If you change Center to Pivot (axis)

Then the ball will be in the form of half inside and half outside

5. Grid Snapping

Edit>Grid and Snap Settings

Display Grid Size = 1, indicating that the minimum grid point unit distance of the grid is 1, and align under the current conditions, the selected object will find the nearest grid point for alignment.

Click All Axes at this point, and the grid alignment will be performed automatically

In addition, after version 2019.3

When the move tool is selected and it is in the Global state , select the rightmost magnetic icon to perform grid-aligned movement.

6. Grid display (Show Grid)

The grid display function becomes very convenient after version 2019.3

1. The small triangle next to the shortcut option can adjust the transparency of the grid.

2. If you want to adjust the grid size, you can use the shortcut keys:

Increase grid size: Ctrl/Cmd + ]

Reduce grid size: Ctrl/Cmd + [

3. If you want to change the color of the grid:

Mac:Unity>Preferences>Colors>Grid

Windows:Edit>Preferences>Color>Grid

other colors available

7. Release the preview window (Preview Window Unlock)

The preview image window is very small, which is not convenient for us to observe the details. You can use the following two methods to release its window:

Select the three dots on the right and select Convert to Floating Window

Or choose to click directly on the two vertical lines on the left

8. Custom icons

In game design, empty GameObjects are often used, such as setting monster points... But since its components are only Transform, we cannot see its specific position when we click on an empty object. At this time, we can click In the blue box below the Inspector , you can choose an oval icon with a name, or a circle, or other to customize the icon

 

9. Object Picking disabled in scene view

This function is added after the Unity2019.3 version. On the left side of the GameObject in the Hierarchy window, the object can be set as a prohibited object. After setting, the object will not be able to be selected in the Scene window for operations such as movement, but it can still be selected in the Hierarchy window. to operate

10. Center the view on object in the scene view

In addition to double-clicking the object in the Hierarchy window, there are two ways to focus on the object:

1. After selecting the object, press the F key. Note that the mouse must be placed in the Scene window to be effective.

2. After selecting the object, press Shift + F

11. Quick Search

Quick Search is a Package, you can download it in PackManager.

In Quick Search you can search for anything (note, it's really Anything!)

Shortcut key: Alt + quotes

12. Quickly create new scripts

In Add Component, directly enter the name of the script you want to add, and press Enter twice.

13. Expand and retract level shortcuts

If there are too many layers under an object, it is too troublesome to click layer by layer to expand. We can select the small triangle next to the object and hold down the Alt key, and the object will expand all layers. Similarly, when holding down the Alt key, when retracting the hierarchy, all the hierarchy will be retracted to the parent level.

14. Camera placement shortcut

Sometimes it is inconvenient to adjust the viewing angle while viewing the Game window while dragging the camera. You can directly adjust the viewing angle to a suitable angle in the Scene window, and then use the Align With View option in the GameObject or the shortcut key Ctrl/Cmd + Shift + F , to make one-time adjustments

Guess you like

Origin blog.csdn.net/m0_63673681/article/details/128041501