playMaker

Author Topic: Deleting Actions In State  (Read 2096 times)

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Deleting Actions In State
« on: November 07, 2019, 11:15:59 AM »
Hello,

Is there a way to delete all actions that are disabled in a state? Doing them one by one is time consuming but I only see the Delete All Actions button. Is there a Delete All Disabled Actions button?

Thanks,
jrDev

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Deleting Actions In State
« Reply #1 on: November 07, 2019, 08:51:59 PM »
Hi.
As far as i know not, sorry.

you can do a feature request tho :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Deleting Actions In State
« Reply #2 on: November 08, 2019, 01:44:53 AM »
Hi,

 there are no functions for that no. This would be a very dangerous feature indeed...

It's best to go patiently over all your work and clean up bit by bit. I would totally backup before doing that, because you might then regret it.

 Disabled action are very dangerous, you should always clean up before moving on from an fsm where you disabled actions. I personally never have any disabled actions on finished features, I only disable action when I have a problem or I want to quickly test some feature.

Bye,

 Jean

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: Deleting Actions In State
« Reply #3 on: April 29, 2020, 10:53:42 PM »
Hello @jeanfabre,

I know that response meant well but doesn't change the fact that Delete All selection is already there and it would be a good option to also have Delete Disabled Actions because that's the workflow I use and pretty sure others do too when testing out different actions. It just makes the process much quicker even if its just 3 disabled actions on one state. This example would be 1 click instead of 3 or potentially more. Please consider adding, it shouldn't be that trivial.

Thanks,
jrDev

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Deleting Actions In State
« Reply #4 on: April 30, 2020, 02:04:43 AM »
Hi,

 yes, this is the typical dilemma here. you have a fair argumentation, I also sometime want this kind of tools but It's best to always be tidy and clean up though more demanding for us as developers.

 in regular c# ide, there are no such thing as deleting all comments or unused methods ( ide like riders tells you when a method is not used), you still have to manually delete it or use a convenient helper to delete that very method, but nothing on a global scale, because who would bare the responsibility should a developer claim that the tool did not work as expected and ruined months of work 1 day before the deadline of the project of your life... ( yes that happened to me, 3 hours before the meeting with the big boss....), who would be liable then? if you delete one by one all your disabled action, you can't then claim you did not wanted that...

 from experience, this is a very dangerous path to provide clean up tools like that. and even when you do that by hand, always make a backup that you have tested and sure that it works, more often than not, I wanted to clean up and spent the rest of the day trying to revert back cause I forgot why I disabled that yet not deleted... cause I needed it somehow still... that's also my fault cause I should comment more on why this is disabled and not deleted :)

Bye,

 Jean

daniellogin

  • Full Member
  • ***
  • Posts: 215
Re: Deleting Actions In State
« Reply #5 on: April 30, 2020, 10:48:39 PM »
Disabled action are very dangerous, you should always clean up before moving on from an fsm where you disabled actions. I personally never have any disabled actions on finished features, I only disable action when I have a problem or I want to quickly test some feature.

What does this mean? I would say it's not uncommon for me to have actions that are disabled in FSMs. It happens when I try something one way, then switch to another way. I always feel like not deleting in case I want to go back again and didn't know there is any harm in disabled actions.

But there is harm? Is there a quick way to sum up what's wrong with it?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Deleting Actions In State
« Reply #6 on: May 01, 2020, 10:26:53 AM »
Hi.
i am not sure why its dangerous.
But if you want to test things its better to make a copy of your scene or prefab.

But i as well have on my event handler fsm some send event actions that are disabled.
but so far i did not encounter any issues yet (in editor and build)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Deleting Actions In State
« Reply #7 on: May 18, 2020, 03:09:06 AM »
Hi,

 it's dangerous because destructive of potential clues as to why your code worked one way and not another, disabled actions is often the result ot messing about with a bug or feature, removing them means you loose potential clue as to why you had it like that ( and why you did not clean up).

 it's not dangerous for the runtime logic itself.

It's best to not leave any disabled actions at all when your feature or bug is fixed/finished.

Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Deleting Actions In State
« Reply #8 on: May 18, 2020, 08:01:45 AM »
Hi.
Ok good to know that in runtime its not an issue.

in most cases i also always remove unused actions.

But on our current project i have a 'event handler' to enable/disable parts of the character, and i had to test many conditions and also retest (and change some) when something new was added.

in this case its actually more important for me to see the disabled actions :)