I named a script “Button” which messed something up in the UI system but I don’t know what. Now DebugUIBuilder.cs, a script from Oculus in their vr package, gives a compiler error reading “'Button does not contain a definition for ‘onClick’ and no accessible extension method ‘onClick’ accepting a first argument of type ‘Button’ could be found”. I deleted the script right away because of the obvious damage it did to the project. I have tried removing the oculus xr package along with the unity ui package and reinstalling them using the package manager. This did not solve the problem. I don’t know what naming a script Button caused, but for now my project is rendered useless.
I have solved the problem by changing Button to UnityEngine.UI.Button in the DebugUIBuilder script.
If you like to use class names that overlap with other existing classes , you might want to put them in your own namespace.
That way other packages will not see / use it.