Playmaker Forum
PlayMaker Help & Tips => Android Help => Topic started by: velketor on August 22, 2017, 02:48:40 PM
-
I am using Global Variables to Get/Set Strings. This works fine in the Editor. It also works fine when I "Build & Run" as an Android app while my phone is plugged into my PC. However, if I manually install the APK file via side-loading, my Global String Variables are no longer recognized.
Why would this be happening?
-
HI,
Strange indeed.
do you have get/set property actions?
-
Yes I am using Get/Set Property actions to save String Values as Global Variables.
If I change my variables to local variables (instead of Global) they work on Android as an APK file even when I sideload.
Somehow the Global Variables are being stripped when I sideload the app to my phone.
-
Hi,
Are you getting the string values from a script?
if so then you can try using the Linker wizard (https://www.youtube.com/watch?v=cnCq-OPuLRE)
but if not from a script you should use as much as possible the standard actions or custom action from the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
-
I figured out what it was! I had "Split Application Binary" checked in the Player Settings --> Publishing Settings, which caused my Android app to publish an .apk file AND an .obb file. Global Variables are stored in the .obb file, so when I side-loaded the .apk file onto my phone, I forgot to include the .obb file so it never had any Global Variables to reference.
The solution was to UNCHECK "Split Application Binary" so the .obb file is never created. Now everything works (side-loaded or not).
Thank you for your help, I appreciate it =)
-
Np,
I'm happy you found the issue :)