-1

I'm currently working on a project that will be buildt in webgl. It uses an asset that runs an .exe (cmd window) file to convert data that I need. But this does not work in webgl as it can't call the .exe file.

So now I'm searching for solutions. I tried to change paths and everything but nothing worked. Now my thought would be to make a second unity project that runs on a server and waits for a request. When the request gets sent out of the unity webgl project, the unity project on the server hears that request and runs the asset, after it finishes, it will send back the gameobject created. But I haven't tested it yet.

Would there be any other possible way?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
DragonBale
  • 19
  • 1
  • 4

1 Answers1

1

Why do you want to download an *.exe file to get assets from a server?

Your issue sounds like you want to implement a normal gameclient with an unity gameserver that provides you with assets.

The good news is Unity implemented this one for you! :)

You can create an assetBundle and get it via network communication: https://docs.unity3d.com/ScriptReference/AssetBundle.html

Steps would be:

  1. set up a public reachable webserver ( for local testing you could use XAMPP )
  2. place your package there (htdocs)
  3. follow the instructions from link above.
Sorm87
  • 83
  • 4
  • There are **much simpler** servers than XAMPP. [Here's a bunch](https://stackoverflow.com/questions/12905426/what-is-a-faster-alternative-to-pythons-http-server-or-simplehttpserver). They'll take just a moment get running and are much more suited to development than XAMPP. – gman Sep 20 '17 at 01:13
  • simpler? install xampp and click "start apache".. thats it – Sorm87 Sep 20 '17 at 06:16
  • Seems like you skipped the steps of moving your project out of a normal location and into htdocs. simpler = cd to any folder. run, that folder is served. with XAMPP everything needs to be in htdocs or you have to use symlinks or move stuff around or deal with configuration file. Also with others it's easy to serve 2 or more things at once. cd to one folder type `cmd -p 8080` that folder is now served at `localhost:8080`. cd to another folder and type `cmd -p 8081`. That folder is now served. Nothing to install deep in your system. No services running. So yea much simpler – gman Sep 20 '17 at 06:28