playMaker

Author Topic: [SOLVED] Proper handling of new members AKA "Error Loading Action"  (Read 2139 times)

olpenelle

  • Playmaker Newbie
  • *
  • Posts: 4
Hello,

The forum has many posts related to the Error Loading Action problems occurring when adding member variables to an Action.

I understand the workaround is to open all FSMs and re-save them, but it's a serious workflow problem. I can't ask the level designers to open all maps and all FSM prefabs and save them every other day.

What are hutong games' plans regarding that problem?

Potential solutions I would suggest are:
1. Ignore gracefully: Skip over fields that are not found in serialized data and leave them set to their default value (given by C# or the action's constructor).
2. Automatically fixing all the scripts when saving (ie.: OnWillSaveAssets). But this would have to be fast not to be an annoyance whenever we save.
3. Provide access to the PlayMaker Editor functionality that fixes FSMs so we can manually call it when needed (for instance; after changing an action or during a custom build process).

Thank you,
Olivier
« Last Edit: March 04, 2014, 03:29:54 PM by olpenelle »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Proper handling of new members AKA "Error Loading Action"
« Reply #1 on: February 28, 2014, 03:34:58 PM »
This behavior actually changed in 1.7.7.

Actions are now updated at runtime the same way they are updated in the editor. If you have lots of actions to update it will load slower, but at least you can keep working.

Action data needs to be updated if the action's signature has changed since the FSM was last saved (added/removed/changed public member variables). Whenever you save an FSM it saves updated action data.

We do plan to make some batch tools to auto-update all FSMs in a project. But the workflow should be better now in 1.7.7. Are you still seeing Error Loading Action with 1.7.7?

olpenelle

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Proper handling of new members AKA "Error Loading Action"
« Reply #2 on: February 28, 2014, 03:55:13 PM »
I'm currently using 1.6.1. I'll look into upgrading to 1.7.

Thank you!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Proper handling of new members AKA "Error Loading Action"
« Reply #3 on: February 28, 2014, 04:00:37 PM »
Cool! As always backup your project before updating. 1.6.1 to 1.7 is a pretty big jump... you should probably test the update on a copy of your project and make sure everything still works as expected before updating the main project...

olpenelle

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Proper handling of new members AKA "Error Loading Action"
« Reply #4 on: March 04, 2014, 03:29:39 PM »
The update was smooth and the errors are gone in 1.7.7. We didn't see any difference in loading time either.

Thank you!