PlayMaker Help & Tips > PlayMaker Help
Check for sprite value of none [SOLVED]
(1/1)
playsteven:
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).
--- Code: ---public FsmBool SecondImage;
[ObjectType(typeof(UnityEngine.Sprite))]
public FsmObject SecondImageSprite;
--- End code ---
Thanks,
Steven
djaydino:
Hi,
Have you tried :
--- Code: ---if(SecondImageSprite.Value == null)
--- End code ---
if it is a required thing you can use :
--- Code: ---[RequiredField]
--- End code ---
above the variable.
playsteven:
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!
djaydino:
Hi,
Coding is all about making errors :P
Anytime of the day :)
Navigation
[0] Message Index
Go to full version