// Use this for initialization void Start() { cameraCollider = gameObject.GetComponent <BoxCollider2D>(); playerCollider = GameObject.FindGameObjectWithTag("Player").GetComponent <BoxCollider2D>(); playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Doy>(); controller = gameObject.GetComponent <Controller2D>(); //leftBounds = GameObject.FindGameObjectWithTag("LeftBounds").GetComponent<Transform>(); //rightBounds = GameObject.FindGameObjectWithTag("RightBounds").GetComponent<Transform>(); }
// Start is called before the first frame update void Start() { playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Doy>(); print(playerScript); }