We are developing a turn based multiplayer game and I am trying to separate Client/Server code. I have tried the steps bellow but haven’t been able to achieve a correct result.
Step1: I have created separate project modules ServerOnly ClientOnly and Shared and setup dependencies so ServerOnly and ClientOnly dont have any dependencies to each other.
to have the modules actually only load on the target they are meant for I edited .uproject file in the two different ways:
Step2 V1: I whitelisted Client Target for ClientOnly and ServerTarget for ServerOnly
In this scenario the modules did not load on any of the targets (dedicated server and clients) when playing in editor
Step2 V2: I blacklisted Client Target for ServerOnly Module and Server Target for ClientOnly Module
In this scenario playing in the editor the modules loaded for both the dedicated server and the clients
more info:
just to give more context I have several UGameInstanceSubSystems in the client module and the server module and I meant for the subsystems to load only on their respective targets (Server, Client) but the result in the two above scenarios was either both load on all targets or none load on any targets
So in short I was not able to create a scenario in which playing the game in editor would result in the modules only working on the target they are supposed to
I have not tested for packaged builds.
Is What I want to acheive possible?
If so what am I doing wrong?