Exclude files or folders from importing

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.
3 Likes

I never heard before the better way was to mix work data with game data. :frowning:

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. :slight_smile:

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

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

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.

4 Likes

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

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.

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:

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.
"

10 Likes

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.

12 Likes

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.

8 Likes

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://discussions.unity.com/t/747091

In the meanwhileā€¦

Yeah, i probably end up doing just that.

8 Likes