playMaker

Author Topic: Global variables completely lost from prefab on Play [SOLVED]  (Read 13074 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Global variables completely lost from prefab on Play [SOLVED]
« Reply #30 on: June 11, 2013, 08:52:19 AM »
Had problems with NGUI and Playmaker after trying to update through Asset Store. Had to delete both and reinstall to get stuff to work, although all my global vars were deleted and the whole game broke. No I canĀ“t get the global vars back... really bad...

Shit like this really makes me mad...well, well..

Seems like global vars are associated with the project and not with "levels"?
Anyone else has a solution to this?

That sucks! The global variables are stored in a file which may not be the ideal solution since I've seen a lot of people accidentally delete them when they want to remove and reimport PlayMaker, including myself. You'll notice the alert dialog box telling you about the file when you first create a global variable, I think.

Not having a backup is terrible, always backup regularly, once a week at a minimum.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
Re: Global variables completely lost from prefab on Play [SOLVED]
« Reply #31 on: June 11, 2013, 09:14:45 AM »
backups, yeah... backup 7 GB each week to keep some hidden file that is less than 1kb.. Would be nice to be informed about this "feature" somewhere. Most of the global events are still there though. Just the vars are gone.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Global variables completely lost from prefab on Play [SOLVED]
« Reply #32 on: June 14, 2013, 02:09:23 AM »
hi,

 yes global vars apply to a project level. For scene based "global vars", use user prefs or actual fsm with local variables that you access from other places using "get fsm xxx", that's how I do it.

bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Global variables completely lost from prefab on Play [SOLVED]
« Reply #33 on: June 14, 2013, 01:20:35 PM »
I've added a Help Box to the Global Variables Window for the next release:
NOTE: Globals are stored in PlayMaker/Resources/PlayMakerGlobals.asset

Currently globals have to be an asset so they can be referenced by any scene.

But we are playing with the idea of different global scopes. E.g., scene globals.

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
Re: Global variables completely lost from prefab on Play [SOLVED]
« Reply #34 on: June 16, 2013, 03:29:19 AM »
That would be good, Alex!
Sometimes a project contains more "subprojects", as when you import stuff from the asset store to try out if it fits the game you are building.

Being able to try a new technique or idea with PM and not messing up the global vars list with clutter could be nice! Other than that, naming conventions could prolly fix that (example "subproj_GL_Int_Score").