Excluding a native DLL with script define symbols

Hello,

I would like to exclude the Steam Client API from my build when building for Oculus. Unfortunately, I have not found a way to exclude the steam_api.dll file without temporarily moving it somewhere else or removing it automatically after the build.

I was thinking about excluding the DLL with the help of a scripting define symbol, but unfortunately, that’s not possible with Native Plugins. (Only with Managed Plugins) Does anyone have an idea how I still can make this possible or has a cleaner way to do it?

Thanks in advance!

  • Maarten

For the people who are looking for a solution to this. Right now I’ve implemented an automated build tool into our project with some edits so the excluded DLLs will be removed right after building the project.

Not really a solution, more like a cheesy method.

Credits to attilioHimeki for this build tool: GitHub - attilioHimeki/unity-build-tools: Tools to automate and streamline Unity builds