Hello!
I am trying to make my first multiplayer game in Unity using Netcode for GameObjects and have only a little experience i Unity. At first, most went well but now I am running into some problems. My main issue is that (as far as I have understood) you cant have GameObjects or other nullable datatypes as a NetworkVariable.
I have a gridmap and each tile has a script that holds a GameObject reference to what is currently occupying the tile. That works in singleplayer but I want to make this game multiplayer and thus I want to sync what GameObject is occupying each square and be able to access the GameObjects’ scripts. Other solutions which I have thought of that don’t use NetworkVariables seem inefficient and annoying so surely there is a way to work around the fact that you cannot use the GameObject datatype in Network variables? Is that the case, and if not, what is the best way to work around it?