public virtual void Awake() { //Get joystick string joystickString = Constants.getNextJoystick(); charMovement = GetComponent<Movement>(); charMovement.setJoystick(joystickString); GameObject healthBar = (GameObject) GameObject.Instantiate(Resources.Load ("Prefabs/HealthBar")); HealthBar hpScript = healthBar.GetComponent<HealthBar>(); hpScript.setTarget(this); GameObject pointer = (GameObject) GameObject.Instantiate(Resources.Load ("Prefabs/Pointer")); pointScript = pointer.GetComponent<Pointer>(); pointScript.setParent(gameObject); addPlayer(this); }