I"m super new to coding and to this forum so pardon me if ns break any taboo"s here. I"m merely working ~ above a 3rd person camera, just kind of messing about but ns keep gaining

UnassignedReferenceException: The variable CameraFollowObj the CameraFollow has not been assigned. You more than likely need to entrust the CameraFollowObj variable of the CameraFollow manuscript in the inspector. CameraFollow.CameraUpdater () (at Assets/Scripts/CameraFollow.cs:68) CameraFollow.LateUpdate () (at Assets/Scripts/CameraFollow.cs:62)"

I"ve created an object for my camera to follow and also placed it on the model.


You are watching: Unity the variable has not been assigned


See more: Is Human Fall Flat Cross Play, Human Fall Flat Has No Plans For Cross

Then moved the object to what I believe to be the correct field yet the issue still persists.

*

using System.Collections;using System.Collections.Generic;using UnityEngine;public class CameraFollow : MonoBehaviour public rise CameraMoveSpeed = 120.0f; public GameObject CameraFollowObj; Vector3 FollowPOS; public to rise clampAngle = 80.0f; public to rise InputSensitivity = 150.0f; windy GameObject CameraObj; publicly GameObject PlayerObj; public to rise camDistanecXToPlayer; public to rise camDistanecYToPlayer; public rise camDistanecZToPlayer; public float mouseX; public float mouseY; public to rise finalInputX; public float finalInputZ; public float smoothX; public to rise smoothY; exclusive float rotY = 0.0f; personal float rotX = 0.0f; // start is called prior to the an initial frame update void Start() Vector3 rot = transform.localRotation.eulerAngles; rotY = rot.y; rotX = rot.x; Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; // update is called once per framework void Update() float InputX = Input.GetAxis("RightStickHorizontal"); rise InputZ = Input.GetAxis("RightStickVertical"); mouseX = Input.GetAxis("Mouse X"); mouseY = Input.GetAxis("Mouse Y"); finalInputX = InputX + mouseX; finalInputZ = InputZ + mouseY; rotY += finalInputX * InputSensitivity * Time.deltaTime; rotX += finalInputZ * InputSensitivity * Time.deltaTime; rotX = Mathf.Clamp(rotX, -clampAngle, clampAngle); Quaternion localRotation = Quaternion.Euler(rotX, rotY, 0.0f); transform.rotation = localRotation; void LateUpdate() CameraUpdater(); void CameraUpdater() transform target = CameraFollowObj.transform; float action = CameraMoveSpeed * Time.deltaTime; transform.position = Vector3.MoveTowards (transform.position, target.position, step);