Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

external webinterface controls desktop game

Discussion in 'Scripting' started by Tunkali, May 29, 2015.

  1. Tunkali

    Tunkali

    Joined:
    Feb 5, 2013
    Posts:
    54
    Hello folks,

    I want to build a webinterface which can be used by any mobile device on wlan and controlling my unityproject. How do I call from my webelements via javascript(?) to the unity parameters or unity is listening to the webpage?

    I'm am just a beginner with javascript...

    Thank you very much!

    Edit: I should mention, i use a template with jquery-library for the webelements. So there is some sliderstuff. Do I have to manipulate the original libraries or do I write a script like "listen to value x in file something or html value something?

    Edit2: As I thought a little about, could I send an event with the actual value to unity from the jqueryscript? But its only local, not? Do I need php and a central database (Im little afraid, because it seems to complicated for this purpose)? Because I dont want to tell the computer on which device he should listen. He should just grab the data anywhere it comes.

    Edit3: Sorry for beeing so rashly, because I am in little hurry for a demo ;-). As far as I know now, I need server-side javascript like node.js. So I need something like a controldata.txt, feed it with my browserbase jquery-javascript somehow and put my unity-entity listning to events to the controldata.txt. Is that right?
     
    Last edited: May 29, 2015
  2. Tunkali

    Tunkali

    Joined:
    Feb 5, 2013
    Posts:
    54
    Somebody who can help me or maybe point me in the right direction? Or you have a better approach?
     
  3. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    So is it a game in a web browser? If so wouldn't you just do the build as webplayer?
     
  4. Tunkali

    Tunkali

    Joined:
    Feb 5, 2013
    Posts:
    54
    No, the (serious-)game runs on a desktop computer which is connected to an immersive projected environment. I want to control the game (camera, day night cycle, etc.) with an webinterface which can be controlled through any mobile device (smartphone, tablet, netbook, etc.).