Unity3d interview questions (all), unity3d interview questions (all)

Source: Internet
Author: User

Unity3d interview questions (all), unity3d interview questions (all)

I have summarized some Unity3d high-frequency interview questions, hoping to help you.

Limited to individual levels, only some reference answers are attached.

========================================================

Data structures and algorithms are important, and graphics are also important!

Large gaming companies value personal foundations and comprehensive capabilities. Some also value your actual work capabilities and your Demo.

 

Frequently Asked Questions:

1. What is a rendering pipeline?

It refers to a series of necessary operations on the monitor to display the image.

Many steps in the rendering pipeline are to change a geometric object from one coordinate system to another.

The main steps are as follows:

Local coordinates-> View coordinates-> back cropping-> illumination-> cropping-> projection-> View transformation-> Rasterization.

 

2. How to optimize the memory?

There are many ways, such

1. Compress built-in class libraries;

2. Hide the objects that need to be used for the moment instead of directly Destroy them;

3. release resources occupied by AssetBundle;

4. Reduce the one-sided quantity of the model, reduce the number of bones of the model, and reduce the texture size;

5. Use the lightmap, multi-level details (looss), Shader, and Prefab ).

Iii. How to dynamically load resources? (Sometimes ask for the difference. Please refer to Baidu for details)

1. Resources. Load ();

2. AssetBundle

4. What is a collaborative program?

Enable another logical process while running the main thread to assist in the execution of the current program. In other words, enabling coroutine is to start a thread. It can be used to control motion, sequence, and object behavior.

5. What plug-ins have you used?

(It is best to familiarize yourself with several plug-ins and answer your questions)

========================================================== ================

1. How can I use Unity3d to implement 2d games?

1. Use its own GUI;

2. Adjust the Projection value of the camera to Orthographic without considering the Z axis;

3. Use the 2d plug-in, such as: 2 DToolKit;

 

2. What is the difference between a collision generator and a trigger in Unity3d?

The dashboard has a collision effect. If IsTrigger is set to false, the OnCollisionEnter/Stay/Exit function can be called;

Trigger has no collision effect, IsTrigger = true, you can call the OnTriggerEnter/Stay/Exit function.

 

3. Necessary Conditions for collision of Objects

Both objects must carry a Collider, and one object must also carry a Rigidbody rigid body.

 

4. What is the difference between CharacterController and Rigidbody?

CharacterController comes with a capsule collision tool, which contains attributes of a rigid body;

Rigidbody is a rigid body that carries the characteristics of a rigid body.

 

5. During the entire collision process, the corresponding functions are listed in several stages.

Three Phases

1. OnCollisionEnter

2. OnCollisionStay

3. OnCollisionExit

 

6. In the Unity3d physical engine, there are several ways to apply force, which are described separately

Rigidbody. AddForce/AddForceAtPosition are all in the rigidbody series functions.

 

7. What is chain joint?

Hinge Joint can be used to simulate the connection between two objects with a chain, so that the two objects can move each other within a fixed distance without generating force, however, after reaching a fixed distance, tension will occur.

 

8. What is the function used to rotate the object itself?

Transform. Rotate ()

 

9. What functions does an object use to rotate around a certain point?

Transform. RotateAround ()

 

10. Unity3d provides a class for saving and reading data (PlayerPrefs). Please list the functions for saving and reading integer data.

PlayerPrefs. SetInt () PlayerPrefs. GetInt ()

 

11. What types of light sources does Unity3d provide?

Four.

Parallel Light: Directional Light Point Light Source: Point Light

Spot Light Area Light Source: Area Light

 

12. The Unity3d script has a complete life cycle from wake-up to destruction. list several important methods that come with the system.

Awake --> Start --> Update --> FixedUpdate --> LateUpdate --> OnGUI --> Reset --> OnDisable --> OnDestroy

 

13. Which system function is physical update generally stored in?

FixedUpdate is executed every time a fixed frame is drawn. Unlike Update, FixedUpdate is used to render frames. If your rendering efficiency is low, the number of FixedUpdate calls will decrease. FixedUpdate is more suitable for computing on the physical engine because it is related to the rendering of each frame. Update is more suitable for control.

 

14. In which system function is the motion of a mobile camera placed? Why is it in this function?

LateUpdate is called after each frame is executed. It is called only after all updates are completed. It is suitable for Executing command scripts. The example on the official website is the follow-up of the camera, which is followed after all Update operations. Otherwise, the camera may have been pushed forward, but there is no empty frame of the role in the perspective.

 

15. How do we save memory when the game needs to frequently create an object?

Use Prefab, A Prefab object, and then copy and create the object.

 

16. What will happen if multiple Camera servers are placed in the scene and they are active at the same time?

The game interface shows a mix of many cameras.

 

17. Describe the role of Prefab and how to use it properly in a mobile device environment?

Prefab is used in instantiation. It is mainly used for objects that are frequently used and attributes can be easily modified.

 

18. How to destroy an UnityEngine. Object and its subclass?

Use the Destroy () method;

 

19. Please briefly describe how to securely migrate asset data between different projects in Unity3d. Please list three methods?

1. The assets Directory and the Library directory can be migrated together.

2. Export package

3. Use the assets Server feature of Unity

 

20. Which types of game animations and their principles are described?

It mainly includes joint animation, bone animation, and single Grid Model Animation (Key Frame Animation ).

Joint Animation: divide a role into several independent parts. One part corresponds to a grid model, and the animation of some parts is connected to an overall animation. The role is flexible and this animation is used in Quake2;

Bone animation, a widely used animation method, integrates the advantages of the above two methods. The skeleton forms a certain level of structure based on the characteristics of the role and has joint links for relative motion, the skin is placed out of the skeleton as a single grid and determines the role's appearance;

A single mesh model animation consists of a complete mesh model. It records the original position of each vertex and the amount of changes in the key frames of the animation sequence, and then interpolation is performed to achieve the animation effect, role animation is more realistic.

21. Describe why data loss occurs on the component in Unity3d.

Generally, the object bound to the component is deleted.

 

22. How alpha blend works

Alpha Blend achieves transparency, but only alpha operations can be performed on a certain region. transparency can be set.

 

23. Write the diffuse formula in illumination calculation.

Diffuse = Kd x colorLight x max (N * L, 0 ); kd diffuse reflection coefficient, colorLight color, N unit normal vector, L point to the unit vector of the light source, where N and L point multiplication, if the result is less than or equal to 0, the diffuse reflection is 0.

 

24. What are the advantages and disadvantages of the DLE?

Level of detail is the most common game optimization technology. It determines the resource allocation of object Rendering Based on the location and importance of the model, reduces the number of faces and details of non-important objects, and achieves efficient rendering operations.

 

25. Two shadow judgment methods and working principles.

 

26. What is Vertex Shader and how to calculate it?

Vertex shader

 

27. What is MipMap and its role?

MipMapping: a commonly used technology in 3D computer graphics Paster rendering. To speed up rendering progress and reduce image aliasing, textures are processed into files composed of a series of pre-computed and Optimized images. Such textures are called MipMap.

 

28. Trial: either

1. Use code to implement the third-role Controller

2. Implement the function of hanging objects on the crane

 

29. What is the Reverse Rotation animation method?

 

30. What are the attributes of an object required for collision detection?

 

31. What are the commands for obtaining, adding, and deleting components?

Get: GetComponent

Add: AddComponent

Delete: Destroy

 

32. The role of the Animation. CrossFade command is: (C)

A. animation enlargement B. animation conversion C. The animation fades into other animations

 

33. The Application. loadLevel command is: ()

A. load level B. asynchronously load level C. load action

 

34. What are the commands recorded for debugging to the console?

Debug. Log ();

 

35. What is the storage path of the editor class?

Under the Assets/Editor folder under the project directory.

 

36. What is a drag-and-drop window Command created using the native GUI?

GUI. DragWindow ();

 

37. What is the difference between localPosition and Position?

LocalPosition: the location of the local location, which is changed relative to the parent location.

Position: the Position of the world coordinate transform

 

38. meaningful connections

Mathf. Round Interpolation

Mathf. Clamp rounding

Mathf. Lerp restrictions

 

39. Write a timer tool to start timing from the hour. Format: 00: 00: 00

 

40. Write the five methods of Animation

 

41. How to get a script on an object

GameObject. GetComponent <> ();

 

42. Questions on the machine: use the mouse to drag objects in the scene, and use the mouse wheel to zoom (use a Cube ).

 

43. Can we briefly describe the point multiplication of a vector, the cross multiplication of a vector, and the geometric meaning of vector normalization?

The geometric meaning of point multiplication is to calculate the angle between two vectors and the projection from one side to the other;

The geometric meaning of cross multiplication is to create a vector perpendicular to a plane, triangle, or polygon.

For more highlights, please click http://www.gopedu.com/


Unity3D, who can teach me how to complete all the work in it?

These are the most basic things of virtual reality. It's not hard. What do you want to do? If you drag an image to change the wall color, you can change the material ball or Maintexture. If you drag the image to the model in the room, you can instantiate the model. When the model is loaded externally, the resource is loaded dynamically, it can also be instantiated directly in the scenario, but it only consumes memory. To click images, you need to prepare for instantiation. The logic is simple and the code is not difficult, this video is very good for students. It is not difficult to use unity to improve the performance of professional VR professionals, if you have any questions, I just want to give you some ideas. It is not convenient for me to come up with similar projects. I suggest you go to the unity3D Baidu post to ask questions at any time. I am every day, many people will help you solve the problem. I wish you success!
 
How does unity3d import completed animations? And how to control the detailed playback process of an animation

In Unity3D, Edit> Project Setting> Quality Setting has a Blend Weights
Is to configure a vertex to be affected by a maximum of several bones, the maximum is 4, the default is 2
Pay attention to this when creating models.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.