当前位置:网站首页>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.
边栏推荐
- Configuration of routers and static routes
- 单臂路由实验和三层交换机实验
- Quick question and quick answer - FAQ of Tencent Cloud Server
- LeetCode Interview Questions
- King power volume LinkSLA, realize operations engineer is happy fishing
- What impact does CIPU have on the cloud computing industry?
- LinkSLA insists that users come first and creates a sustainable operation and maintenance service plan
- flink cdc 目前支持Gauss数据库源吗
- 干货!教您使用工业树莓派结合CODESYS配置EtherCAT主站
- What should I do if the SSL certificate prompts that it is expired or invalid?
猜你喜欢
Mina disconnects and reconnects
NIO works is analysed
Transport layer protocol (TCP 3-way handshake)
selenium模块的操作之拉钩
What are some things that you only know when you do operation and maintenance?
初识网页与浏览器
disabledDate 日期选择器 datePicker
sql server duplicate values are counted after
The highlight moment of operation and maintenance starts with intelligence
Autoware--Beike Tianhui rfans lidar uses the camera & lidar joint calibration file to verify the fusion effect of point cloud images
随机推荐
static routing
NIO works is analysed
媒体查询、rem移动端适配
The size of the screen adaptation
Into the pre-service, thought they play so flowers
Collection of error records (write down when you encounter them)
Tencent Cloud Message Queue CMQ
Quick question and quick answer - FAQ of Tencent Cloud Server
el-progress implements different colors of the progress bar
增长:IT运维发展趋势报告
input detailed file upload
监控系统的内卷,有什么讲究?
请问下通过flink sql读取hologres 的两张表的 binlog,然后如何进行join?
网络不通?服务丢包?看这篇就够了
From "dual card dual standby" to "dual communication", vivo took the lead in promoting the implementation of the DSDA architecture
深度 Zabbix 使用指南——来自惨绿少年
Network Troubleshooting Basics - Study Notes
Unity realizes first-person roaming (nanny-level tutorial)
Complete mysql offline installation in 5 minutes
618,你也许可以清醒亿点点