PlayMaker Help & Tips > PlayMaker Help
[CustomAction]How to convert FSM string value to String value?
(1/1)
bloodymin:
Recently, I learning fun of creating custom action stuff.
But, i faced to one of simple problem. I research on other custom action but i couldn't find answer for it
What i want to do is that wanting to using FSM string value to my custom action.
like drop box, or playmaker's global value stuff.
My custom action is like this
--- Code: ---using UnityEngine;
using HutongGames.PlayMaker;
[ActionCategory("facebook")]
public class posttext : FsmStateAction
{
#region Fields
[UIHint(UIHint.Variable)]
public string message;
public FsmString stringVariable;
#endregion
// Code that runs on entering the state.
public override void OnEnter()
{
message = stringVariable ;
FacebookUnityPlugin.PostMessage(message);
Finish();
}
}
--- End code ---
But it shows error "FSM string variable can't covert to string value.
Or i tried to use FSM string variable directly on uploading text. then it also showed error " FacebookUnityPlugin.PostMessage can't handle FSM string value stuff.
How to covert FSM string value to string value.
izzycoding:
Hey bud,
you need to use stringVariable.Value to get to the actual string.
Regards,
bloodymin:
;D
THX !!!!!
Navigation
[0] Message Index
Go to full version