private Player_Input_Script pis; //Declare the player input script under a variable void Start() { pis = GameObject.FindWithTag("Player").GetComponent <Player_Input_Script>(); //Get the current status of the script and place it under the variable }
private Player_Input_Script pman; //Declare the instance already declared in Player_Input_Script void Start() { pman = GameObject.FindWithTag("Player").GetComponent <Player_Input_Script>(); //Get the component from the player game objct. }
void Start() { last_level = GameObject.FindWithTag("GameControllerObj").GetComponent <GameController>().Gm.LastLevel; pis = GameObject.FindWithTag("Player").GetComponent <Player_Input_Script>(); healthdecrate = 20; }