Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Messages not firing HostSide in a Host + Client situation #342

Closed
nopogo opened this issue Jun 2, 2020 · 2 comments
Closed

Custom Messages not firing HostSide in a Host + Client situation #342

nopogo opened this issue Jun 2, 2020 · 2 comments
Labels
type:bug Bug Report

Comments

@nopogo
Copy link

nopogo commented Jun 2, 2020

Describe the bug
When using the custom messaging manager the message is only received on a client, not on the host client

To Reproduce
Steps to reproduce the behavior:
https://pastebin.com/YTpcH55Z

Expected behavior
I Expect the CustomMessagingManager to work even server or host side since I am registering a message handler.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2019.3
  • MLAPI Version: v11.11.2
@nopogo nopogo added the type:bug Bug Report label Jun 2, 2020
@TwoTenPvP
Copy link
Contributor

This behaviour is by design. Unlike RPC's they do not invoke through message buffers. Custom messages are simply to communicate between different clients.

@juzdepeche
Copy link

@TwoTenPvP quick question for you.

Let's say I want to broadcast a message from the server to all the clients including the host with the custom message system (I would use RPC's but my GameObject has to be DontDestroyOnLoad so it can't be a NetworkObject).

Is "sending a custom message to all my clients and having a method called from the server to the client for the host" the best practice? Or is there any better workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants