Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rebooter on August 23, 2019, 06:13:35 AM
-
In the script for an action, how do you determine if a variable has been assigned by the user?
Example:
[UIHint(UIHint.Variable)]
public FsmFloat remainingDistance;
I need to know if the user has assigned a variable to the above, or if they have selected 'None'.
Is it 'remainingDistance.IsNone'?
I'm also seeing 'useVariable' and 'usesVariable'. What are these?
-
Hi.
IsNone is the one to use.
if the variable is required you can also place [RequiredField] above it.
Then it is not necessary to check IsNone.
{ UseVariable = true };
is used when you want to set default value to none.
for example :
float1 = new FsmFloat { UseVariable = true };