Answer the question
In order to leave comments, you need to log in
What is the error in my code?
1 using UnityEngine;
2
3 public class FolowCamera : MonoBehaviour
4 {
5 public transform player;
6 public Vector3 offset;
7
8 // Update is called once per frame
9 void Update()
10 {
11 transform.position = player.position + offset;
12
13 }
14 }
error in Unity:
Assets\FolowCamera.cs(5,12): error CS0246: The type or namespace name 'transform' could not be found (are you missing a using directive or an assembly reference?)
Answer the question
In order to leave comments, you need to log in
Send a screenshot from the unit itself, in my opinion you forgot to transfer the player to the script
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question