This question was
closed Sep 20, 2015 at 02:18 AM by
kojunha for the following reason:
문제가 재현되지 않거나 오래되었음
What this error?
I wrote C# script like this but, I got these error.... How can I solve this problem???
using UnityEngine; using System.Collections;
public class Camera_M : MonoBehaviour {
public GameObject Player;
// Use this for initialization
void Start () {
transform.position = Player.transform.position;
}
// Update is called once per frame
void Update () {
transform.position = Player.transform.position;
}
}
NullReferenceException: Object reference not set to an instance of an object Camera_M.Update () (at Assets/Scripts/Camera_M.cs:18)
NullReferenceException: Object reference not set to an instance of an object Camera_M.Update () (at Assets/Scripts/Camera_M.cs:18)
Comment