Search Unity

HiddenAssets Folder

Discussion in 'Scripting' started by RoughSpaghetti3211, Aug 17, 2019.

  1. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,705
    I was under the impression that HiddenAssets Folder is ignored during a build. Is this not the case or are there special rules for Editor scripts.

    Assets/HiddenAssets/....ManagerEditor.cs(14,55): error CS0246: The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I haven't used it myself, but the documentation spells the folder name with a space like so: Hidden Assets

    Other folders are case and space sensitive as well, so I assume that may be the issue.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Editor scripts must be located in an "Editor" folder. In order to exclude folders from Unity entirely, you can add the ~ symbol at the end of the folder. It's both explained in the link Xarbrough posted.

    You can see this in Unity's ScriptableRenderPipeline repository for example, where they use it for the "Documentation~" folder:
    https://github.com/Unity-Technologi...unity.render-pipelines.high-definition-config