If I understand well, ‘.meta’ files are used to store some import information associated to each asset.
But as far as I know, files in 'StreamingAssets' aren’t imported by Unity, so, why do they have ‘.meta’ files attached to them?
It is a problem in my project because I generate a lot of configuration files, which are stored in 'StreamingAssets', but each time I generate them, Unity has to ‘import’ the new assets (in fact, it only create the ‘.meta’ files, as there’s no real import).
At first it was merely an annoyance, but now it has become worse than that, even with less than 1000 files it takes several seconds, for nothing; and I should have around 8000 files at the end, so it will take more than a minute.
For now I have ‘solved’ the problem, by generating the files in another directory (out of Unity’s reach), and then copy this directory in post-build when generating a standalone build.
But I do not like doing that because 'StreamingAssets' should be the correct place for these data.
So, if I am mistaken and Unity is actually doing something very important with the ‘.meta’ files in the 'StreamingAssets' directory, then please explain me what it is.
But if Unity isn’t doing anything with the ‘.meta’ files in 'StreamingAssets', then I think it would be great to find a way not to generate them anymore in the 'StreamingAssets' directory as it would require less work/time for the Unity Editor when something is added/removed/modified in that directory.
Bump, happens to me as well, I thought i was supposed to store music files and such in streamingassets, but every time i do it automatically generates a .meta file for each .mp3 file in the folder for seemingly no reason.
Yes, the whole point of the ‘StreamingAssets’ directory is nullified by the .meta files, making it nearly useless.
The most frustrating is that I’m pretty sure it’s really easy to modify Unity to ignore this directory for .meta files generation.
I submitted a bug-report regarding .meta files in StreamingAssets a while ago, because it also doesn’t make sense to me: (Case 1207733) Unity generates .meta files for files in StreamingAssets
Here is the reply from Unity:
I don’t think files in StreamingAssets are actually “regular Assets”, since you can’t do anything with these files in Unity. For example, if you have a .png file in StreamingAssets, you can’t drag&drop it into a Texture2D property for example.
Right, that’s the issue. What sort of data in streaming assets meta files is actually used? Pngs aren’t actually imported as textures if its a streaming asset, if I understand correctly, and nor should they, since they wouldn’t be included in a build.
Agreed with the rest of the thread. I don’t understand what purpose .meta files serve in StreamingAssets. Seems like they only clutter up the folders when I’m not making use of them at all. Hope this gets a solution.
I think it’s more laziness than a bug.
They have some code which generates .meta files everywhere, and they haven’t made an exception for the streaming assets.
And because it’s considered far from being critical, they don’t want to spend money on that, even if it’s probably no more than a day of work including the meeting to take the decision, the actual coding work (probably no more than 1 hour for that part), the tests and the documentation update.
I think that pretty much sums up Unity’s approach to tons of quality of life issues the engine has. They spend resources on flashy new features, which only a few devs will ever use, and never pay any attention to tiny improvements the dev community has been asking for, for years, that would make a huge impact on everyone’s day-to-day experience of using the engine.
It’s a fun one, cause one side of the community wants those flashy tools (I really would like modern terrain and animation toolsets), and some don’t want that and just want to focus on better quality of life.
Why not having both?
I can understand that the new tools do have some QoL problems, it’s perfectly normal in a constantly evolving eco-system.
But the tools should be ironed out over time.
In this case, we are talking about a tiny problem coming from .meta files and StreamingAssets, both are incredibly old and should have been completely ironed out years ago.
There are quite literally thousands, if not tens of thousands, of various things that could be improved. And we don’t know how hard it would be to fix, we can guess it’d be super easy, but there’s absolutely no guarantee there is an simple solution. In this case this isn’t even a bug per se, it’s just a small annoyance.