I’m very new to Unity, but I’ve been following a tutorial on YouTube (by Brackeys) to make my first game. In the tutorial, he did ‘public Transform player;’, which should work as I have seen lots of people do it before. Basically my issue is linking a GameObject to a variable. The Transform component in the main camera doesn’t show up in the script but I don’t know why. Is anyone able to help solve this…?
Sorry if my terminology isn’t right, I’m still very new.
Here is a link to the video: How to make a Video Game in Unity - CAMERA FOLLOW (E04) - YouTube
I did exactly what he did, and for the main camera, but Transform isn’t showing up for the public variable. (Around 1:35 in the video.)
public class FollowPlayer : MonoBehaviour
{
public Transform player; // This is the part that doesn't work - when I continue it normally changes it to CryptoAPITransform because Transform isn't available.
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}