Name is exactly the same, and it's a global transition on that specific FSM on a state. (I'm testing this on iOS)
The thing is that If I move this to a different location, it works. but in this bit here it doesn't..
So if I move to beginning of this function then it WORKS:
public void StartRecording() {
// We then start recording, with three possible inputs: "first", "second", and "third"
Debug.Log (FSM_Input);
Debug.Log ("Starting recording");
startRecording (FSM_Input); // START RECORDING HERE (HOLD BUTTON)
// Three seconds later, we wiĺl stop recording in the provided onRecordingDone function
if (stopped)
return;
}
However, if I move it here, then it doesn't work anymore...
public void resultCallback(string status) {
#elif UNITY_ANDROID || UNITY_STANDALONE_OSX
public static void resultCallback(int score, int speed, string words) {
#endif
// Callback when result is available, a few seconds after stopRecording, typically.
// See docs on how to parse the result.
Debug.Log ("Result");
#if UNITY_IOS
FsmString result_iOS = FsmVariables.GlobalVariables.FindFsmString("result_iOS");
result_iOS.Value = status;
myFSM.SendEvent ("SplitString");
Debug.Log (status);
Debug.Log("result_iOS =" + result_iOS.Value);
What I'm trying to achieve is that each time the recording stops and result comes back in string, I need to send event to that FSM to let it know that the result has came back and then to split the string, and select the first index out of that array. So once I have the score (first item of string result) I can pass it on to ugui text.
But the event won't fire for some reason, I've put debug logs in playmaker and they dont show up so I assume that the event doesn't fire up..