Pooling can reduce repeated creation work during play, at the cost of startup work and retained memory. Profile the actual scene on its target hardware before choosing capacities.
Reuse projectiles#
- Enable automatic pooling on the launcher when a projectile will be launched repeatedly.
- Turn on Prewarm All Loadout Prefabs only when those entries need to be ready immediately. It is off by default.
- Add a per-entry pooling override only when one projectile needs a different capacity.
- The first configuration for a prefab's existing pool wins while that pool remains available.
Budget trajectory work#
Hide or disable previews that are not needed. Set refresh frequency, distance, duration, step count and geometry budgets for the scene. The trajectory scheduler reuses buffers and bounds automatic refresh frequency. Cache age lets an unchanged source refresh periodically when scene geometry changes.
If a performance profile owns quality, refresh, buffer, cache or geometry values, clear it before changing those local controls. For manual refresh, use Invalidate() or Refresh() instead of forcing duplicate calculations every frame.
Measure the work#
Check frame time, allocations, physics cost and rendering cost separately with a representative number of simultaneous projectiles. An ordinary prefab with a root IProjectileLaunchReceiver or dynamic native Rigidbody can own its own movement, contacts and cleanup; it does not automatically use toolkit pooling or typed events.
The supplied resource profiles are starting points, not device benchmarks. The guide makes no universal FPS, allocation-free or Android/iOS performance guarantee.