microsoft / gdk-unity-package

The Unity package for PC GDK developers.
Other
51 stars 18 forks source link

Prevent the 'MicrosoftGame.Config' file from being inserted when not WinGDK #135

Open fattard opened 9 months ago

fattard commented 9 months ago

Hello,

this OnPostprocessBuild() call always copy the 'MicrosoftGame.Config' file into the output folders for any platform. This interferes with custom build processes for other PC outputs and proprietary platforms, by inserting a file that is not necessary for those configurations.

This PR restricts the execution of the OnPostprocessBuild() to only when the platform define MICROSOFT_GAME_CORE is actually defined, and allows a properly configured multi-platform development environment.

If there's a need to having this package to work even if the MICROSOFT_GAME_CORE is not defined, please, consider finding an alternative way to insert the MicrosoftGame.Config file that does not runs during a non-PC platform.

Thank you