How to separate the engine and resource parts of Unity
Hello,
I'm working on an android app written in Java that will contain multiple Unity games.
I would like the player to be able to press a button to play the first game, then another button to play another game, and so on.
From what I understand so far, in android applications, the UnityPlayerActivity uses the libraries available in unity-classes.jar
unity-classes.jar then uses the native functions in libmain.so, libmono.so, and libunity.so to run the actual game
libunity.so contains assembly code that refers to the folder "assets/bin" where the actual code and assets of the game exist.
Now, in order to let the player play more than one game, I need to choose the files that need to be placed in "assets/bin" depending on which game the player wants to play; for the first game I put the files of the first game, for the second game I put the files of the second game, and so on.
The problem is that it is not possible to modify the files inside "assets/bin" because they are inside the apk, and an android application is not allowed to modify its own apk.
Is there any way to separate the Assets resources, such as the Assets resource in the SDCard directory, the engine's required startup file is placed in the APK, runtime, can specify the resource directory to be loaded to the engine, so that the game is running normally?