Hello, i have a problem. I have button in inspector, I have script where i want to modify button, im using public Button name; , but in inspector i see ,name, but i cant assign my button there. Any solution?
@Stephanides I had a class called “Button” which shares the same name as the UI Button. The best solution is to change the name of the class Button to another thing like “Button_Class”.
If you don’t want to change the Class name then a workaround for it will be when assigning your public variables, instead of typing:
public Button yourButton;
you do:
public UnityEngine.UI.Button yourButton ;