Timeline for Unity3d - Do I need to destroy gameobject AND script?
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 21, 2018 at 14:35 | vote | accept | Jacksonkr | ||
| Aug 18, 2018 at 5:08 | comment | added | derHugo | It totally depends on the situation ... Sometimes removing only the component is exactly what you want to do.. sometimes you want to destroy the entire object. Your last section is the actual answer for the OP: destroying it again in OnDestroy makes no sense .... | |
| Aug 17, 2018 at 15:27 | comment | added | Raphael Schmitz | This is completely intuitive when seeing that GameObjects don't really do anything and are just "bags of components" with a name and ID. Everything that a GameObject "does" is actually a component doing something. | |
| Aug 17, 2018 at 14:05 | history | answered | Evorlor♦ | CC BY-SA 4.0 |