Hey,
I have created this code:
using UnityEngine;
using System.Collections;
public class Follow : MonoBehaviour {
Transform target;
float xAxis = 0.0f;
float yAxis = 0.0f;
float zAxis = 0.0f;
// Update is called once per frame
void Update ()
{
//Adjust the position to the target
transform.position = new Vector3(target.position.x + xAxis, target.position.y + yAxis, target.position.z + zAxis);
}
}
And I receive the following warning:
Field `Follow.target' is never assigned to, and will always have its default value `null'
What am I doing wrong?