Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Excluding a native DLL with script define symbols

Discussion in 'Windows' started by MaartenB, Apr 6, 2021.

  1. MaartenB

    MaartenB

    Joined:
    Nov 6, 2014
    Posts:
    67
    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
     
  2. MaartenB

    MaartenB

    Joined:
    Nov 6, 2014
    Posts:
    67
    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: https://github.com/attilioHimeki/unity-build-tools