- Home /
Setting up a web service in Unity?
Hi everyone,
since I found a lot of answers regarding the question how to consume a web service within Unity. But now I have the scenario that I wanna realize a web service in Unity so that a web application on any server, for example in the cloud or in a network, could consume the web service in Unity.
So my questions are:
1) Is it possible to realize a web service in Unity?
2) If yes, how exactly can a web service be created / set up in Unity? (Documentation? / Tutorial?)
3) If no, is there any other possibility to realize anything similar?
Thank you for your effort in advance.
Regards, Kevin
A wild guess would be that - yes, you can do that, unless Unity is blocking the Ports or using a old C# version.
Have a look at https://support.microsoft.com/en-us/help/308359/how-to-write-a-simple-web-service-by-using-visual-c--net or just search for "c# web service" as it's more of a program$$anonymous$$g thing than anything else.
You could always just do a simple C# project ins$$anonymous$$d (which is basically what servers run for the most part anyway) ins$$anonymous$$d of having a Server run inside Unity unless that's your goal.
Your answer
Follow this Question
Related Questions
Web services/server advice 0 Answers
Set Content-Length header for UnityWebRequest POST requests in 2017.3? 1 Answer
Can't Send a form to a server(POST) due to CORS error in a WEBGL build 1 Answer
JSON WebRequest works in 2018.2, throws 403 error in 2018.3 0 Answers
How Do I Send Text to Server 0 Answers