Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    288
    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:
    288
    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:
    288
    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!