Deleting and Disabling Objects in the Editor

Deleting Game Objects

Game objects can be deleted easily within the Unity editor.

Just select your game object in the Hierarchy or Scene window and press the Delete key on your keyboard.

Another way is to select your game object in the Hierarchy, right-click within the tab, and select Delete.

If you delete a parent object, the child objects will also be deleted. Read more about Parenting.

Changes and additions made while in Play Mode will revert back to the values before playing.

Disabling Game Objects

Sometimes, you just want to disable a game object to use later or to test a scene without it. Hiding objects in the Scene view only hides it in that window.

To disable and enable objects, select the object in the Hierarchy or Scene window.

In the Inspector window, click the checkbox next to the name of the game object to toggle its availability.

A shortcut for this is ALT + SHIFT + A

pageCreating Game ObjectspageUpdating Game Objects in the Editor

Last updated