Browse Source

being able to delete objects with the delete key on scene explorer.

Pamela Wolf 5 years ago
parent
commit
ccb45794f1

+ 2 - 0
inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx

@@ -215,6 +215,8 @@ export class SceneExplorerComponent extends React.Component<ISceneExplorerCompon
             }
             }
             keyEvent.preventDefault();
             keyEvent.preventDefault();
             return;
             return;
+        } else if(keyEvent.keyCode === 46) { // delete
+            this.state.selectedEntity.dispose();
         }
         }
 
 
         if (!search) {
         if (!search) {