Vector3.Magnitude(Camera.main.WorldToScreenPoint(f1.transform.position) - Input.mousePosition);
Im using the above code to get some distance with an GameObject called f1.First im using first person controller. Then my application works fine. But when i delete the first person controller and try to add just a camera below exception comes.
NullReferenceException UnityEngine.Camera.WorldToScreenPoint (Vector3 position)
What should i do?