Search code examples
c#unity-game-engineraspberry-pi3asp.net-webpageshttpapi

How to access webpages running in Raspberry Pi through Unity project?


There's a webpage running on my Raspberry Pi. I want to access it through a button in a Unity Project. When I click on the button in Unity, it should redirect to the webpage running in Raspberry Pi.


Solution

  • You can just use the Application.OpenURL() method, like this:

    void ButtonPressed() {
        Application.OpenURL("http://serverip/page.html");
    }
    

    This will open a browser window of the url.