当前位置:网站首页>Unity interview questions (continuously updated)
Unity interview questions (continuously updated)
2022-07-04 16:54:00 【Drink my toner】
1.UGUI matters needing attention
1.GameObject.SetActive Use... As little as possible . Because in OnEnable and OnDisenable Will reset all the dirty signs
2. Do not use tile type operation Image Use Rawimage
3. Raycast Turn it off if you don't need it ,Unity On by default , But there are a lot of UI There is no need to receive click events
4. UI It is necessary to pay attention to whether the materials are the same in the batch , picture ID Whether or not the same
5. UI On the Color attribute Direct modification is not recommended , Modification will cause redrawing mesh, It is suggested that changing the shader color will not cause this problem
2. Differences between structs and classes
1. Class is a reference type , A structure is a value type .
2. The structure can be dispensed with new Create instance object , Class must use new To create an instance object .
3. Structs cannot inherit classes or structs , Interface can be implemented ; Class can inherit class , Cannot inherit structure , Interface can be implemented .
4. Structure cannot declare a default constructor , The constructor of the structure must assign values to all fields .
3.C# Of Dictionary
1.Dictionary Every element in it is a key value pair ( It's made up of two elements : Key and value )
2. The key must be unique , And values don't need to be unique
3. Keys and values can be of any type ( such as :string, int, Custom type , wait )
4. The time to read a value through a key is close to O(1)
4. The difference between stack and heap
1. Stacks are allocated automatically by the system , And heap is thought to be developed
2. The space obtained by stack is relatively small , The space gained by heap is relatively large
3. The stack is allocated by the system , It's quite fast , The heap is generally slow
4. A stack is a continuous space , The heap is a discontinuous space
5.Navigation
establish NavMesh Navigation grid : After creating all the components, bake out the data needed by the runtime navigation system , Select the grid to navigate , stay static The admission Navigation, Set properties ,Bake.
6. Red and black trees
Binary search tree (BST) What are the characteristics of ?
1. The values of all nodes on the left subtree are less than or equal to the values of its root nodes .
2. The value of all nodes on the right subtree is greater than or equal to the value of its root node .
3. Left 、 The right subtree is also a binary sort tree .
In order to solve the imbalance caused by inserting new nodes into binary search tree many times , Red and black trees came into being .
In addition to the characteristics of binary search tree, red black tree , It's also attached with :
1. The nodes are red or black .
2. The root node is black .
3. Each leaf node is black and empty (NIL node ).
4 The two child nodes of each red node are black .( There cannot be two consecutive red nodes on all paths from each leaf to the root )
5. All paths from any node to each leaf contain the same number of black nodes .
The longest path from heel to leaf will not exceed the shortest path 2 times .
When inserting again , In order to keep the red black tree always red black tree , Discoloration 、 left-handed 、 Three adjustment methods of right rotation .
7.Unity Life cycle
(1) Reset() When the component is reset to the default value ( For editing status only )
(2)Awake() Script component loading ( Call once )
(3)OnEnable() Is called when the game object can call
(4) Start() first Update Before it happened ( Call once )
(5)FixedUpdate() Fixed time call , Commonly used in Physics related calculations , For example, yes. Rigidbody The operation of
(6)Update() Where most of the game behavior code is executed , Except for physical code
(7)LateUpdate() Every frame Update After call
(8)OnGUI() draw GUI Called when the
(9)OnDisable() When the object is set to unavailable
(10)OnDestroy() Call... When the component is destroyed
边栏推荐
- Vscode setting outline shortcut keys to improve efficiency
- APOC custom functions and procedures
- Accounting regulations and professional ethics [6]
- Can you really use MySQL explain?
- Use and principle of thread pool
- Practice: fabric user certificate revocation operation process
- Model fusion -- stacking principle and Implementation
- Final consistency of MESI cache in CPU -- why does CPU need cache
- Model fusion -- stacking principle and Implementation
- Four point probe Industry Research Report - market status analysis and development prospect prediction
猜你喜欢
DC-2靶场搭建及渗透实战详细过程(DC靶场系列)
Talking about Net core how to use efcore to inject multiple instances of a context annotation type for connecting to the master-slave database
《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下
Why do you say that the maximum single table of MySQL database is 20million? Based on what?
Visual Studio 2019 (LocalDB)MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782
[North Asia data recovery] a database data recovery case where the disk on which the database is located is unrecognized due to the RAID disk failure of HP DL380 server
Move, say goodbye to the past again
Game theory
I let the database lock the table! Almost fired!
GO开发:如何利用Go单例模式保障流媒体高并发的安全性?
随机推荐
What is torch NN?
时序图数据建模与产业链分析
基于check-point机制的任务状态回滚和数据分块任务
How to contribute to the source code of ongdb core project
Change the mouse pointer on ngclick - change the mouse pointer on ngclick
Research Report on market supply and demand and strategy of tetramethylpyrazine industry in China
安信证券网上开户安全吗 开户收费吗
C# 实现 FFT 正反变换 和 频域滤波
Principle and general steps of SQL injection
表单传递时,如何隐式将值传过去
Lv166 turned over
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
Model fusion -- stacking principle and Implementation
overflow:auto与felx结合的用法
Overview of convolutional neural network structure optimization
Game theory
基于wifi控制的51单片机温度报警器
Move, say goodbye to the past again
Market trend report, technical innovation and market forecast of taillight components in China
Common knowledge of unity Editor Extension