# Sandbox.BaseInventoryComponent.AutoSwitchOnEmpty

```csharp
bool AutoSwitchOnEmpty { get; set; }
```

Switch away from the active item when it's spent ([Sandbox.BaseInventoryItem.ShouldAvoid](/api/Sandbox.BaseInventoryItem/ShouldAvoid))
and something that isn't is available - the classic arena-shooter auto-switch. Voluntary, so
the item can still refuse the holster.

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
