Hello,
I have a bunch of .txt files in my resource folder that my project reads from, but then when I want to add a new file (even though it is not a C# file, but is a .txt file), it takes several minutes for Unity to ‘register’ it into my project and create the meta file for it, my mouse cursor turns into the spinning circle for several minutes and Unity can’t be used. I think it is because the files ‘communicate’ with each other (especially if it is through public C# classes, functions and variables), but what if there could be a way to ‘shut off’ certain folders and tell Unity to ‘disregard’ and ‘ignore’ those folders when it compiles or works with data (to speed up time)?
I don’t wish to delete the folders with the massive .txt files (as it took Unity hours to ‘load’ them into my project), but that means ‘longer wait times’ as I develop. Is there a way to ‘shut off’ the files and folders that I loaded?
It shouldn’t take several minutes to import a new .txt file. It should take a second, top.
When importing simple assets (ie. not scripts, models or sounds) takes a long time, it’s usually due to an editor script that’s hooking into the asset post processing that’s doing something naughty. I’ve seen asset store packages do that.
Open your profiler, and turn on “editor profiling”, and add a new .txt file. When the file’s finished importing, you’ll get a large spike, which will show you what’s happening.
What happened was, I didn’t want the ‘recompiling’ of the files, BUT, I would like these files to be ‘opened upon demand’ when I use Resources.Load() and load them as TextAssets. I read the documentation, and put a ‘~’ at the end of the folder of the files I don’t want compiled during development, and everything compiles much faster now (because it is not compiling the large amount of files in the folder), but I am also having problems with Resources.Load() not noticing that these files exist (as they return an empty string). I even remembered to add the ‘~’ to the string argument of what files I wanted to load as a TextAsset. I don’t want these files to be compiled or ‘considered’ until my project publishes, and then these files can be ‘embedded’ into my finished project (as TextAsset resources). How would I go about doing this?