I want to Broadcst a message and the parameter value is sometimes null.
transform.BroadcastMessage("SetTarget",target,SendMessageOptions.DontRequireReceiver)
and sometimes target is null. My SetTarget method can hndle a null case for target but when I try to broadcsst a message where target = null I get
Failed to call function SetTarget of class LightningBolt
Calling function SetTarget with no parameters but the function requires 1.
UnityEngine.Component:BroadcastMessage(String, Object, SendMessageOptions)
Is this there a way around this other than check if target is null and broadcasting a different message for that case?
the recier is a cs file and the sender boo if that matters.
Cheers,
Grant
Turret:Update() (at Assets/Scripts/Turret.boo:32)
(yes I am using a modified version of Jonathan Czeck’s awesome lightningbolt)