I am following a tutorial on how to make a gun to shoot a bullet, but I am getting this error:
"The name 'ObjectPoolingManager' does not exist in the current context"
I am following the tutorial exactly as is, and I don't know why this happens.
Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PL : MonoBehaviour {
public GameObject bulletPrefab;
public Camera playerCamera;
// Update is called once per frame
void Update() {
if (Input.GetMouseButtonDown(0)) {
GameObject bulletObject = ObjectPoolingManager.Instance.GetBullet(true);
bulletObject.transform.position = playerCamera.transform.position + playerCamera.transform.forward;
bulletObject.transform.forward = playerCamera.transform.forward;
}
}
}