Different Scripting Defines per Instance?

Hello!

Is it possible to set different scripting defines per instance? I have defines set for a server and a client and I don’t really want to have it as a local instance (build times can be quite long). I am moving from my own soloution where I had multiple editors with different defines set.

With MPPM and the Dedicated Server package you can use Multiplayer Roles to perform code and asset stripping.

In the MPPM window you can choose between Client, Server and Server & Client to define what kind of code/assets the player runs with.

You cannot have custom scripting symbols per virtual player however. I’d strongly advice to use the MP Roles system instead of conditional compilation. It has the same effect but it’s easier to work with.

1 Like

I had a look at this, and I don’t think it works for my use case. I actually have two servers one which the players initially connect to and one which usually gets provisioned when a player creates a game / lobby. I can’t distribute the server source so its all conditionally compiled using defines. In my current / old workflow I would start both servers, and bypass our backend which would provision the game server for the client.

I guess I will have to take the time to allow the game to compile with all the defines active, and then I can use a single build for clients + servers. Seems the multiplayer roles does not let you have different kinds of servers (And the MPPM only lets you have one instance marked as server).

Thanks for your response! :slight_smile: