当前位置:网站首页>如何解决在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,都会报错,用上面的方法就不报错了。
亲测有效!
边栏推荐
- Basic syntax of unity script (8) - collaborative program and destruction method
- NLog use
- Cloud service selection of enterprises: comparative analysis of SaaS, PAAS and IAAs
- 蓝桥杯单片机数码管技巧
- The first game of the 12th Blue Bridge Cup single chip microcomputer provincial competition
- Raspberry pie GPIO pin controls traffic light and buzzer
- 《西线无战事》我们才刚开始热爱生活,却不得不对一切开炮
- 蓝桥杯单片机省赛第九届
- How should the team choose the feature branch development mode or trunk development mode?
- Pandora IOT development board learning (HAL Library) - Experiment 2 buzzer experiment (learning notes)
猜你喜欢

0基础如何学习自动化测试?按照这7步一步一步来学习就成功了
![[untitled]](/img/53/cb61622cfcc73a347d2d5e852a5421.jpg)
[untitled]

蓝桥杯单片机省赛第八届

0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed

Use of go package

Nacos 配置中心整体设计原理分析(持久化,集群,信息同步)

Suggestions on settlement solution of u standard contract position explosion

Pandora IOT development board learning (RT thread) - Experiment 1 LED flashing experiment (learning notes)

整理了一份ECS夏日省钱秘籍,这次@老用户快来领走

Realizing deep learning framework from zero -- Introduction to neural network
随机推荐
蓝桥杯单片机省赛第十一届第二场
VS2010插件NuGet
regular expression
Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
Oracle common SQL
go 分支与循环
初识string+简单用法(二)
Imageai installation
go 包的使用
BiShe cinema ticket purchasing system based on SSM
PR zero foundation introductory guide note 2
Homework in Chapter 3 of slam course of dark blue vision -- derivative application of T6 common functions
Influence of air resistance on the trajectory of table tennis
Basic syntax of unity script (8) - collaborative program and destruction method
[designmode] Prototype Pattern
Use of go package
JVM知识点
ImageAI安装
蓝桥杯单片机省赛第十届
蓝桥杯单片机第六届温度记录器