ValveSoftware / steam-audio

Steam Audio
https://valvesoftware.github.io/steam-audio/
Apache License 2.0
2.2k stars 152 forks source link

SteamAudioSource debug problem #344

Closed Roceh closed 2 months ago

Roceh commented 2 months ago

System Information

Issue Description Exception during initial startup when connected to unity with visual studio.

Steps To Reproduce Steps to reproduce the behavior:

  1. Attach to unity from visual studio
  2. When playing a scene with SteamAudioSource present, visual studio generates an exception

Stops here:

 ~SteamAudioSource()
 {
         mThis.Free();
 }

this seems to stop it occuring.

 ~SteamAudioSource()
 {
         if (mThis.IsAllocated)
            mThis.Free();
 }

I belive as Awake is not called in editor (where mThis is created), but object is still created hence trigger destructor.