Destroy

Tutorial

·

Beginner

·

+10XP

·

5 mins

·

(2239)

Unity Technologies

Destroy

How to use the Destroy() function to remove GameObjects and Components at runtime.

This tutorial is included in the Beginner Scripting project.

Previous: Linear Interpolation

Next: GetButton and GetKey

Languages available:

1. Destroy


DestroyBasic


[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop

DestroyOther


[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop

DestroyComponent


[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop

Complete this tutorial