# Sandbox.BaseInventoryComponent.AutoSwitchOnPickup

```csharp
bool AutoSwitchOnPickup { get; set; }
```

Switch to a picked up item when it's better than the active one (see
[Sandbox.BaseInventoryComponent.ShouldAutoSwitchTo](/api/Sandbox.BaseInventoryComponent/ShouldAutoSwitchTo)). Empty hands always deploy the pickup.

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
