I tried to use this code to disable a light that appears when an in game key is pressed.
if (OnMouseDown == null) { key.light.enabled = false; }
Instead I received an
Operator
==’ cannot be applied to operands of type method group' and null'
Is there an easier way to do this, or to fix my code?
Thank you.