Search Unity

Exclude file from Build

Discussion in 'Scripting' started by Zelek, Mar 5, 2015.

  1. Zelek

    Zelek

    Joined:
    Jun 12, 2010
    Posts:
    87
    Is it possible to dynamically include or exclude a file when making a build? I have a specific plugin DLL that I want to exclude for certain builds, but include for others. I'm not ready to convert to Unity 5, so I'm hoping there's a supported way in 4.6.
     
  2. BenZed

    BenZed

    Joined:
    May 29, 2014
    Posts:
    524
  3. Zelek

    Zelek

    Joined:
    Jun 12, 2010
    Posts:
    87
    This allows certain portions of code to be excluded, but I don't believe it will work for excluding a file, such as a DLL in the plugins folder. Please let me know if there's a way to use directives for file exclusion.
     
  4. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    I think you can do that by putting the DLL in the Plugins folder and either fiddling with the Inspector if you're on version 5.0 or placing the DLL in a specially named subfolder if you're using earlier version. Documentation has the gritty details.