Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: playsteven on November 14, 2017, 06:53:01 AM
-
Hi,
I've got a sprite in my action and I want to check if the inputed value is none. I've tried null but that doesn't seem to work.
Currently I'm using a bool value to see if I need to change the sprite, but if I can check if the sprite is none then I don't need the bool (just tidying code a little).
public FsmBool SecondImage;
[ObjectType(typeof(UnityEngine.Sprite))]
public FsmObject SecondImageSprite;
Thanks,
Steven
-
Hi,
Have you tried :
if(SecondImageSprite.Value == null)
if it is a required thing you can use :
[RequiredField]
above the variable.
-
Thanks @djaydino I thought I had tried that, but obviously I didn't :o Can't even blame tiredness when you make mistakes in the morning!
-
Hi,
Coding is all about making errors :P
Anytime of the day :)