Multiple webplayer platforms

Is it possible to define multiple build settings and pre-processor directives for the webplayer? Or a custom build platform for the webplayer?

The use case for this is to deploy my game across multiple different websites, each which has a different API set up, screen resolution, monetisation etc. I’d like to be able to automatically strip code that does not belong to each website from the build. Essentially building a different file for each website.

If this is not possible my fall back will be checking the url at runtime, and behaving accordingly.

I don’t know about build settings, but you can define custom pre-processor directives from the “Other Settings” of the player settings:

33279-symbols.jpg

Then use #if WEBSITE1 ... etc.

Also Unity - Manual: Conditional Compilation