playMaker

Author Topic: Hard limit???  (Read 2616 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Hard limit???
« on: May 10, 2016, 05:39:39 PM »
Is there a hard limit to the amount of data PlayMaker (or Unity) can manage?
I have somewhat of a scene, with around 1000 objects in it, and probably 800 of them have PlayMaker stuff on them. I use FSM to set up initial state of these objects, then I turn FSM off.
Worked up to now, but now when I duplicate a prefab, it's the same IDENTICAL prefab, I get this error:

FormatException: Input string was not in the correct format
System.Int32.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:629)
HutongGames.PlayMaker.Actions.ConvertStringToInt.DoConvertStringToInt () (at Assets/PlayMaker/Actions/ConvertStringToInt.cs:46)
HutongGames.PlayMaker.Actions.ConvertStringToInt.OnUpdate () (at Assets/PlayMaker/Actions/ConvertStringToInt.cs:41)
HutongGames.PlayMaker.FsmState.OnUpdate () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:255)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2170)
HutongGames.PlayMaker.Fsm.Update () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1425)
PlayMakerFSM.Update () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:435)

If this is unsurmountable, I will have to centralize the thing, but I'd rather not as it's much more comfortable to work this way, and I'm not concerned by performance at the moment. Also, turning the FSM off after the operations have been executed works perfectly for what I can see.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Hard limit???
« Reply #1 on: May 11, 2016, 02:53:19 AM »
Hi,

 What makes you think you've hit a limit with this error? it looks more to me that the data is not what's expected.

What's the string format you are using in this case?

Bye,

 Jean

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Hard limit???
« Reply #2 on: May 11, 2016, 08:51:22 AM »
Hi,

 What makes you think you've hit a limit with this error? it looks more to me that the data is not what's expected.

What's the string format you are using in this case?

Bye,

 Jean

The fact is that the script is not giving me errors on many other objects, but when I try to duplicate these doors, I get the error.
Another possible explanation is that the system doesn't have yet the variables inititalized when I call them, but the problem is PlayMaker window shows me that the string is actually ok and the int derived from it is ok as well, but the flow stops there anyway because Unity gives an error (and PlayMaker doesn't proceed).
I tried to randomize the time of wait just as a try to not fill a (possible) buffer, but I guess it's just a stupid try lol.

Explanation of the pics:
1) FSM that gets the name of the parent object (I set the main object name so I don't have to do any other modification to the scripts and only work in the editor) and sets the name of itself.
2) script that decides if the door must be open or not. As you can see PlayMaker stops right there and doesn't proceed even though it's green.

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Hard limit???
« Reply #3 on: May 11, 2016, 09:04:29 AM »
OK it's not a buffer limit, because now the problem comes from all the doors.
It's something else, my impression is some problem in initialization times.
However, I can't understand why I didn't have this problem some hours ago, and everything looks right to me.

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Hard limit???
« Reply #4 on: May 11, 2016, 09:38:11 AM »
Hi dude,

I have read over this a few times to try and understand it so I can help you.

Can you try putting your wait time in a previous state with a finished event that follow into the second set with your convert string to int.

Another thing you could try is instead of enabling the FSM's, use send event to trigger a global event on the FSM from your other FSM.

You could also try creating prefabs of the door and dragging them out of the project window instead of trying to duplicate.

Templates might also work for you as well.

Are you able to create a separate scene with just the doors and test them alone to try and narrow down the problem.

I also found that remaking the FSM helps sometimes.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Hard limit???
« Reply #5 on: May 11, 2016, 09:59:08 AM »
Thank you, Jo, I'm going to try your suggestions :)