Search Unity

Excluding folders from build

Discussion in 'Editor & General Support' started by YondernautsGames, Jun 1, 2016.

  1. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,331
    Hi,
    currently there is no logic or GUI for selecting the target group based on defines (neat idea though) but you can do pretty much anything programmatically (the full source code is included).

    To change the used group all you have to do is change the "CurrentGroup" property in "ExcludeFromBuildData". It's a Scriptable Object located under the path defined in "ExcludeFromBuildData.DataFilePath" (aka "Assets/ExcludeFromBuildData.asset").

    I hope that answers your question.
    I'd be interested in your results. Maybe this is something I could add in a future update.
     
    bleater likes this.
  2. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    240
    You deserve a medal for this asset, thanks a lot !
     
    _geo__ likes this.
  3. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    460
    ExcludeFromBuildData and ExcludeFromBuildSettings are two files that are created and placed at the root location of my project. Is it normal and is there a way to tell it to put these files elsewhere? As soon as I moved them they were immediately recreated. I try to keep the root structure clean.
     
  4. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,331
    @Starbox : Good question. I have replied in the original thread here. TLDR: You'll have to edit the source code but it's pretty easy to do. I'll be looking to change this in future releases :)
     
    mdrunk likes this.
  5. oesteerigrek

    oesteerigrek

    Joined:
    Dec 12, 2017
    Posts:
    6
    Hello, I am also suprised this feature is non existent. This would help with multiplatform apps in single project soo much that Its really hard to understand why its not part of the build system.

    Especially that system for folders whitelisting for build purposes is not anything complicated.
     
    Menion-Leah likes this.