当前位置:网站首页>如何解决在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,都会报错,用上面的方法就不报错了。
亲测有效!
边栏推荐
- C language: examples of logical operation and judgment selection structure
- 【leetcode】34. Find the first and last positions of elements in a sorted array
- Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
- Go function
- Object oriented thinking
- Welcome the winter vacation multi school league game 2 partial solution (B, C, D, F, G, H)
- Nacos 配置中心整体设计原理分析(持久化,集群,信息同步)
- Basic syntax of unity script (6) - specific folder
- VS2010插件NuGet
- Go语言介绍
猜你喜欢
0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
Cloud service selection of enterprises: comparative analysis of SaaS, PAAS and IAAs
Raspberry pie GPIO pin controls traffic light and buzzer
The 10th Blue Bridge Cup single chip microcomputer provincial competition
PR zero foundation introductory guide note 2
2022-07-01:某公司年会上,大家要玩一食发奖金游戏,一共有n个员工, 每个员工都有建设积分和捣乱积分, 他们需要排成一队,在队伍最前面的一定是老板,老板也有建设积分和捣乱积分, 排好队后,所有
【无线图传】基于FPGA的简易无线图像传输系统verilog开发,matlab辅助验证
WPViewPDF Delphi 和 .NET 的 PDF 查看组件
蓝桥杯单片机省赛第九届
Opencv learning example code 3.2.4 LUT
随机推荐
Realizing deep learning framework from zero -- Introduction to neural network
Déchirure à la main - tri
Influence of air resistance on the trajectory of table tennis
What is the logical structure of database file
初识string+简单用法(二)
go 变量与常量
Vite: configure IP access
2022-07-01: at the annual meeting of a company, everyone is going to play a game of giving bonuses. There are a total of N employees. Each employee has construction points and trouble points. They nee
Monkey测试
High performance and low power cortex-a53 core board | i.mx8m Mini
Wpviewpdf Delphi and Net PDF viewing component
How should the team choose the feature branch development mode or trunk development mode?
Go language naming specification
Fingertips life Chapter 4 modules and packages
[Li Kou brush questions] 15 Sum of three numbers (double pointer); 17. Letter combination of phone number (recursive backtracking)
初识P4语言
Homework in Chapter 3 of slam course of dark blue vision -- derivative application of T6 common functions
The fourth provincial competition of Bluebridge cup single chip microcomputer
Welcome the winter vacation multi school league game 2 partial solution (B, C, D, F, G, H)
蓝桥杯单片机省赛第十二届第一场