I have lots of 3D events in my scene in unity, will it take up CPU or memory when player cannot hear them?

I place lots of 3d events in my scene, these events will be loaded when players enter this scene. I am worried about the memory and cpu usage if these events will be played all the time whether players can hear them or not.

Ultimately I can’t make a judgement on your specific case without a lot more info, but I would recommend against premature optimization. If you do find yourself running into issues, connect to your game with Live Update and record a profiler session, which should allow you to diagnose potential performance issues.

That said, there are a number of potential things to keep in mind:

  • When creating your event instances, how many assets need to be loaded? You may wish to load assets in advance if you need to ensure an exact playback start time, especially if you’re loading many assets at once
  • How many assets are being streamed? Streamed assets aren’t loaded into memory in their entirety, but are streamed piecemeal on-demand, which saves on memory usage but increases CPU usage and disk I/O
  • You may wish to set a max instance limit for the event in the “Event Macros” section (bottom right of the Event Editor) so that only a certain number are playing at any given time. The “Virtualize” stealing mode can also be used to allow FMOD to stop producing output for event instances that are the least audible, and resume output when they stop being the least audible, which will likely be useful for your use-case