I’m still getting the error: NullReferenceException: Object reference not set to an instance of an object
CameraArm.Start () (at Assets/CameraArm.cs:12)
Could you please help me?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraArm : MonoBehaviour {
GameObject player;
// Use this for initialization
void Start () {
player=GameObject.FindGameObjectWithTag("Player");
print(player.ToString());
}
// Update is called once per frame
void Update () {
}
}
Edit: Added the code