void Start() { hp = GameObject.Find("HPtext").GetComponent <HP_Con>(); // find gameobject "HPtext" and access HP_Con component }
void Start() { Player = GameObject.FindGameObjectWithTag("Player").transform; // find gameobject with tag "Player" and access transform hp = GameObject.Find("HPtext").GetComponent <HP_Con>(); // find "HPtext" and access HP_Con component }