my instantiated prefabs dont render

im trying to make a shooting mechanic and i used brackeys tutorial to do so, but my bullets dont render in the game view, but they DO render in the scene view anyone know why?

heres the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Shooting : MonoBehaviour
{

public Transform firePoint;
public GameObject bulletPrefab;

public float bulletForce;

// Update is called once per frame
void Update()
{
    if(Input.GetButtonDown("Fire1")){
        Shoot();
    }
}

void Shoot(){
    GameObject bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
    Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>();
    rb.AddForce(firePoint.up * bulletForce, ForceMode2D.Impulse);
}

}

Hm. First thing that comes to mind is a layer issue.

If you can see the object in your scene view but not the game then make sure your object is on a layer that the camera can render (or just put the object on the default layer).


193927-layer.png


193928-render.png


Hope this helps!