当前位置:网站首页>如何解决在editor模式下 无法删除物体的问题
如何解决在editor模式下 无法删除物体的问题
2022-07-02 03:58:00 【KillJUMP】
void OnValdidate(){
foreach (Transform child in transform) {
StartCoroutine(DestroyGO(child.gameObject));
}
}
IEnumerator DestroyGO(GameObject go) {
yield return new WaitForSeconds(0);
DestroyImmediate(go);
}在编辑模式下,发现无论用DestroyImmediate或者是Destroy,都会报错,用上面的方法就不报错了。
亲测有效!
边栏推荐
- In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
- JVM知识点
- [personnel density detection] matlab simulation of personnel density detection based on morphological processing and GRNN network
- go 函数
- Failed to upgrade schema, error: “file does not exist
- 【IBDFE】基于IBDFE的频域均衡matlab仿真
- Fourier series
- 微信小程序 - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
- Go语言介绍
- The 6th Blue Bridge Cup single chip microcomputer provincial competition
猜你喜欢

Sorted out an ECS summer money saving secret, this time @ old users come and take it away

Failed to upgrade schema, error: “file does not exist

Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini

The second game of the 12th provincial single chip microcomputer competition of the Blue Bridge Cup

蓝桥杯单片机省赛第十二届第二场

Learn more about materialapp and common attribute parsing in fluent

蓝桥杯单片机省赛第十一届第二场

接口调试工具模拟Post上传文件——ApiPost

Wpviewpdf Delphi and Net PDF viewing component

Qt插件之Qt Designer插件实现
随机推荐
Go language introduction
[Li Kou brush questions] 15 Sum of three numbers (double pointer); 17. Letter combination of phone number (recursive backtracking)
【leetcode】74. Search 2D matrix
How to solve the code error when storing array data into the database
How should the team choose the feature branch development mode or trunk development mode?
Which is better, industrial intelligent gateway or edge computing gateway? How to choose the right one?
蓝桥杯单片机数码管技巧
C language: examples of logical operation and judgment selection structure
Sorted out an ECS summer money saving secret, this time @ old users come and take it away
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
Demonstration description of integrated base scheme
JVM知识点
Qt插件之Qt Designer插件实现
【无线图传】基于FPGA的简易无线图像传输系统verilog开发,matlab辅助验证
Monkey test
5G時代全面到來,淺談移動通信的前世今生
[untitled]
SQL: common SQL commands
【力扣刷题】15.三数之和(双指针);17.电话号码的字母组合(递归回溯)
The 11th Blue Bridge Cup single chip microcomputer provincial competition