[UWP] Timers does not exist in the namespace System

edited November 2017 in Photon Voice
Hi there,

Im getting 2 errors when try to build for UWP.


Assets\Plugins\PhotonVoiceApi\Core\AudioUtil.cs(560,61): error CS0234: The type or namespace name 'Timers' does not exist in the namespace 'System' (are you missing an assembly reference?)

Assets\Plugins\PhotonVoiceApi\Core\AudioUtil.cs(543,20): error CS0234: The type or namespace name 'Timers' does not exist in the namespace 'System' (are you missing an assembly reference?)


I created a new proyect in Unity 2017.2.0f3
Imported Photon PUN+ 1.87
Imported Photon Voice 1.13
Changed to UWP
Changed the Scripting Backend to .NET
Activate Capabilities for Microphone, InternetClient, InternetClientServer, PrivateNetworkClientServer

In unity editor works great but when I try to build the solution, I get those errors.

Thanks!



Comments

  • JohnTubeJohnTube mod
    edited November 2017
    Hi @MRCalderon3D,

    Thank you for choosing Photon and I apologize for the inconvenience.

    While I'm working on making a successful UWP build.

    About the two errors, here is an updated AudioUtil.cs file that you can overwrite in your project.
    We used System.Timers.Timer in AudioUtil which is not available for WSA/UWP builds. So I replaced it with Windows.System.Threading.ThreadPoolTimer for NETFX_CORE.

    I'm sorry to say that you may also stumble upon other issues.
    Here is what you may need to do (it may not be all):

    - You can remove "Assets\Plugins\PhotonVoiceApi\Platforms\Unity\AndroidAudioInAEC.cs".
    - "Assets\Plugins\WSA\x86\opus_egpv" should have platform "WSAPlayer" only and CPU: "X86".
    - "Assets\Plugins\WSA\x64\opus_egpv" should have platform "WSAPlayer" only and CPU: "X86_64".
    - Set target from Unity Inspector of "Assets\Plugins\AudioIn.bundle" and "Assets\Plugins\libspeexdsp.bundle" and "Assets\Plugins\opus_egpb.bundle" to "Standalone" and "Editor" only and OS: "OSX".
    - All files under "Assets\Plugins\x86" should have platforms "Standalone" and "Editor" only and CPU: "X86".
    - All files under "Assets\Plugins\x86_64" should have platforms "Standalone" and "Editor" only and CPU: "X86_64".
  • Thank you very much, I made a workaround using System.Threading.Timer but didn't work on Master build (I dind't try another build option).

    Using your fix works in Debug and Release builds for UWP, It donesn't work on Master but it is enought for me to continue developing a demo for Mixed Reality Headsets untill you make a successful UWP build.

    Thanks again for the help @JohnTube
  • Hi @MRCalderon3D,

    Could you tell us why is the Master build failing?
    What errors do you see? could you share the output logs?
Sign In or Register to comment.