How to script multiple controllable GameObjects and one at the time possession of a GameObject?

Hey guys,

My scene contains GameObjects that all can be controlled.
In this scene only one can be controlled per player.
I have summed some questions (per topic) below that helps with brainstorming:

  1. Way of the defining induvidual controls per controlable object
  • What would be the best way to define indiviual controls for each of the GameObjects? Perhaps something like a PlayerController?
  1. Way of handling the Player possession for each controlable object
  • How can I indicate which player controls which GameObject?
  • Should I handle this in a Manager?
  • Should each PlayerController contain a variable of the player that controls it?
  • Would it be a good idea to add a child GameObject (this representing the player) to a controlable GameObject, so it can detect which player controls it?
  1. Switching between players
  • What would be good for handeling switching between players?
  1. Best practices for muliplayer scaling
  • What technical design scales the best to muliplayer? (think about the PlayerController and the Manager)

I would love to hear your opinions on this topic!

Yours sincerely,
me :smile:

Have you looked through the multiplayer tutorials? I think this series probably answers all of your questions:

https://unity3d.com/learn/tutorials/s/multiplayer-networking

Thanks dgoyette, This helped me a lot!
I also used this video’s as reference for the UNet.

It seems that I may need to filter potential networking frameworks, because my idea may not be optimal in this scenario. I would like to have players navigate to different rooms within an online server. The server will need to handle players in different or equal scenes. Is this possible with Unity’s “Server and Host” concept?