How to get the deactivate laser when using new input system OnFire method?

Hi Naumaan,

What exactly do you mean? Whenever the OnFire method gets called, you could either enable or disable the laser. If you reference the laser game object, you could call laser.SetActive(true); or lasers.SetActive(false); on the laser game object. Enabling and disabling works the same way as in Rick’s code.

I hope this helped. :slight_smile:


See also: