Report
s&box NPC: cache schedules by type in Dictionary to avoid per-tick allocation, interrupt via EndCurrentSchedule()
0abea33c-5a54-47da-974d-2a8537472053
Developers building NPCs in s&box often recreate schedule/behavior objects every tick, causing allocations. The correct pattern caches schedules by type and reuses them, only reinitializing when a new schedule is selected.