The game I’m working on has a level generator that uses a ~30MB custom binary file to provide some data. The level generator itself cannot use any Unity libraries - its just a .dll I made that will be used in a non-unity project as well (the server application) so cannot contain unity specific code. The file will be loaded in it’s entirety once every time the player starts a new save file (infrequent). Currently it just loads the file using a System.IO BinaryReader. This works fine in the editor as it can access the file at the project root.
The issue is that the generator cannot access this file on builds as it is not included in the builds themselves. I’m targetting Android (iOS, Windows and webGL in the future) so that rules out StreamingAssets. I’ve also tried using C#'s embedded resources, but that was strangely slow, and seems like bad practice for such a large file especially since it will be used very infrequently.
Is there any way I can include the file in builds and use it to provide the world generator with a Stream (or even better a filepath) from which it can access the data?