Hyperlink to an external web page c#

Hello everyone,

I would like to but an external hyperlink inside a unity window, I want this link to open a new browser window once user clicks the link, I used
Application.OpenURL(“URL”);
inside the method
void DrawMyWindow(){ }
but unfortunately it lunches the URL once I open the window rather than when I click on this link.

Thank you

Well, if you want to show the web page inside the unity gui window, then I’d suggest getting Coherent UI.

But if you’re just trying to put a link in a window:

private Rect windowRect = new Rect(0,0,100,100);

void OnGUI(){
    windowRect = GUI.Window(0,windowRect,DoMyWindow,"My Window")
}

void DoMyWindow(int id){
    if(GUILayout.Button("Link")){
        Application.OpenURL("http://google.com")
    }
}