79333522

Date: 2025-01-06 15:31:18
Score: 1.5
Natty:
Report link

This was a big headache to me, I don't see really why unity bugs are so ridiculous, and miss guided for beginners

Ya as said by @Last_Imba and @emredesu it works when adding a one frame delay

previous code

 gunCtrl.Shoot();

The Fix

IEnumerator ShootThread()
    {
        yield return new WaitForEndOfFrame();
        gunCtrl.Shoot();
        yield return null;
    }

Posting this as it would help some beginners like me.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Last_Imba
  • User mentioned (0): @emredesu
  • Low reputation (1):
Posted by: chandrasekaran Natarajan