Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

[help] Accessing CustomClient/Server #263

Closed HaleyMueller closed 1 year ago

HaleyMueller commented 1 year ago

Hopefully last questions.

I was able to override the SendReliable and SendUnreliable on both client and server and send them through my custom network. The problem is that I see that I need to call base.NetworkReceivedPacket on the client/server. The question is how do I access my CustomClient and CustomServer? I can't seem to find a way to access it through the CustomCommsNetwork.

Also, is there an override where I can set the CustomPeer properties so I can set the client id on it? I see that NetworkReceivedPacket requires a peer. Do I create it there?

Thanks a bunch!

HaleyMueller commented 1 year ago

I just save a reference to my client and server and it works now. Also I figured out how to set the properties on the CustomPeer.

martindevans commented 1 year ago

For future reference: the BaseCommsNetwork script has Server and Client properties which are accessible to you implementation of that script.