void OnDestroy() { if (actor && inventory) { ItemMap.UnregisterInventory(inventory, actor.Position); } }