So I’m a beginner with unity and c#. I am watching a brackets tutorial on how to make a simple game.
I have written this code here which is supposed to bring my main camera to the position of my player.
public class Camarafolow : MonoBehaviour
{
public Transform player;
void Update()
{
transform.postion = player.position;
}
}
the code is supposed to 1. make a variable for me to drag the Transform component into and 2. change the position of the camera to the position of the player. but when I save the script and open unity the script component just looks like this and does not have the extra variable slot for me to drag the transform component into. I hope this made sense.
Thanks