Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Compile Errors With WebRTC Examples

Discussion in 'Unity Render Streaming' started by JustinOdle, Sep 13, 2021.

  1. JustinOdle

    JustinOdle

    Joined:
    Sep 3, 2021
    Posts:
    2
    Using Unity 2019.4 on my MacBook Pro I installed WebRTC version 2.3.3. I then Proceeded to import the WebRTC examples that are available from the package manager and I get a ton of compile time errors. All of which are CS0234 errors: The type or namespace name '...' does not exist in the namespace 'WebRTC' (are you missing an assembly reference). So basically I am getting an error anywhere that I see something like 'WebRTC.Initialize(...)' or other lines of code that call functions from WebRTC.

    I am pretty new to Unity and C# so maybe this is simple to fix but It seems to me that I should not be getting these errors and the examples should just work right out of the box. Can someone provide some guidance on this?
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    796
    Could you try the latest version 2.4.0-exp.4 of the WebRTC package?
     
  3. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,838
    We tried 2.4.0-exp.4 on a MacBook and it crashed immediately on Play. We rolled back to 2.4.0-exp.3 and it didn't. Still having trouble passing a simple text message over the dataChannel using the gooigle stun server. Connects just fine but the DataChannel example in the Samples is all local and both peers in the same code. I guess I will create a separate question but just thought I would relay the crashes on Mac that came from 2.4.,0-exp.4.
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    796
    I fixed the crash bug that occurring when running the sample on Unity Editor 2021.2 on macos(Apple Silicon). Is this related your issue?
    https://github.com/Unity-Technologies/com.unity.webrtc/pull/568