当前位置:网站首页>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.
边栏推荐
猜你喜欢

Technology Sharing Miscellaneous Technologies

By solving these three problems, the operation and maintenance efficiency will exceed 90% of the hospital

Cloud Computing Basics - Study Notes

vim教程:vimtutor

el-autocomplete使用

static routing

One-arm routing experiment and three-layer switch experiment

In-depth Zabbix user guide - from the green boy

el-progress implements different colors of the progress bar

增长:IT运维发展趋势报告
随机推荐
DevOps流程demo(实操记录)
教您简单几步实现工业树莓派正确安装RS232转USB驱动
带你深入了解Cookie
flink cdc 目前支持Gauss数据库源吗
Wechat applet page jump to pass parameters
Wireshark packet capture and common filtering methods
多线程之传递参数
LeetCode练习及自己理解记录(1)
Small example of regular expression--validate email address
Next-Generation Parsing Technology - Cloud Parsing
跨域的十种解决方案详解(总结)
Seven Ways to Center a Box Horizontally and Vertically
干货!教您使用工业树莓派结合CODESYS配置EtherCAT主站
Spark source code - task submission process - 6-sparkContext initialization
Transport layer protocol (TCP 3-way handshake)
[ingress]-ingress exposes services using tcp port
5分钟完成mysql离线安装
What's the point of monitoring the involution of the system?
This is indeed the best article on microservice architecture I have read!
Browser Storage for H5