playMaker

Author Topic: FSM removing script auto adds back in after runtime  (Read 3105 times)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
FSM removing script auto adds back in after runtime
« on: February 18, 2017, 12:03:57 PM »
I have loads of prefabs with the same FSM attached that uses a playmaker template. I was using a OnTriggerStay and then decided to remove it. When i removed this and then clicked apply on the prefab and template to update it worked for the current prefabs in the scene, but when i reloaded the scene it re-appears in the inspector showing i am using a OnTriggerEnter. When im not, ive only got one FSM on the prefab and checked made sure it doesnt exist in the template anywhere.

What is still appearing is the script (onTriggerEnter) at the bottom of the inspector (screenshot)

i have got 1000s of these prefabs and i dont want to make a new one just to remove this!

Nick
« Last Edit: February 27, 2017, 02:48:07 AM by coxy17 »

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM Template and script not staying deleted after an update.
« Reply #1 on: February 27, 2017, 02:45:28 AM »
bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM removing script auto adds back in after runtime
« Reply #2 on: February 27, 2017, 03:58:31 AM »
Hi,

 these component should not be touched, they are automatically handled by PlayMaker engine.

 they should be hidden, but sometimes Unity is getting mixed up with prefabs and what to show.

Bye,

 Jean

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #3 on: February 27, 2017, 04:30:34 AM »
Hi

Yes i dont remove them, i tried this in a separate project to see if it helped refresh it but i have tried to let playmaker sort this out itself but i cant get it to do it. So now i have loads of scenes with prefabs that need updating but i cant. Most of my prefabs have these displaying in the inspector (i thought i was normal)

whats frustrating is that my FSM script doesnt use OnTriggerStay but its adding the script in. So ive got loads of fixedupdate calls.

Nick

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM removing script auto adds back in after runtime
« Reply #4 on: February 28, 2017, 08:14:17 AM »
Hi,

Have you deleted the trigger stay system event from your local list in that fsm? maybe that's why it sticks around.

else, can you package me on of these prefab, I'll have a look.


 Bye,

 Jean

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #5 on: February 28, 2017, 10:21:02 AM »
Hi Jean

yes i have made sure it does not exist in my local FSM, the local FSM is linked to a template and checked that too.

i find that OnTriggerStay, OnTriggerEnter & OnTriggerExit this happens to. But ive refreshed and updated soooo many times now that theres nothing more i can try.

Ill send you the prefab later on, i have a few more prefabs that have the same issue.

Nick

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #6 on: March 04, 2017, 03:07:53 PM »
Hi Jean

Attached is one of many prefabs im working on. Since i exported my prefab it no longer says OnTrggerStay but instead it says PlaymakerFixedUpdate? that's strange but i thought i would send it anyway as clearly there is something wrong.

You can see where it is located in the screenshots attached. I have done a small sample as the prefabs are quite large.

prefab download (excluded playmaker in export) i was using Playmaker 1.8.3
[MODERATION: Please do not include PlayMaker dlls in your public packages]

Nick
« Last Edit: March 06, 2017, 01:51:08 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM removing script auto adds back in after runtime
« Reply #7 on: March 06, 2017, 01:45:09 AM »
Hi,

 yes, FixedUpdate will be used for anything working with physics for example.

 I'll have a look at your package

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM removing script auto adds back in after runtime
« Reply #8 on: March 06, 2017, 01:52:37 AM »
Hi,

 confused, your prefb platform has no playmaker fsm on it... Can you give instructions and repackage ( to not include PlayMaker dll :) )

 Bye,

 Jean

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #9 on: March 06, 2017, 04:02:28 AM »
Hi Jean

Apologies, i didn't realise i did.

Here is a new exported prefab. [MODERATION: DO NOT INCLUDE PLAYMAKER DLL OR PACKAGES]

Well, all you have to do is
1. have playmaker installed (1.8.3)
2. then import the above package.
3. Then drag it into the scene and then find the child object on the prefab called 'front'.
4. On this prefab is a script which is linked to a FSM template called 'Gravity Rotate Player'.

Basically in my current project on this GameObject it says that im using 'OnTriggerStay'. When im not using this anywhere is my local FSM.

Now, when i exported this prefab to send it to you, I decided to test it in a new project to check things are ok before sending it to you Jean. When i did this i noticed something strange had happened. The 'OnTriggerStay' doesnt show anymore in the inspector panel, i now see 'PlaymakerFixedUpdate'. I am also NOT using fixed update in my local FSM template at all. https://drive.google.com/open?id=0B3pjk3QvaXZcU2xyMW5CQ2ZVN1U

Hope this makes sense as im more confused now but my point is that Playmaker is STILL including scripts that i am not using in my local FSM.

I got this warning message when i tested importing the above package this time, but i get no compile errors. it said i was using a obsolete API but i get nothing show in the inspector. Could this be the issue? https://drive.google.com/open?id=0B3pjk3QvaXZcNTk4XzBBZEY3dGM

After more research, i can see that clearly something is wrong with the Playmaker FSM Template. It was created a while ago and has become corrupt? i have loads of these templates and ive onbly sent one to you. I can no longer select it when assigning a FSM template in the FSM box in the inspector panel?

Nick




« Last Edit: March 09, 2017, 01:57:58 AM by jeanfabre »

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #10 on: March 08, 2017, 10:54:37 AM »
bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM removing script auto adds back in after runtime
« Reply #11 on: March 09, 2017, 02:06:20 AM »
Hi,

 Thanks for this, indeed I can repro some of it:

 yes, there are playmaker proxy components, and they don't get cleaned up properly despite the fact the fsm do not need it, I'll report this to Alex so that he can address it.

 however, clean up up the prefab and hitting apply, do not make them proxy come back after I play and stop, Can you record a screencast showing this? I am not saying it doesn't do this on your end, but I can't repro this locally, so if I can see what's happening in a screencast, that will help.

Bye,

 Jean

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #12 on: March 09, 2017, 08:54:05 AM »
Hi Jean

Here you go, ive recorded the prefab, you can see i first remove the script 'fixedupdate' from the 'back' object and every time i click apply on the prefab it adds it back in again.
video https://drive.google.com/open?id=0B3pjk3QvaXZccHUwS3htdXV6NE0

p.s. incase you need to look further ive sent you a PM with a link to a copy of my project files. I copied my project and removed all scenes so it just left the one you see in this video. This project includes Playmaker plugin etc so you can see the issue more clearly.

Nick
« Last Edit: March 09, 2017, 08:56:07 AM by coxy17 »

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: FSM removing script auto adds back in after runtime
« Reply #13 on: March 13, 2017, 03:47:18 PM »
Hi Jean

After further investigation it seems that my Playmaker FSM templates have different data versions. I know its not good to have data version 1, but how come they have this? ive had some of these templates a while now and have been there in quite a few playmaker asset updates. Its not good as it will take me a long time to update my game and to create new ones. Also whats to say this might happen again in future updates.

you can see in the screenshots below that some are
data version 1
https://drive.google.com/open?id=0B3pjk3QvaXZcZ3MyTFY2SWFUUE0

some are data version 2
https://drive.google.com/open?id=0B3pjk3QvaXZcekFIOVgxUDVyLTg

Why is this? and what can i do now? i hope you can help as my whole project uses these :/

Thanks

Nick
« Last Edit: March 13, 2017, 03:49:37 PM by coxy17 »