the error happens when i pause everything with Time.timeScale = 0f;
it seems like only player’s audio is causing the error; also it’s very inconsistent, sometimes there are a few errors, sometimes there’s none. I haven’t touched player audio script in a few months, so no idea why it’s started doing this.
my version is 6000.0.58f1
So after a bunch of testing it looks like it happens if an audio source has RigidBody (not 2d) on it (or in my case inherit it). AND the audio source has to play Audio Random Container.
I don’t know what’s up with Rb and ARC, but there’s definitely something. Is this a bug?
Literally yesterday i got this error on uniy 6.5.0a7
But it has nothing to do with rigidbody. Only if you use AudioRandomContainer it leaks as f.
Also Editor start dying if you select AudioSource component and it for some reason generate GC for inspector
Im on 6000.0.58f1 and it’s definitely RB for me. Whenever ARC is playing and I set timescale to 0, if the object has no RB, there are no leaks. Maybe your case is a bit different.
Please, definitely make a bug report if you haven’t already. The issues might still be related and either way we don’t want this affecting us in the near future.
The situation is:
AudioSorce is in a child object of Player wich has a rigidbody.
From code is calling AudioSource.Play.
AudioSource has a AudioRandomContainer set.
From my limited testing:
No matter what the audioclip, the problem persists. ( tested with .mp3 )
2d / 3d blend or any other config in audioSource does not change the problem.
Same goes for the AudioRandomContainer configs/params.
The problem is inconsistent, sometimes gives me 1 warning per second, others 1 warning per minute.
Fullscreening the “Game” window makes it more consistent, sometimes 5+ warnings per second.
Having the AudioSource with no parent ( outside the player parent ) gives no warnings
After even more testing i found something more specific:
Placing the AudioSource as another obj ( with rigidbody ) trigger the same warning.
The configuration in the RigidBody component does not seem to affect the problem either.
Having the AudioSource outside during the scene, hitting play and moving it inside fixes the problem, but ONLY IF IT HAS STARTED PLAYING OUTSIDE, meaning was outside the player, played once, them moved inside the player WILL FIX IT
Doing the other way around, having it in the player, them move outside in play, have the same effect, only counting when the first “play” happened
So the warning will only be given if the AudioSource had it’s first “play” inside or not of a object with rigidbody.
Unity version: 6.5 ( 6.000.5.6f1 ) DX12
In my case this won’t be much of a problem, since the game will have a static camera in a somewhat 2D aspect, no sounds will need 3D blending, so i will just have the AudioSource outside any rigidbody, but this needs fixing.