I have my prefab with the Bullet slot filled:
But upon being instantiated, it looks like this:
Here is my instantiation script:
using UnityEngine;
public class gunShooter : MonoBehaviour
{
public float speed = 20f;
public new Object bullet;
public new Transform boxTransform;
public Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
boxTransform = GetComponent<Transform>();
}
void Update()
{
transform.position = boxTransform.position;
if (Input.GetButtonDown("Fire1"))
{
Rigidbody instantiatedProjectile = Instantiate(bullet, new Vector3(transform.position.x, transform.position.y,
(float)(transform.position.z + 0.3)), transform.rotation) as Rigidbody;
}
}
}
Thank you for trying to help, I really appreciate anything you guys can tell me.