playMaker

Author Topic: fsm only loads when selected in Inspector  (Read 687 times)

Kaikoura

  • Playmaker Newbie
  • *
  • Posts: 21
fsm only loads when selected in Inspector
« on: January 29, 2023, 01:39:00 PM »
Hey,
I updated to Unity 2021.3.17f1. In my Top Down 2D scene, I have multiple FSM on the player game object. If i start the scene, the Input works and the player faces the right direction when moving. But the animations don´t play correctly.
if I select the Player gameObject in the Inspector, it suddenly works. I have no clue why this happens, what could be possible solutions?
Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: fsm only loads when selected in Inspector
« Reply #1 on: January 30, 2023, 01:47:01 AM »
Hi.
Did you also update Playmaker.

Usually its best to 1st update playmaker and other 3rd party assets, then update unity and the update playmaker and 3rd party assets again.

make sure to always have a backup of your project, especially when updating

Kaikoura

  • Playmaker Newbie
  • *
  • Posts: 21
Re: fsm only loads when selected in Inspector
« Reply #2 on: February 01, 2023, 06:20:36 PM »
I did it in the order that you described and it worked. Won´t make that mistake again, thanks for the help!

Luceid

  • Playmaker Newbie
  • *
  • Posts: 16
Re: fsm only loads when selected in Inspector
« Reply #3 on: September 24, 2023, 08:56:41 AM »
Hey Djay,
I had a test project behave similarly to what the OP described. It would misbehave in a very obvious visual way until I actively selected it, then it would do go back to normal. Really bizarre behavior. I had just upgraded the project to 2022.3.10f1 so I'm guessing that was the culprit.

Can you be a bit more specific about the correct way to update playmaker after upgrading unity? Playmaker was already at the latest version, so attempting to reinstall it greyed out all the options for re-importing scripts and reinstalling. Forcefully removing causes havoc in the project as tons of scripts lose their dependencies.

Hi.
Did you also update Playmaker.

Usually its best to 1st update playmaker and other 3rd party assets, then update unity and the update playmaker and 3rd party assets again.

make sure to always have a backup of your project, especially when updating

Luceid

  • Playmaker Newbie
  • *
  • Posts: 16
Re: fsm only loads when selected in Inspector
« Reply #4 on: September 24, 2023, 09:50:21 AM »
Actually now it's happening in a fresh project, but only on objects that contain a custom action script I made, so I guess the problem lies there. Still though, it's weird that the games behavior would wildly change depending upon whether I have the FSM in question selected in editor or not. If anyone wants to take a look at my custom action and see if they spot anything weird I'd appreciate it!

Quick update, I have solved the problem by completely stripping my code of FsmVars. I thought they were working before, but the slight convenience they bring by not having to declare types is not worth the trouble.

I'm sure it was just me attempting to use a tool in a way that it wasn't intended, but for anyone thinking of interfacing with third party scripts, just declare FsmFloats, FsmInts, FsmStrings etc in a compound array. It's slightly more work but far more stable and easy to work with.
« Last Edit: September 24, 2023, 10:47:59 AM by Luceid »