Search Unity

Database in a webGL project when it's built

Discussion in 'Web' started by ismaellopezr, Feb 19, 2019.

  1. ismaellopezr

    ismaellopezr

    Joined:
    Nov 3, 2018
    Posts:
    2
    Hi! I've made this app which connects to a 000webhost database. Everything works fine while I run my app in playmode, but once I build the webGL project it's like my database not even existed. I have a login scene and I can login with any username and password I want which obviously it's not the point. Is there a step that I am missing?
     
  2. Katori

    Katori

    Joined:
    Nov 30, 2009
    Posts:
    60
    What APIs are you using to talk to the database? Regular .NET networking APIs are not available in WebGL, you must use UnityWebRequest, WWW, or write a custom implementation in the JavaScript layer (which could include WebSockets possibly for realtime communication).

    See this page for more info.
     
    ismaellopezr likes this.