Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

Dissonance & Forge Network Remastered integration errors #67

Closed PulseJK closed 6 years ago

PulseJK commented 6 years ago

Hi,

I've got some errors when i try to set-up a project on Hololens with Forge Remastered & Dissonance. Errors are everytime : "a method or delegate parameters do not match delegate". Steps that i followed:

  1. Set-up a new unity project
  2. Add dissonance from asset store
  3. Add Forge Remastered from asset store
  4. Add forge remastered integration from unity package downloaded on dissonance website
  5. Here we are.

Error log: image

In ForgeRemasteredClient.cs file: image

In ForgeRemasteredServer.cs file: image

Best regards, killian

martindevans commented 6 years ago

Hi Killian,

It looks like the FNR integration is out of date - it works with FNR v23 (the previous major version) but not v24 (the version currently available on the asset store). Sorry about that.

It looks like this should be a fairly simple fix, they've just added a few extra parameters which we don't care about.

In ForgeRemasteredServer.cs

Change: private void ForgeNetworkMessageReceived(NetworkingPlayer player, FrameStream frame) to private void ForgeNetworkMessageReceived(NetworkingPlayer player, [NotNull] FrameStream frame, NetWorker networker)

As a bonus I actually spotted a bug! You may as well include the fix for that to:

Change: NetworkManager.Instance.Networker.messageReceived -= ForgeNetworkMessageReceived; to NetworkManager.Instance.Networker.binaryMessageReceived -= ForgeNetworkMessageReceived;

ForgeRemasteredClient.cs

Change: private void ForgeNetworkMessageReceived(NetworkingPlayer player, FrameStream frame) to private void ForgeNetworkMessageReceived(NetworkingPlayer player, [NotNull] FrameStream frame, NetWorker networker)

PulseJK commented 6 years ago

Yeah :D That is exactly the solution. Well done and thanks you so much for the help.

Another little change to do for this to work, is to change : private void ForgePlayerDisconnected(NetworkingPlayer player) to private void ForgePlayerDisconnected(NetworkingPlayer player, Networker networker) too.

It will trigger an error in the Connect and Disconnect function of ForgeRemasteredServer.cs otherwise.

Thanks again.