1 Hour Ago
Optimized entities with flag toggles spawning: EntityFlag_Toggle now bakes its listeners at prefab preprocessing and calls them directly instead of invoking its UnityEvent The first UnityEvent invoke on every new instance looked its listeners up by reflection. Rough profiling from the editor, loading in a mix of 248 entities (io, locks, doors and some random deployables) EntityFlag.DoUpdate 26ms -> 2ms total ~100us -> ~9us per entity ~940 KB -> ~231 KB total