#NetworkBehavior.netId vs netid

3 messages · Page 1 of 1 (latest)

eternal kayak
#

I'm using Mirror in client and server which are separate unity projects. In both projects there's a multiplayer player script PlayerNet. In one of the projects there's a property:
playernet.netId
and in other it's
playernet.netid <- with a small i

Both projects use same exact version of Mirror, don't have any network related packages etc. One of them was initially created with an older version of unity though.

Is it safe to use netId and netid interchangeably or should this be fixed? Eg by making a new project for the older one and migrating the scripts?

humble skiff
# eternal kayak I'm using Mirror in client and server which are separate unity projects. In both...

Should not be separate projects in the first place. You make both the server and client builds out of the same project. Even if you try to make a separate server project, you'd still have to junction folders with the client project for networked prefabs, network behaviours, and scenes with networked objects in them so their meta and scene data files match, and typically you wouldn't take that step until the very end of development.

eternal kayak
#

Thanks but let me clarify the use case. The game is RTS using lockstep. The servers are extremely minimal, they don't have any game state, they just set up the game and then relay player input. The need to copy over files exists but there are a very small number of classes that are used on server. It's using RPC and CMD calls only.