What is the easy and Best way to access variables in another script. I try
GameObject.FindGameObjectWithTag(“Player”).GetComponent();
But I Think work code this player must in the scene.
Sorry for my bad English,
What is the easy and Best way to access variables in another script. I try
GameObject.FindGameObjectWithTag(“Player”).GetComponent();
But I Think work code this player must in the scene.
Sorry for my bad English,
Referencing variables, fields, methods (anything non-static) in other script instances: