Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: cel on December 25, 2019, 06:47:14 AM
-
Hi,
I'm was trying to hide some elements of an action and I came across the hideif attribute in the api documentation, but it doesn't provide an example, when typing the code it says it requires string and test...
Could anyone provide a little example on how to make this attribute work, I've searched in most of the actions in playmaker and I couldn't find one that uses this.
Thanks in advance
-
Hi,
sure, basically, the attribute references a function which returns a bool:
namespace HutongGames.PlayMaker.Actions
{
public class HideIfActionTest : FsmStateAction
{
[HideIf("HideMyString")]
public FsmString MyString;
public bool hide;
public bool HideMyString()
{
return hide;
}
}
}
Bye,
Jean