Hello,
I am on section 5.30 and 5.31 and I am getting an error that my bullet is not being instantiated when I click. The error reads, “ArgumentException: The Object you want to instantiate is null.” When I put my prefab into the hierarchy, the bullet works, but if it is not in the hierarchy, then it does not work. I am not sure what I did wrong.
This is my code for the bullet
void OnFire(InputValue value)
{
if (!isAlive) { return; }
Instantiate(bullet, gun.position, transform.rotation);
}
Thanks