Search Unity

Exclude files or folders from importing

Discussion in 'External Tools' started by akaWraith, May 4, 2010.

  1. akaWraith

    akaWraith

    Joined:
    May 4, 2010
    Posts:
    3
    Is there any way to exclude psd, jpg, max file (or whole folder) in Assets folder from being imported to Unity as texture or model?

    I keep my sketches (in psd), reference files ((in jpg) and hi-poly models (for texture baking, in ztl AND max-files) along with othere resourses, in Assets folder. Thats why all of them are importing to Unity as textures and models - and it takes a large amount of time to import hipoly model.

    I see two possible solutions:
    1. to keep sketches, references, hipoly in a seperate folder, not Assets
    2. to hide a folder, but then I det a problem with synchronisation via Life Mesh
    Non of theese solutions are acceptable. I will be grateful for other variants and suggestions.
     
  2. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,505
    I never heard before the better way was to mix work data with game data. :(

    I think you should separate those 2 kind of data and then to create a script in your 3dsmax to export 3D in Unity and then a Photoshop script in the same way. :)

    When you will export picture or 3d data, it will automatically update it Unity.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,146
    Yes. I don't understand why that's not acceptable...the whole point of an Assets folder is that it contains assets. If they're not game assets, don't put them in Assets.

    --Eric
     
  4. akaWraith

    akaWraith

    Joined:
    May 4, 2010
    Posts:
    3
    I am used to work with a single folder structure, and not two keep two separateб but identical branches for assets and sources. It is just a matter of habbit. May be it is wrong, but it is convinient to me.

    Thank You sama.van and Eric for suggestions.

    I found out that folder named "~" will not be loaded. In some measure it solves problems.
     
  5. dreammakersgroupAdmin

    dreammakersgroupAdmin

    Joined:
    Feb 13, 2012
    Posts:
    40
    It look like finally i foound way,
    try to hide the files.
    and dont forget to hide meta file, if you are using asset server
     
  6. Zhnigo

    Zhnigo

    Joined:
    Jan 19, 2016
    Posts:
    2
    I have a similar problem: the screenshot plugin I'm using is saving screenshots to a folder named "Screenshots" in the Assets folder, and Unity is importing them every time I alt-tab away and back in. Is there a way to prevent this? Thanks in advance.
     
  7. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I did read in the past an article of a dude that this had all in project folder, as OP whants , and was able to hide folders so unity could not see em. I think is a crazy way of working in unity tho. I cold not find the link.

    "from the docs:

    https://docs.unity3d.com/Manual/SpecialFolders.html
    Hidden Assets
    During the import process, Unity completely ignores the following files and folders in the Assets folder (or a sub-folder within it):

    • Hidden folders.
    • Files and folders which start with ‘.’.
    • Files and folders which end with ‘~’.
    • Files and folders named cvs.
    • Files with the extension .tmp.
    This is used to prevent importing special and temporary files created by the operating system or other applications.
    "
     
    Last edited: May 9, 2018
  8. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    30
    Even that this message is old:
    NO, you are completely wrong with that! Stop thinking that way, that every program needs to have its separate working folder with separate subfolder etc.

    The only way, that is practicable, is to think in terms of the PROJECT structure. So, you have an assets folder, where you expect to find all your game assets - AND, of cause, if you want to modify them, everything what had to do when these files where created!
    It takes unneccessary a lot of time to search for stuff anywhere else on the harddrive that was involved in creating these assets and in most cases derrives in situations, where you have multiple versions of the same asset in different program folders and it takes a lot of time to validate what are the differences and which version is the newest.

    Having everything involved next to each other helps to have an better overview and organisation.
    These creation files belong just to the asset itself, so i expect to have these files exactly there!

    On top of that, i want them in my version control as well. And i do not want a secont version control just for creation files!
    That is a complete mess! It belongs to the same PROJECT, so why have these files separated anywhere else on the harddrive?

    Solution for us:
    In the assets folder we have a models subfolder.
    every asset has its own folder in there with the fbx and prefabs for every variation.
    In each asset folder is a subfolder .Creation, where are all the creation files stored, like references, maya scenes, substance painter scenes etc.

    Anyway, its a workaround (using these hidden folders) for a lacking unity feature like a .ignore file, where you can write in which files/folders you want to have imported or NOT. The same thing that .gitignore for GIT does.
     
    plunntic and Tknoguyfication like this.
  9. Tknoguyfication

    Tknoguyfication

    Joined:
    Nov 11, 2013
    Posts:
    3
    For me it's the fact that I can't tell unity not to try and import blender backup files. (blend1, blend2, etc.) I keep my .blend files right next to my .FBX files because it makes sense that way, plus Unity even allows you to import entire Blend files into your project. It'd be nice to see Unity adopt a gitignore-style ignore system that would let us set files we never want Unity to waste time importing. Having different directory trees for purely game assets and the files involved in making those assets is completely asinine and makes it harder for everyone who works on the project.
     
  10. plunntic

    plunntic

    Joined:
    Nov 28, 2012
    Posts:
    12
    Pretty much sums it up. I'd like to see a .unityignore as well.

    For anyone interested, i couldn't find any existing feature request for that, so i created one: https://forum.unity.com/threads/support-for-unityignore-file.694732/

    In the meanwhile...

    Yeah, i probably end up doing just that.
     
    Pawl likes this.