Joris Eijmberts

Turning crazy ideas into games!

Unsupported standalone

Details comparing the unsupported platform vs the Steam Platform and why pre-processor directives & assembly definitions were mandatory to get this to work

As explained in the article about the unsupported platfrom, the unsupported platform is able to run as an independent platform of CP Social. This is useful for when the game is released on platform , like itch.io, that doesn’t have a third party provider, like Google or Apple, that supplies means to track achievements or manage user data.

How?

To be able to create a build in unity that only uses the unsupported platform of CP Social, I made use of assembly definitions that were constrained by pre-processor directives.

Constraining assemblies

An assembly definition in Unity can be constrained to a target platform like, Android, iOS, Linux, Xbox, PlayStation, etc. (check boxes in the ‘platforms’ section in the image below)

Besides constraining an assembly to a target platform, it’s possible to constrain an assembly with pre-processor directives (‘define constraints’ section in the image below). This means that the assembly will only compiled in a build when this pre-processor directive is defined in Unity’s player settings.

CP Social’s unsupported platform assembly definition

Building

By creating build-scripts I was able to create a build pipeline that had the ability that based on the selected platform, change the scripting defines just before a build, so it would create a build that contained the required assemblies for CP Social to work correctly.

Unity menu items for the custom build pipeline

Unity build menu

By default when using the Unity build menu, CP Social would be correctly compiled with the right assemblies for the selected target platform. But to be able to create a build ‘only’ containing the Unsupported platform an no other platforms, the custom build pipeline had to be used.

Unity build menu

Why?

Creating builds that don’t include any links to third party service providers like Google or Apple can be useful. A couple of these reasons are listed below.

No third party service provider available

Not all game distribution platforms supply developers with means to track achievements or manage user data, for example itch.io. Seen as itch.io would be one of the distribution platforms the game in development at The Tall Ones was going to release on. It was mandatory that CP Social was able to perform normally without a third party service provider.

Debugging

When creating a game, you don’t always want to have to authenticate with a third party when debugging one of your game’s features. For this reason it is useful to be able to create a build that doesn’t include these features.