playMaker

Author Topic: Loading all global variables  (Read 1249 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Loading all global variables
« on: October 05, 2022, 10:44:14 AM »
How do I load all global variables with player prefs? Right now I have to load each one individually. I would prefer to continue using player prefs, and not something like easy save, as it comes with playmaker and is free. Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Loading all global variables
« Reply #1 on: October 05, 2022, 11:31:55 AM »
Hi.
I believe you would still need to do manually with easy save, there is no quicker way.

easy save can save Array Lists tho.

PlayerPrefs you should not use for ingame data, only for preference settings like video / sound settings for example.
its very easy to hack.

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Loading all global variables
« Reply #2 on: October 06, 2022, 09:48:51 AM »
Ok thanks.

Would it be possible to make a custom action to reset all variables to default? It would really save me a lot of time whether I use player prefs or easy save. Also, what is the downside to players being able to hack your game? Like I know they could cheat their way through, but would there be any security issues or anything like that? Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Loading all global variables
« Reply #3 on: October 07, 2022, 11:09:56 PM »
Bump.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Loading all global variables
« Reply #4 on: October 10, 2022, 04:56:28 AM »
Hi.
the global variables can be different types / names so its not really possible to have a custom action for it.

What you can do is make a fsm which can get the default values and save them.
Also save an int variable to check if default values where saved, i would use a int variable to check, in case you need to resave default values at a later version of your game)