playMaker

Author Topic: Locating name of script where global variable is initially declared  (Read 2975 times)

PaulG

  • Playmaker Newbie
  • *
  • Posts: 7
I've purchased the iOS Gamecenter Drag & Drop plugin and in order to submit high scores to the leaderboard, one of the parameters is you need to enter the name of the script where the variable is initially declared. In my case, they are globals.

Is there any way to locate this? I know there's mention of the Playmaker's Global Asset. But opening that with notepad is mostly a bunch of indecipherable symbols.

I'm trying to use this instead of iOS Native because Gamecenter is the only thing left in the plugin that's even remotely useful to me. And using it gives me over 100 warnings in XCode (and with the latest 4.6 patch version, I get build failures from iL2CPP being too aggressive with what it removes.) Ideally I could just strip all the offending junk out myself, but since it's not modular, you can't do that.

PaulG

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Locating name of script where global variable is initially declared
« Reply #1 on: August 10, 2015, 10:43:20 AM »
Should note: I also e-mailed about this yesterday.

I don't really care if the answer is "Can't be done". If it's not doable, I'd like to know so I can cut my losses as quickly as possible.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4198
  • Official Playmaker Support
    • LinkedIn
Re: Locating name of script where global variable is initially declared
« Reply #2 on: August 10, 2015, 01:16:40 PM »
PlayMaker Globals are stored in a ScriptableObject, so they are binary data. They're not declared in a script.

I'm not familiar with the iOS Gamecenter Drag & Drop plugin, but it sounds like you would need to write some kind of bridge to use it...

EDIT: Globals are stored here:
Assets\PlayMaker\Resources\PlayMakerGlobals.asset
« Last Edit: August 10, 2015, 01:18:32 PM by Alex Chouls »

PaulG

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Locating name of script where global variable is initially declared
« Reply #3 on: August 10, 2015, 02:35:12 PM »
Thanks for clearing that up. I guess it makes sense. On to plan C.

PaulG

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Locating name of script where global variable is initially declared
« Reply #4 on: August 11, 2015, 09:37:22 AM »
Maybe it's not the most elegant solution, but I've just decided to write all those high score variables into temp PlayerPref files.

Then I created a script, declared the variables, and set their value with PlayerPrefs.GetInt.

All these records get submitted at a game's conclusion, so even if there is a slight hiccup, it's hidden in a way it'll never be seen.

Just figured I post the solution (which may or may not be elegant... but it's simple). Always a pet peave of mine to do a google search and find a thread that wasn't updated with the solution.
« Last Edit: August 11, 2015, 09:40:17 AM by PaulG »