public class LinePositions : MonoBehaviour
{
public LineRenderer theline;
public Transform pos11;
public GameObject BULLET;
// Start is called before the first frame update
void Start()
{
BULLET = GameObject.FindGameObjectWithTag("Bullet");
theline.enabled = false;
theline.positionCount = 2;
}
// Update is called once per frame
void Update()
{
if(BULLET != null)
{
theline.SetPosition(0, pos11.position);
theline.SetPosition(1, BULLET.transform.position);
theline.enabled = true;
}
}
}
public class LinePositions : MonoBehaviour
{
public LineRenderer theline;
public Transform pos11;
public GameObject BULLET;
// Start is called before the first frame update
void Start()
{
BULLET = GameObject.FindGameObjectWithTag("Bullet");
theline.enabled = false;
theline.positionCount = 2;
}
// Update is called once per frame
void Update()
{
if(BULLET != null)
{
theline.SetPosition(0, pos11.position);
theline.SetPosition(1, BULLET.transform.position);
theline.enabled = true;
}
}
}