当前位置:网站首页>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
边栏推荐
- Lv166 turned over
- Research Report on surgical otorhinolaryngology equipment industry - market status analysis and development prospect prediction
- Principle and general steps of SQL injection
- ~89 deformation translation
- FIREBIRD使用经验总结
- Software Engineer vs Hardware Engineer
- Practice: fabric user certificate revocation operation process
- Array filter fliter in JS
- Using celery in projects
- Firebird experience summary
猜你喜欢
从数数开始
Vscode setting outline shortcut keys to improve efficiency
Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
程序员怎么才能提高代码编写速度?
MFC implementation of ACM basic questions encoded by the number of characters
Game theory
What should ABAP do when it calls a third-party API and encounters garbled code?
一图看懂ThreadLocal
Common knowledge of unity Editor Extension
Detailed process of DC-2 range construction and penetration practice (DC range Series)
随机推荐
嵌入式软件架构设计-函数调用
Sequence diagram data modeling and industrial chain analysis
线性时间排序
Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
How to implicitly pass values when transferring forms
Research Report on market supply and demand and strategy of China's Sodium Tetraphenylborate (cas+143-66-8) industry
GO开发:如何利用Go单例模式保障流媒体高并发的安全性?
Talking about Net core how to use efcore to inject multiple instances of a context annotation type for connecting to the master-slave database
[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
Maximum subarray and matrix multiplication
C language: implementation of daffodil number function
Vscode prompt Please install clang or check configuration 'clang executable‘
~89 deformation translation
同构图与异构图CYPHER-TASK设计与TASK锁机制
Accounting regulations and professional ethics [10]
Vscode setting outline shortcut keys to improve efficiency
Readis configuration and optimization of NoSQL (final chapter)
System.currentTimeMillis() 和 System.nanoTime() 哪个更快?别用错了!
165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
基于check-point实现图数据构建任务