[Unity] Camera Work
To make camera follow an object in Game View, you have to make a script and apply to Main Camera.
First you have to declare a member variable which type is GameObject. For example, when I declare the variable like this
By using it, you can input real object's location to 'ball' by 'GameObject.Find(" ");' command.
The location of object 'Ball' will be inputted to variable 'ball' when the game starts. By coding Update() function as picture
Highlighted transform.position calls the location of objects that this script is applied. 'new Vector3(x,y,z)' make a vector which have 'x,y,z' components. By substitution of 'ball.transform.position.y + 3' in 'y' value and 'ball.transform.position.z - 14' in 'z' value, Main Camera will follow the ball in the game.