Selection of Unity interview questions (7)

Hongliu Academy will make you a few steps faster.
This article was first published on my official account: Hongliu School

I have sorted out some Unity interview questions, hoping to help you.

Interviewer: Briefly describe the object pool. What do you think are suitable for using the object pool in FPS?

answer:

The object pool is a space that stores resources that need to be called repeatedly. When an object is generated in large quantities, it will be time-consuming to destroy and create each time. Put temporarily unused objects into a pool through the object pool (that is, a collection ), when you want to regenerate this object next time, first go to the pool to find out whether there is an available object, if there is, just take it out and use it, no need to create it again, if there is no available object in the pool, you need to recreate it , Use space to exchange time to achieve the high-speed running effect of the game. In FPS games, objects that are often copied in large numbers include bullets, enemies, particles, etc.

Interviewer: What is the difference between CharacterController and Rigidbody?

answer:

Rigidbody has the characteristics of completely real physics. The most basic component of the physics system in Unity contains common physical characteristics. CharacterController can be said to be a limited Rigidbody, which has certain physical effects but is not completely real. It is for Unity to A component packaged to enable developers to easily develop first-person perspective games.

Interviewer: Briefly describe the usefulness of prefab?

answer:

Instantiated when the game is running, the prefab is equivalent to a template. Make a default configuration for the materials, scripts, and parameters you already have for future modification. At the same time, the packaged content of the prefab simplifies the export operation and facilitates team communication. .

Interviewer: Please briefly describe the role of the sealed keyword in class declaration and function declaration?

answer:

The class modified by sealed is a sealed class. When the class is declared, it can prevent other classes from inheriting this class, and if it is declared in a method, it can prevent derived classes from overriding this method.

Interviewer: How many ways are there to implement 2d games with Unity3d?

answer:

1. Use your own GUI, UGUI that appeared after Unity4.6
2. Adjust the Projection (projection) value of the camera to Orthographic (orthographic projection), regardless of the z-axis
3. Use 2d plug-ins, such as: 2DToolKit, and NGUI

further reading

Pay attention to the service account of Hongliu Academy and get all the content of this series for free


I'm Dazhi (vx: zhz11235), your technology pathfinder, see you next time!

don't go! Like it , collect it!

OK, you can go.

Guess you like

Origin blog.csdn.net/zhenghongzhi6/article/details/112612641