unet hlapi - networkmanager; are separated client/server code-projects allowed?

@aabramychev @larus

Hello.

I am currently coding my game where i use 2 projects, one having all the client code, the other only the server code.

I am quite far into development and i have to say i am quite pleased with the results so far., I have not yet experienced any issues at all, except for one, syncvars not working, which i do not need.

Despite my effortless approach, i have been warned by several for splitting up the code.

What is unity’s official stand on this?

Thank you.

HLAPI uses scene ids to decide which messages to apply on which GameObjects in the scene. The scene id will not be the same between your two projects.

So many of the high level built-in features like Commands, SyncVars probably won’t work. You should probably just use the LLAPI in that case.

Thank you for your reply…

The server will act as a dedicated server and it, nor the client, will change scenes…

Actually, that’s not true. In case of HLAPI Pro it works 100% of times. HLAPI has an issue with netId’s but that’s fixed thanks to you :slight_smile:

In any case:
The only thing that should be kept in mind - scenes (only netId objects) and prefabs should be identical. Up until they have identical .meta files, they’ll have same scene id’s. So, if you copy & paste, and then cut out what you don’t need in the scene it will work.

Also both projects’ network managers should have same network configuration and disabled CRC check.

If you willing to go LLAPI route then you don’t need all the above AFAIK. Except network configuration.