Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

Dissonance not working with IL2CPP, PUN 2 Unity 2021.1.22f1 #244

Closed FedericoStefan closed 2 years ago

FedericoStefan commented 2 years ago

Context Dissonance isnt working at all with IL2CPP Unity 2021.1.22f1, I dont hear any player with the self and collider option enabled. I receive their audio when using debug options but i just cannot hear them at all.

Expected behavior The player should hear other players with no issue.

Actual behavior The player playback spawns but it simply says "No active session". Back then i used to hear other players without any issue, I didn't change any settings and used the same dissonance since it caused no issue for me.

Steps to Reproduce

  1. Use the PUN 2 player prefab dissonance demo.
  2. Copy them into your own player prefab.
  3. Put dissonance setup into your scene.
  4. You dont hear anybody cause the playback prefab says "No active session".

Dissonance Version: V6.4.1 Unity Version: Unity 2021.1.22f1 OS: Windows 10 Build Settings: Windows X86 with IL2CPP

martindevans commented 2 years ago

This was reported recently to me, it is a bug (miscompile) in IL2CPP. It has been fixed in 2021.2.3f1, so you'll need to upgrade to that (or greater) to get that fix. Unfortunately there is no other workaround.

FedericoStefan commented 2 years ago

Okay, i will upgrade to that version and see if it will work. Its weird cause i didn't change any settings and it used to work, just 1 day later and it stopped working.

FedericoStefan commented 2 years ago

This was reported recently to me, it is a bug (miscompile) in IL2CPP. It has been fixed in 2021.2.3f1, so you'll need to upgrade to that (or greater) to get that fix. Unfortunately there is no other workaround.

So updating caused these three issues (I updated to the latest Unity 2021 version available) Server\ServerRelay.cs(68,20): error CS0029: Cannot implicitly convert type 'void' to 'System.ArraySegment<byte>' Client\PeerVoiceReceiver.cs(119,21): error CS0815: Cannot assign void to an implicitly-typed variable Playback\DecoderPipeline.cs(141,17): error CS0815: Cannot assign void to an implicitly-typed variable The first error leads to this: data = data.CopyTo(data.Array); The second error: var frame = reader.ReadByteSegment().CopyTo(_byteArrPool.Get()); The last/third error: var frameCopy = packet.EncodedAudioFrame.CopyTo(_bytePool.Get());

Can you help me?