Had the same issue re "Button does not contain 'onClick'" turns out there is more than one Button class and oddly Visual studio didn't give me the usual ambiguous warning ... no idea how that could be but all the same using the fully qualified name resolved e.g. UnityEngine.UI.Button when declaring the class or casting.
↧