Playmaker version: 1.9.0.p10
Unity version: 2018.3.6f
Hey,
After updating Playmaker and Unity I'm checking consistency between the editor and build. I've noticed that a lot of our important prefabs (Player, NPCs etc.) are not working in build while they work fine and same as before in the editor.
I've tried to find what's the reason of that and after checking things step by step I was able to reproduce the issue in the fresh project so it could be easier to catch the problem.
1. Create a PlayMaker FSM template in new project.
2. Use action with LateUpdate mode checkbox (tested on Set Position) and set it as true, don't use 'every frame'. Add a FINISH transition event from this state.
4. Add some states after the state with Set Position action to see if they are working after the state with Set Position is finished.
3. Create a prefab and use the template in prefab.
4. In the tested scene, create another object that will spawn the prefab into the scene (tested both with FSM 'create object' and c# Instantiate).
In editor everything works fine. The state with Set Position is finished, action is applied and all actions after it are working fine.
In build (PC, Mac and Linux standalone [tested only on PC Windows]) the Set Position action is not applied and actions after it are not working at all.
I've tested it in scenes where the prefabs are placed and saved in the scene instead of spawning them from other fsm/script and the template work.
I also works if the prefab uses FSM with same actions and logic but without a template.
EDIT: I'm comparing the logs nad I'm not sure but it could be that the handler is not created when it uses a template.
"AddEventHandlerComponent: PlayMakerLateUpdate" is logged in build with prefab without a template while I don't see this message in build that uses template.
Anyway I'm not sure as I think that I was getting this message in my main project even if the template was used.
Doublechecked this and there is no "AddEventHandlerComponent: PlayMakerLateUpdate" message in the build that only spawns a prefab with template.