Switching to NetworkBehavior, effect on MonoBehavior Communications

Hi there,
I think I know the answer, but I just wanted to confirm…

I have a game built, I want to add multiplayer to it. My concern is, with the switch to a NetworkBehavior, will this effect anything, in terms of the former MonoBehavior, to commincate with other monobehavior scripts?

NetworkBehaviour inherited from MonoBehaviour.

For player prefabs it’s automatically create and destroy player object when client connected & disconnected.

So concern about null reference if you have dependency on it.

Right, so just to be clear, I could in theory, build a game with no intention for multiplayer, but use only NetworkBehavior?

“Right, so just to be clear, I could in theory, build a game with no intention for multiplayer, but use only NetworkBehavior?”

NOPE.

There is so much to do for multiplayer that you can’t do this.
I think it’s a bad idea.

1 Like

It’s no change on how to communication between NetworkBehavior & MonoBehavior.
But you have to think about what variable/event you want to share over network.
NetworkBehavior use when that object need network synchronise, else you may use MonoBehaviour.

If you concern about switch back to single player then you can ground up base on Unity Networking / UNET. So you can setup your machine as a host (client and server in it) then it’ll be a single player game now.

1 Like

No problem.
I am quite sure I got it. Just checking the details.