Hello,
I need to change the values of several variables in a Playmaker FSM. I am now doing it with this script:
using UnityEngine;
using HutongGames.PlayMaker;
public class ChannelNameValues : MonoBehaviour
{
public PlayMakerFSM fsm;
public void ResetChannelName()
{
fsm.FsmVariables.GetFsmString("Step 1 Name").Value = "";
fsm.FsmVariables.GetFsmString("Step 2 Name").Value = "";
fsm.FsmVariables.GetFsmString("Step 3 Name").Value = "";
.
.
.
.
}
}
I need to change the values of about 40 variables in one FSM and I know that this is not the correct way to do it.
Could you please help with an easier method of changing the values ... something similar to how all the buttons can be set active or inactive by putting them in a list and using "foreach (GameObject obj in objects)
{
obj.GetComponent<Button>().interactable = false;
}
"
Thanking you in advance,
Rajeev