Selective third party library compilation

Hi,

I am trying to find a solution to the following problem: Let’s say I create a game where I integrate various third party libraries (Google Play Games, FacebookSDK, Ad frameworks, etc) that do not affect gameplay in a major way (the code is written so that if any of these modules fail, the player can still play the game). I test the game, and all the modules work as intended. After a longer period (10 months for example), I update Unity or any related software and the project no longer compiles dues to Third Party Libraries (which I must update).

If I would like to run the project, only with the core gameplay features which do not depend on any third party libraries, is there any painless way in doing so? Something along the lines of telling Unity “run the game, but don’t compile dependencies x,y and z”.

As an alternative to this, I was thinking about using source control to manage this issue, like keeping a separate Git branch for each third party feature and one branch for the main game, but was curious if there were any “native” solutions for this problem.

Thanks.

Even if none of these external libraries “affect the gameplay” in any way, they are probably integrated into your game in some way, and so your game depends on them (e.g: they are a dependency to your game).

There’s no simple magic solution for this issue, but one solution you could try is to isolate the usage of these 3rd party libraries into specific classes (or “modules”).
Since the game does not rely on any of this to function correctly, you could create a simple “discovery” component that will attempt to find if any of these external 3rd party libraries are present. In case they are present, it will attempt to load them and use them.

If the loading fails (or if these modules are not available), no harm is done and the game can still be played.

Again, this is the idea in a nutshell, depending on the code and libraries used, this may not be a simple task at all.