#Cannot destroy actor

1 messages · Page 1 of 1 (latest)

wooden walrus
#

My code literally like this

            this.gameObject.destroy;
        }```
The class is extends Behavior, and I add it as component, so I need to destroy actor that is on scene, with component that includes that code
eternal solar
#

Hey 👋
Destroy is a function, you need to add () after the function name in order to call it.

burnt wadi
#

Change your code to this.gameObject.destroy()

wooden walrus
#

Ahh, thank you, now I feel dumb 😅😂😂