playMaker

Author Topic: Needs unity restart to work as designed  (Read 2137 times)

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Needs unity restart to work as designed
« on: April 02, 2014, 11:01:29 AM »
Hi,

I'll explain the problem (that's solved by a restart) but hopefully somebody can explain why this is like it is, because it can cause some headaches before this restart requirement is figured out.

I made an FSM that moves the owner object around so it follows the parent it is attached to. (just get position and set position in every frame)
Then when I tested it I noticed that as I move the parent around this object would only follow it with some lag/jittering. I thought that well I'll have to live with that, probably the scripts run slowly or something.

But then I was happily surprised to noticed that (after a restart) now the object follows the parent perfectly, no jittering or lag. Could not explain what caused it to now work as intended.
Then as I need more of these objects I copied it 3 times and renamed the new ones.
Then when testing I saw that the original one still works perfectly (follows the parent exactly) but the new three do the same lagging/jittering behind.
I checked a few things but could not figure out any reason why this could be. They are all the same.

So then I decided to restart Unity to check after that, maybe...
And voila, now they all follow the parent perfectly.

WHY IS THIS?
Do the variables I use in them (all local but named the same) need to be reinitialized? or something, so they don't interfere? with each other?

Any idea why this is so?

The more I use PlayMaker the more interesting things pop up.  ;)

Br,
Peter

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Re: Needs unity restart to work as designed
« Reply #1 on: April 02, 2014, 11:05:23 AM »
Yeah, can repeat it every time:

1. make a copy of that object,
2. test and see that it does NOT follow the parent perfectly, (lags behind)
3. reload the level (Unity restart is actually not required),
4. then when testing it follows the parent perfectly now.

Br,
Peter

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Needs unity restart to work as designed
« Reply #2 on: April 03, 2014, 08:38:57 AM »
Hi,

 Do you have a repro package I could try here to test it? Maybe it's a Unity thing, maybe it's a playmaker thing, but I can't really tell without a repro case.

bye,

 Jean

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Re: Needs unity restart to work as designed
« Reply #3 on: April 04, 2014, 01:44:56 AM »
First I thought it would take a lot of time to create a version of my project that only contains this small problematic part, but then it wasn't such a big thing.
But I would still like to only send it to your personal email instead of posting here, so I sent you a message...

Br,
Peter