Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Bug Audio causes EditorLoop to spike CPU usage.

Discussion in '2021.1 Beta' started by revybeast, Mar 12, 2021.

  1. revybeast

    revybeast

    Joined:
    Nov 5, 2020
    Posts:
    19
    So I have an audio listener on my camera. If I bring in another object with an AudioSource component, and when I move the player, my frame drops by over 75%. If I get rid of the audio listener, or the audio source, the lag goes away. The profiler says its the editor loop.
    Using Unity 2021.1. b10

    I included a picture of the profiler screenshot. The spikes occur only when the character is moving. It doesnt matter if the audio source is moving or not. When the player isnt moving, frames are fine. When the player is moving with audio source on the spider removed, frames are fine. If the player is moving and the audio source is on the spider, massive frame drop, editor loop cpu usage 90%.
     

    Attached Files:

    Last edited: Mar 12, 2021
  2. revybeast

    revybeast

    Joined:
    Nov 5, 2020
    Posts:
    19
    I might've fixed it by changing audio import setting to decompress on load (?)
     
  3. revybeast

    revybeast

    Joined:
    Nov 5, 2020
    Posts:
    19
    yep, solved.
     
  4. revybeast

    revybeast

    Joined:
    Nov 5, 2020
    Posts:
    19
    It seems the issue is back. It started when I changed an audio source spatial blend to 3d. Changing it back to 2d doesnt seem to fix it.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,104
    Hi @revybeast,

    Could you please submit a bug report with the project attached so we can have a look at it?