I am making a voxel building game (like Minecraft). I wrote a custom serializer that can turn my voxels into a byte array (and vice versa, turn a byte array into voxels (and generate the GameObject with the mesh etc.)).
I want to be able to load one of these files into the game and I want to have these files be a part of the game build so when anyone loads and plays the game they also load in the same voxel structures. So I think I want these in the Asset folder? In an ideal world I could just put these files in the Asset folder and then drag them onto a Component or ScriptableObject. But I can’t figure out how to do that.
I also tried making a custom ScriptedImporter. It works like a charm except the GameObject that is created by the importer script does not save the variables within it’s components. So I can import the voxel file into a GameObject and generate the voxels mesh. But when I use it in game the voxel data is not saved and I run into errors when I try and edit the voxels.
Maybe Resources.Load would work but it seems that it only loads Unity Objects.