Unity3d Interview Questions

Source: Internet
Author: User

Attention, is the question, is not the pen question Oh. These are some of the typical questions I've been asked about in my recent interviews with companies in Beijing. Share with you. The answer is my own, not guaranteed standards and integrity.

Hey, the company at the end of the opening, and the school recruit a group of cheap kids ... Sang-Won ... Fortunately, I found a job.

Anyway

    • How does the Ngui fit at different screen resolutions?
the Ngui itself is adapted according to the height. The Ngui is adapted according to the ratio of the target device height (targetheight) to the set height (manualheight). If the aspect ratio is the same, it will always fit perfectly. However, if they are not consistent, there may be a case where the left and right sides have black edges (smaller than the device aspect ratio) or the left and right sides are cut (larger than the device aspect ratio). You can therefore manually modify the Camera.orthographicsize in code to adjust the ratio to the target screen size.  the positioning of UI elements can be uianchor.  the Scalingstyle option for Uiroot has pixelperfect,fixedsize,fixedsizeonmobile several values. Use Fixedsizeonmobile to ensure that the UI element size does not change.  
    • Ngui How to reduce drawcall?
try to hit the graph in a poster and use the same material to make an atlas. And the same as the Atlas UI object, the depth to be adjacent or the same. Otherwise, additional drawcall will be generated.  
    • Memory optimized
using a resource pool, the cache needs to be reused gameobject. Quantities can be dynamically increased and scaled down according to demand. use mipmap for pictures. object is destroyed to be tuned Destroy,assetbundle destroyed to call Unload (false). But that's not enough, so call the Resources.unloadunusedassets () method when appropriate to release the game resources. use static variables sparingly to refer to Gameobject. is likely to cause the resource to be released unclean. When you switch scenes, the scene resources are freed in the OnDestroy method. use a struct as much as possible without class. string concatenation operation is relatively long, using StringBuilder.  
    • Performance optimization
use the same material as much as possible to facilitate batch. and use sharedmaterial when referencing. use light maps as much as possible without using real-time lighting. Modify the quality pixellightcount to reduce the lighting calculation overhead. try to use less alphatest shader. It is best to use the shader in the mobile directory. objects that do not move tick the static option. If you have a collision body, it is best not to change their position. reduce the update frequency for physical calculations. Modify the fixed timestep of time. reduces the number of faces in the model. Multi-use textures to show detail. You might consider using LOD 
    • Reduce package size
enable compression on the picture. Enable compression on the mesh. Enables keyframe compression for animations. The normals,tangents option for mesh is checked for none. They are used only when using real-time illumination, normal maps. optimize the grid. use the system's class library sparingly. such as System.Xml. You can use a more compact third-party plug-in. use release build instead of debugging build. enable stripping level. set the API compatibility level to. NET 2.0 subset. Click on the open Editor Log in the console panel to view the log at the time of packing.  
    • Ngui How to reduce Drawcall
try to combine the images in a single map using a material. The depth values of elements that use the same atlas are adjacent or identical.  
    • Conditions for Dynamic Batch
The number of vertices is less than 300. If shader uses vertex Position, Normal, UV0, UV1 and Tangent, then only the.use the same material. The same transform scale is used.if shader uses more than one pass, it cannot batch. a model that accepts real-time shading and cannot batch.  
    • What plugins are used?
PureMVCLitjsonC # LiteA * pathfinding ProjectNGUIRVOThrift 
    • Ngui How to mask the event response of a 3D scene?
Uicamera.raycast (mouseposition, out Uihitinfo)
Uicamera This static method can detect whether to click on a UI element. This layer of interception can be done in the event response of a 3D scene.  
    • The geometrical meaning of vector point multiplication
A number can be obtained by multiplying the points. Generally used to determine the angle between two vectors. a cross-multiply can get a vector perpendicular to the two vectors. Generally used to calculate normals or to determine planes.
    • Describes a one-shape rendering pipeline.

This is the programming rendering pipeline in the CG tutorial. The horizontal line above is processed in the CPU, and the following is the GPU calculation. vertex coloring phase for coordinate transformations. Model space, World space--space-based projection space, visual angle. The Assembly section of the entity is hidden. a lot of online tutorials ... Everyone check ... 
    • What is the difference between dictionary<k,v> and Hashtable?
The dictionary<k,v> is generic and the type of k,v has been pre-determined. The type of k,v within the Hashtable is variable. dictionary<k,v> If add is sequential, the element is ordered. And the interior of Hashtable is disordered. When K is a value type,,dictionary<k,v> is faster than Hashtable. Because value types are loaded/disassembled within Hashtable.  
    • What is the difference between LinkedList and list? Insert Delete, query who is fast?
LinkedList is actually a doubly linked list. A list is a layer of the array's encapsulation. The length of the array will grow dynamically. Reassigning an array can have a performance overhead.  

Unity3d Interview Questions

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.