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

Question Creating project architecture for web based game

Discussion in 'Web' started by eco_bach, Apr 30, 2021.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi
    First time that I have had to deploy a Unity game that must be web based.

    There are 2 main requirements
    1 - I need to stream live video in from a remote server
    2- I need to be able to interact with the remote server, send simple commands

    Is this something that should be attempted using WebGL export or should I be using the new Render Streaming over WebRTC feature?
     
    Last edited: Apr 30, 2021
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Unity itself does not have live video streaming integration in the core engine. That does not mean however that it could not be done, but instead one would use general web development techniques to build a HTML/JS site that does the streaming, and use that as a web page template around which to build the Unity page. Then with C#<->JS interop one can call back and forth between the JS and the C# domains of the project.
     
  3. junaid109

    junaid109

    Joined:
    Mar 3, 2013
    Posts:
    13
    I had a similar issue which I solved using the following:

    1. AVPro Video
    2. HLS Streaming (you will need to embed this library)
    3. Use a service to host your videos in a format supporting streaming.
    4. Interaction part is easy set up a Node JS Api or use ASP Net Core Signal R.