Fixes compilation issues and runtime issues
Implements console (logcat) logging
Fixes getting the data path as std::env::current_dir doesn't work properly on Android
It doesn't initialize correctly right now and probably won't until .NET is updated to 7 or 8, however this still gets the more annoying part out of the way.
There is one part that will probably need to be implemented later which copies files from the APK to the data path so it can be loaded. I decided to leave that out since it isn't very important right now (and the code isn't very clean).
I did test these changes with Windows, and it still worked fine.
Note so I don't forget:lib::main() does not get called automatically, I had that called separately by my Unity specific proxy so that JNI_OnLoad could run first and allow the data path to be cached.
Fixes compilation issues and runtime issues Implements console (logcat) logging Fixes getting the data path as
std::env::current_dir
doesn't work properly on AndroidIt doesn't initialize correctly right now and probably won't until .NET is updated to 7 or 8, however this still gets the more annoying part out of the way.
There is one part that will probably need to be implemented later which copies files from the APK to the data path so it can be loaded. I decided to leave that out since it isn't very important right now (and the code isn't very clean).
I did test these changes with Windows, and it still worked fine.
Note so I don't forget:
lib::main()
does not get called automatically, I had that called separately by my Unity specific proxy so thatJNI_OnLoad
could run first and allow the data path to be cached.