Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: daodao on March 25, 2024, 10:26:07 PM

Title: About template is not working
Post by: daodao on March 25, 2024, 10:26:07 PM
Hi, I am using Unity 2.22.3.17 and I have imported PlayMaker into the project. In editor mode, the state machine I created or the template I saved works. But when I run the PC version of the build, it doesn't play right where the template is used. If I replace the template with a state machine that has the same effect, there is no problem.Why, please? thanks.
Title: Re: About template is not working
Post by: Alex Chouls on March 27, 2024, 07:32:40 AM
Is the FSM in the template referencing scene objects? Templates are assets, which in Unity means they can’t save references to scene objects. Instead you have to find the scene object at runtime, either using an action or by exposing a variable as an input and hooking it up in the inspector.