Search Unity

[MLAPI] NetworkBehaviours in Singleplayer

Discussion in 'Netcode for GameObjects' started by BigKahuna311, May 11, 2021.

  1. BigKahuna311

    BigKahuna311

    Joined:
    Sep 9, 2019
    Posts:
    5
    Hello,

    Quick question I'd love some insight on. I created a game playable for singleplayer, and I am now reworking my scripts to fit multiplayer in as well. If I create all my scripts as network behaviors and have ServerRpc and ClientRpc methods will this affect my singleplayer mode at all? Should multiplayer mode have its own set of nearly identical scripts but have been 'multiplayer-ized' if that makes any sense?

    Thanks
     
  2. PastelStoic

    PastelStoic

    Joined:
    Mar 22, 2020
    Posts:
    4
    A game run as a host will be the same as singleplayer, I'm pretty sure, so no need to make a different set for offline play.
     
    BigKahuna311 likes this.
  3. BigKahuna311

    BigKahuna311

    Joined:
    Sep 9, 2019
    Posts:
    5
    Thanks!