How to access a variable for a Component of a different GameObject ?

Object A has a component as follows :

GameObject.Find("RadiusSpawner").GetComponent<InstantiateRadius>().radiusPrefab.radiusPrefab.collider2D.enabled = false;

which I wish to access from a script on Object B. What do I have to do to declare the same in the script for Object B ?

Just adding the answer :stuck_out_tongue:

Why not just call the collider directly?

GameObject.Find(“RadiusSpawner”).GetComponent(Collider2D)()

For some reason it wont let me add triangle brackets so replace curved ones above.

Alternatively if you need to get an object from a script and change its collider you need to do an additional get component to find the collider.