当前位置:网站首页>GetEnumerator method and MoveNext and Reset methods in Unity
GetEnumerator method and MoveNext and Reset methods in Unity
2022-08-05 06:33:00 【IT apprentice.】
GetEnumerator method and MoveNext and Reset methods in Unity
Function: is a method in the System.Collections namespace that returns an enumerator that iterates through the collection.
Return value: Returns an actionable enumerator.
Note: can be used to read data in a collection, but not to modify the underlying collection.
As shown here, we define a dictionary to store the data of type ClientWorldNodeData and its index:
Then call it here:
You can get all the enumeration data in this collection (can only be read but not modified), and the enumerator will be positioned before the first element in the collection at the beginning.Then use the IEnumerator.Current property (similar to pointers in C++) to get the element in the collection at the current position of the enumerator.
MoveNext
Action: MoveNext sets Current to the next element.(similar to moving a pointer back one place in C++)
Note: If MoveNext goes past the end of the set, the enumerator will be placed last in the setAfter an element, and MoveNext returns false.
Reset
Effect: Sets the enumerator to its initial position, which is before the first element in the collection.
边栏推荐
- 智能运维会取代人工运维吗?
- Problems encountered in installing Yolo3 target detection module in Autoware
- I/O performance and reliability
- DevOps process demo (practical record)
- LeetCode Interview Questions
- What is Alibaba Cloud Express Beauty Station?
- Programmers should understand I/O this way
- D46_Force applied to rigid body
- 原生JS带你了解数组方法实现及使用
- Detailed explanation of ten solutions across domains (summary)
猜你喜欢
随机推荐
618, you may be able to wake up a little bit
Difference between link and @improt
One-arm routing experiment and three-layer switch experiment
spark source code - task submission process - 3-ApplicationMaster
增长:IT运维发展趋势报告
sql server 重复值在后面计数
selenium模块的操作之拉钩
媒体查询、rem移动端适配
King power volume LinkSLA, realize operations engineer is happy fishing
NAT experiment
Mina disconnects and reconnects
The problem come from line screening process
Regular expression small example - get number character and repeated the most
实力卷王LinkSLA,实现运维工程师快乐摸鱼
Disk management and file systems
运维的高光时刻,从智能化开始
el-progress implements different colors of the progress bar
Proprietary host CDH
Autoware--Beike Tianhui rfans lidar uses the camera & lidar joint calibration file to verify the fusion effect of point cloud images
深度 Zabbix 使用指南——来自惨绿少年







![[issue resolved] - jenkins pipeline checkout timeout](/img/3d/c14276d2b5ce18fc3d1288abb059c0.png)
