playMaker

Author Topic: How to rename global variables?  (Read 10011 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to rename global variables?
« Reply #15 on: October 19, 2018, 04:56:45 AM »
Hi,

 well, it's a shame we can't rename globals to begin with no matter what, there is no excuse for this, it's just wasn't developed the right way for and it had to be disable to avoid breaking projects.
 
Bye,

 Jean

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: How to rename global variables?
« Reply #16 on: October 25, 2018, 10:32:27 AM »
Also, there is nothing wrong with using SetFsmXXX and GetFsmXXX, they have no perf impact or anything. it's just one way to access data on other fsm.

These are fine actions, true.
But I'm a lazy bum (;D) and having access to vars in the action's var list is soooooo much faster and practical.
Imagine that for all your global events, you'd have to go fetch them from another FSM before even being able to use them in your current FSM.  :o :o
Etc.

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: How to rename global variables?
« Reply #17 on: May 26, 2019, 11:28:31 PM »
Hello,

I know this topic is old but I just noticed this thread when searching for global usage and realized that no one has given the workaround for renaming. I recently had this issue with renaming globals and figured out that you can go in the debugging of the inspector window after selecting the playmaker global scriptable object and just rename it from there.

Hope this helps anyone else in future until Playmaker adds this feature.

Thanks,
jrDev

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: How to rename global variables?
« Reply #18 on: May 27, 2019, 02:55:33 AM »
Are you sure it works without any fuckups? Can Jean and Alex confirm this is a valid way to change globals and not break references?
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to rename global variables?
« Reply #19 on: June 04, 2019, 04:09:39 AM »
Hi,

 ooh oh :) yeah, make sure you totally backup your project before doing so, but yes, global renaming was disabled in the interface because there are corner cases which creates problem, but for straight cases, renaming would still work, so there is a good chance that renaming global var would work in 90% of the cases, but we can't enable a feature that fails 10% of the time...

PlayMaker 2.0 will definitly address this kind of issues.

Bye,

 Jean

antus

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How to rename global variables?
« Reply #20 on: March 29, 2022, 07:41:21 AM »
Hi,

 ooh oh :) yeah, make sure you totally backup your project before doing so, but yes, global renaming was disabled in the interface because there are corner cases which creates problem, but for straight cases, renaming would still work, so there is a good chance that renaming global var would work in 90% of the cases, but we can't enable a feature that fails 10% of the time...

PlayMaker 2.0 will definitly address this kind of issues.

Bye,

 Jean

The user creates a global variable A and then a global variable B. Is it possible to implement a button that changes all references to global variable A to global variable B?then manually delete global variable A?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: How to rename global variables?
« Reply #21 on: March 29, 2022, 03:22:22 PM »
Hi.
No, you will need to manually replace them.
by rightclicking on the global variable, you can find where they are used