Ok, so in theory that works, but now my new problem:
I want to add a public gameObject reference - this being the object I have the variableHolder script attached to in order to track player cash. However it will not show up as a field on the editor (UIButton script) to be able to 'drag and drop' the variableHolder object onto.
Is there a way, without using 'find object' to reference another gameObject on the UIButton script in this way?
Am I missing something simple and obvious?
EDIT: WAIT! This is even more confusing. Editing the UIButton script edits the script for ALL the buttons (of course). It seems like a bad idea for me to even be editing this script, yet how do I set 'isEnabled' = false on the UIButton script from a different script attached to the button. I am not particuarly experienced in coding, so if this is VERY simple and OBVIOUSLY obvious, then perhaps someone can explain it like I'm 5?