|
Post by josphb on May 21, 2020 10:49:30 GMT
Hello, we had code to switch Platform during cloud builds, it went like this :
//SimpleSQL is set to iOS/Windows/Mac by default, we need to switch it to Android
PlatformManager.Instance.Platform = Platform.Android; But since updating from version 2.5.0 PlatformManager and Platform do not exist. How would the same thing as this be achieved in version 2.11 ?
Thank you
|
|
|
Post by echo17 on May 21, 2020 13:05:20 GMT
Sorry, but I'm not following. PlatformManager was never part of the SimpleSQL codebase. Perhaps this code was part of a different plugin you used?
The only thing that switching the platform in Tools > SimpleSQL > Options does is copy out the relevant sqlite library for that platform, optimizing the build size. When you set it to iOS, nothing is copied since iOS has its own sqlite library that is built into the operating system. Windows requires a sqlite3.dll copied at runtime. Android requires sqlite-android-3280000.aar file to be in the Android plugins directory. You could just leave the option set to Android and still build for iOS. The build will be slightly larger with the Android sqlite library, but that way you don't need to do any switching.
|
|
|
Post by josphb on May 22, 2020 10:35:00 GMT
In version 2.5.0 there is a class called PlatformManager in the DLL. I checked again. We use it to switch the platform automatically while doing automatic builds for every platform so that Android has what it needs without increasing build size for having windows stuff.
|
|
|
Post by echo17 on May 22, 2020 12:56:08 GMT
I'm sorry, but PlatformManager is not a class that has ever been a part of SimpleSQL. I opened my 2.5 source code and did a search on that and it does not show up there. I even went back to version 1.5 in case the 2 was a typo and it wasn't there either. The source code is included as a zip file at the path "Assets/SimpleSQL/Source/SimpleSQL Library 2.5.0.zip", so you can also open the library and see that it does not exist in SimpleSQL. Are you sure you are not looking at a different plugin DLL? Or maybe a different version of Unity which might have had PlatformManager? One thing you could do to automate the build process is manually copy the Android sqlite library file sqlite-android-3280000.aar to the Assets/Plugins/Android path of your project when building for Android. That is all SimpleSQL is doing when you set the option to Android. The underlying codebase of SimpleSQL is identical, it just needs a separate sqlite library for different platforms.
|
|
|
Post by josphb on May 22, 2020 13:23:51 GMT
Oh, I'm a goofus! I realized my mistake. Thanks for your support and your solution. Sorry for my confusion
|
|
|
Post by echo17 on May 22, 2020 14:14:13 GMT
No worries! Glad you found a solution.
|
|