I have this script attached to my camera:
public class CameraFollow : MonoBehaviour {
public Transform target;
public float smoothSpeed = 0.125f;
public Vector3 offset;
private void Start()
{
target = ?
}
private void LateUpdate()
{
transform.position = target.position + offset;
}
}
Since my player is instantiated, I can not drag the prefab to the public target. What can I type in the Start function go set the target as my instantiated player. It has the tag "Avatar".
I am using PhotonNetwork, so I will have several players in a room.