findobject getcomponent code example
Example 1: unity gameobject.getcomponent
rb = GetComponent();
Example 2: findobject getcomponent
GameObject.Find("Name of the object you want to access").GetComponent();
PlayerControllerScript.run = true;
Another Example:
GameObject.Find("Player").GetComponent().run = true;