how to acces a component unity code example
Example: unity get component
public GameObject Var; //only if the component you want is on a different gameObject
void Start(){
Var.GetComponent<Component>(); //just GetComponent<Component>(); if the component you want is on the same object as script
}