I'm developing an educational game whose main mechanics are not multiplayer-oriented. However, I would like to add a feature that allows the teacher to enter the game and all students can see him, but no student can see the other students. Is there a way to do that?

  • 1
    \$\begingroup\$ If you know the ID of your teacher (even easier if you make them the master in a p2p game), then it should be easy to turn their avatar/model/character's renderer on and just not turn on the other players. I think if you have questions like this though, you definitely need to look into the architecture of networked games more though... \$\endgroup\$ – Mars Feb 18 '20 at 2:44

If one object (teacher) could be seen by others (students) - it is multiplayer game.

If you want to students couldn't see each other - this is details of realization of multiplayer game.

Therefore, yes, there is a way to do that:

Packets about teacher send to all students. Packets about students send only to teacher, but not to another students.

  • \$\begingroup\$ This answer would be even better if it gave some guidance about how to control which packets get sent to whom in a Unity multiplayer game. \$\endgroup\$ – DMGregory Feb 18 '20 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.