Should I create separate projects for each platform I publish to?

I’m creating a multiplayer game. I would like to publish it to multiple platforms. Should I create separate projects? I’m using the new input system.

I believe that the whole point of unity was using a single codebase for multiple platform and being able to switch build target with a button press.

You may have separate folders for different platforms (just so you won’t waste time reimporting upon switch), but in my opinion, they all should be pointing at the same master repository with code and they all should use the same codebase.

5 Likes

This sounds like a nightmare IMO.

4 Likes

Ok, just wanted opinions thanks.

1 Like

This is precisely what I do with large projects. Switching platforms is not that lengthy of a process for me but I like having multiple projects open working on one while performing a lengthy process on the others.

1 Like

Hell no!

That’s what preprocessor directives in Unity are for…

#if UNITY_WEBGL
// Do something specific for WebGL
#elif UNITY_STANDALONE
// Do something specific for PC standalone build
#elif UNITY_EDITOR
// Do something only while in the editor

If you had separate projects each time you edited something in a scene you’d need to merge or do those same changes in the other projects.

Unless you want to have a project running HDRP on one platform, and built-in renderer on others, I’d highly recommend sticking to one project.

3 Likes