I have a panel with copy I can populate from a function, the panel also has a button, which depending on the active function, I want to open a specific URL.
The panel button is specified via: public Button getUrl;
An example of a typical function is:
public void f_B01()
{
DisplayPanel.SetActive(true);
ProductName.text = "Cylinders and Actuators";
ProductDesc.text = "The leading global manufacturer of hydraulic cylinders.";
// This doesn't work:
getUrl.OpenURL("http://website01.com/");
}
Each function has a unique URL, how do I get the panel button to get the url in each function and open it?
This is the current error I’m getting:
error CS1061: ‘Button’ does not contain a definition for ‘OpenURL’ and no accessible extension method ‘OpenURL’ accepting a first argument of type ‘Button’ could be found (are you missing a using directive or an assembly reference?)
Thanks.