I have an editor script that tiles one big texture into pages and stores them as .raw or .png files in a specified folder by the user. The idea is to keep them on the disk and only load them to CPU/GPU when needed.
The problem is that, when the folder to store them is inside “Assets/” Unity will automatically import them as Texture2D’s which 1. Takes a lot of time 2. I don’t need, since i am handling .png decoding by myself and .raw data I am just reading to byte. 3. I am not sure of this but i saw that all imported textures are loaded to RAM which is exactly what i want to prevent with the tiling system, surprisingly i didn’t find any discussions about this which either means that my question is bad or that i am very bad at finding information!
Nonetheless my question is the following: Is there any way to just store data within Assets in disk only and prevent unity from importing it?
I heard about " StreamingAssets" folder but I believe that it doesn’t obfuscate the textures in any way in the final built which could cause problems if any users of my tool want to keep the textures hidden from players (I plan on releasing it on the Asset Store).
Thanks in advance!
Just change file name to .png_ for example.
You can try hidden assets folder
https://docs.unity3d.com/Manual/SpecialFolders.html
Unity still imports the assets as Default Asset which still takes a very long time, but thanks for the answer!
Thanks! I had no idea about special folders.
1 Like