playMaker

Author Topic: Renaming custom state action  (Read 6076 times)

turkeypotpie

  • Playmaker Newbie
  • *
  • Posts: 22
Renaming custom state action
« on: January 01, 2013, 05:17:19 PM »
How do I rename a custom state action?

Whenever i try changing the name of my script, it shows up as a missing action wherever it's used.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Renaming custom state action
« Reply #1 on: January 02, 2013, 06:07:30 AM »
Hi,

 Interesting question, Have you filed a bug report using PlayMaker menu?

bye,

 Jean

turkeypotpie

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Renaming custom state action
« Reply #2 on: January 02, 2013, 11:09:26 AM »
No I have not yet.  Is it expected behavior for the rename to work correctly?

In other words, if I rename the script in the unity editor, and rename the class within the script file, then PlayMaker should figure out a rename occurred?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Renaming custom state action
« Reply #3 on: January 02, 2013, 02:39:29 PM »
Hi,

 Unfortunatly, I doubt it, that's why it's an interesting case to raise.

bye,

 Jean

bdominguez

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Renaming custom state action
« Reply #4 on: January 15, 2013, 10:35:13 AM »
I have the same problem!!

digimbyte

  • Junior Playmaker
  • **
  • Posts: 52
Re: Renaming custom state action
« Reply #5 on: January 15, 2013, 10:40:50 AM »
ok when you say "rename" what do you mean specifically?

are you trying to rename the scripts for the action browser? or just rename ones that are currently in your state?

if you are trying to rename the action files permanently you need to rename the file and the header just inside the script so they match
however if your having issues renaming the action on your game object, that's more of a bug
i've noticed a small glitch at times when renaming them but with some fiddling its not to hard to fix

bdominguez

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Renaming custom state action
« Reply #6 on: January 15, 2013, 10:42:22 AM »
ok when you say "rename" what do you mean specifically?

are you trying to rename the scripts for the action browser? or just rename ones that are currently in your state?

if you are trying to rename the action files permanently you need to rename the file and the header just inside the script so they match
however if your having issues renaming the action on your game object, that's more of a bug
i've noticed a small glitch at times when renaming them but with some fiddling its not to hard to fix

In my case is the first one, trying to rename the action scripts.

Is a huge problem because I lost all the action references.

digimbyte

  • Junior Playmaker
  • **
  • Posts: 52
Re: Renaming custom state action
« Reply #7 on: January 15, 2013, 10:46:18 AM »
this is an example from GUIButton

---------------------------------------------------
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.

using UnityEngine;
using System.Collections.Generic;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory(ActionCategory.GUI)]
   [Tooltip("GUI button. Sends an Event when pressed. Optionally store the button state in a Bool Variable.")]
   public class GUIButton : GUIContentAction
   {
-------------------------------------------------------
GUIButton is the file name and the name of how its displayed inside playMaker Action browser and GuiContentAction is the sub catagory
(from my understanding)

hope it helps

bdominguez

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Renaming custom state action
« Reply #8 on: January 15, 2013, 10:51:09 AM »
In my case I rename both Script file (with Unity) and the name of the script inside.

Still the same problems.

digimbyte

  • Junior Playmaker
  • **
  • Posts: 52
Re: Renaming custom state action
« Reply #9 on: January 15, 2013, 10:54:05 AM »
well ofcourse you have a problem then, since you renamed the original file, the instance of it in unity is lost

just find it again where you put it in the action browser and re-add it to your state, if its not where its supposed to be, then you need to double check the file name and tags inside the script file

bdominguez

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Renaming custom state action
« Reply #10 on: January 15, 2013, 10:55:46 AM »
well ofcourse you have a problem then, since you renamed the original file, the instance of it in unity is lost

just find it again where you put it in the action browser and re-add it to your state, if its not where its supposed to be, then you need to double check the file name and tags inside the script file


But I use meta files, there should not lost the references.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Renaming custom state action
« Reply #11 on: January 17, 2013, 12:58:26 AM »
Hi,

 I think that unfortunatly, playMaker doesn't benefit from what Unity can do, that is find back lost references of missing behavior. This is a big problem indeed, and corrupts the whole project, and you have to rewire all actions, and most of the time you forgot how they were setup.

Have you filed bug report on this using the playmaker bug report tool?

bye,

 Jean