How to destroy objects via script

Hey there! Already asked this in the discord chat a while ago, but since its unresolved I think this fits here:

unknown

Does anyone know how to do destroy objects via scripts? I tried the above expecting the object that the script is attached to to be destroyed and the second call for CheckObjectExist() not to be executed. Destruction does not happen like this, both print()s return true. Basically trying to recreate something like

Destroy(this.gameobject)

in Unity.

Hope somebody can help me with that, thanks!

2 Likes