Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Render Streaming compile error (CS0246) - what am I missing?

Discussion in 'Unity Render Streaming' started by oliver9523, Jul 9, 2022.

  1. oliver9523

    oliver9523

    Joined:
    Apr 7, 2016
    Posts:
    14
    I'm trying to run a sample project for the render streaming package (https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/index.html)

    The only steps I've taken are...
    1. created an empty project in 2020.3.22f
    2. I've added these packages using the github links
    • com.unity.webrtc@2.4.0-exp.8
    • com.unity.renderstreaming@3.1.0-exp.3
    I'm getting the error...
    Library\PackageCache\com.unity.renderstreaming@3.1.0-exp.3\Runtime\Scripts\RenderStreamingInternal.cs(25,16): error CS0246: The type or namespace name 'EncoderType' could not be found (are you missing a using directive or an assembly reference?)

    What am I missing?

    My overall objective is to stream multiple virtual cameras to an application like VLC - I'm falling at the first hurdle :(
     
  2. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    245
    Unity Render Streaming 3.1.0-exp.3 supports com.unity.webrtc prior to 2.4.0-exp.6.
    I think it will work if you replace com.unity.webrtc with 2.4.0-exp.6 or earlier.
     
    evidential and oliver9523 like this.
  3. oliver9523

    oliver9523

    Joined:
    Apr 7, 2016
    Posts:
    14
    ah thank you! That has resolved that issue. I also switched to URP project - not sure if that makes a difference.
    I've now successfully used the webapp to view the stream in the browser. Any idea what URL or how to get the stream into something like VLC?
     
  4. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    245
    Do you mean you want VLC to display streaming video?
     
  5. oliver9523

    oliver9523

    Joined:
    Apr 7, 2016
    Posts:
    14
    correct - ultimately I want to read the stream with python.
    I think this package (https://github.com/aiortc/aiortc) might work but still need to figure out how to connect to the unity stream.
     
  6. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    245
    I wish VLC had a plugin to display a stream of WebRTC, but I couldn't find it.

    I wrote a sample to connect to aiortc from Unity.
    Note that aiortc does not support Tricle ICE.
    Unity Render Streaming is not available because Unity Render Streaming currently only supports Tricle ICE.
    So use only WebRTC for Unity (com.unity.webrtc).
    The sample also uses only WebRTC for Unity, so I'm using com.unity.webrtc@2.4.0-exp.8.

    Unity_aiortc_sample
     
    oliver9523 likes this.
  7. oliver9523

    oliver9523

    Joined:
    Apr 7, 2016
    Posts:
    14
    ah awesome, thanks for the example and clarifying about the Tricle ICE support - I'm totally new to this technology stack so learning a lot!