-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run on Unity #40
Comments
Hello, Here's the sample that runs in Unity: Are you hitting any specific issues? |
It doesn't fill the Unity Project folders when i compile the sln. All the objects on unity canvas are not connected to any c script |
Here's the script for Unity objects: https://github.com/Microsoft/WebRTC-universal-samples/blob/master/Samples/PeerCC-Sample/ClientUnity/Unity/PeerCCUnity/Assets/Scripts/ControlScript.cs If the files are being populated it sounds like something is wrong with the VS build process kicking off the Unity compiler. Could you confirm which version of the Unity tools you have installed and the install directory? I noticed an error in the docs yesterday btw - it should be 2017.4.1. |
Hi @robbartkk,
This problem you can solve by hooking up the prefabs and scripts yourself. For example the ControlScript going on the Control object in the scene. The ControlScript then has public variables in the inspector where you can drag basically the rest of the scene objects and a couple of the prefabs in the assets (the names of the objects will be quite self-explanatory). |
Hello @robbartkk, I was having the same problem. What I did to fix the unity project was:
Only then I was able to build the project, hope that helps! |
Hi guys, |
When you build PeerConnectionClient.WebRtc.UnityD3D.sln is it adding the dll's to the Plugins/WSA and Plugins/WSA/x86 folders in the assets of the Unity project? |
@Fritzwald |
So I can only think of two problems right now: |
@Fritzwald It is as you said, you might need to copy some dll files manually to the same folder that the errors points you to. |
From the readme file here, there is this instruction
But when right click on the solution and click build it says this. Is this to be expected?
So after that I went to step 2
and opened the Unity project in the editor. And got a message and error. Question: What should I do in this scenario? Your help is greatly appreciated. PS: When I first tried to build the project EDIT: Added more details |
Ok so the first problem I can help you with. In Visual Studio when you have WebRTCUnityD3D.sln open you can click the drop down Build, and then Configuration Manager. Here you can select for which configurations which projects you want to build. You will want to have all of them built in whatever configuration you are selecting, I personally go with Release and x86. For the second part, the message I'm not sure what causes it, however the error is not important, at least not usually. If it bothers you can manually add the specified nuget package. |
@Fritzwald Thanks for the answer. So I went to Configuration Manager and sow the whole Build column is unchecked. Now when I build the solution, it's building the projects as well. So I think this is working. Build Output:
|
Is there any way to be check that this step is done properly? i.e. the necessary binaries are generated?
In the Build Settings there is no scene selected. And with this I cannot select any build folder and it says Save as type as .exe. Should I add the PeerCCScene to the build settings?
For this step in this location "WebRTC-universal-samples\Samples\PeerCC-Sample\ClientUnity" the specified code block in readme is already there. Is this an error?
How do I do that? Normally I run a unity project from the editor. I am a bit of loss here. Please bear with me here. What I did was I opened the project in Unity, I opened the solution in Visual Studio as well. Then from Visual Studio, I changed the Run option from "Attach to Unity" to "Attach to Unity and Play" and ran the program(by hitting the "Attach to Unity and Play" button). Then I noticed it running on Unity Editor with some errors(more about that later). Is this the correct procedure?
I realize these may be very noobish question but your help is greatly appreciated. |
@YousufAzadSami Hi again. Ok so lets go through this:
|
First of thank you so much for the detailed answer. This is not only helping me but anyone who will try this project in the future. Here are my findings -
PS: If the
So, to make a call we will need at least three devices under the same network right? One for the server, the other two as the callers, right? EDIT: Added picture |
Ok great that you got far and also solved some of those problems. Yes set the target platform for x86, I forgot it is set to ARM at first. For UWP x86 is generally a safe bet, on PC and Hololens that will always be fine. |
Thanks for getting back so fast.
PS: I think the key term here is AssemblyConverter.exe and project.lock.json
|
Hey @YousufAzadSami, I can see that your Unity Editor is in the Unity Hub folder. Try putting it in the default install location as mentioned in the step by step of the README file, or edit the path value.
|
@mingalll Edit: Formatting |
Thing is I am using I am at a loss here. Anybody have any clue?
Diagnostic Output (for repo named
Diagnostic Output: (for repo named
UPDATE: So I have created a third repo by the name So I guess the problem is the the repo name |
I followed instructions from @YousufAzadSami But when I run the PeerCCUnity.sln on hololens, I get these problems Can anyone help me with these problems? Thanks a lot! The bug report is PeerCCUnity.exe' (CoreCLR: CoreCLR_UWP_Domain): 已載入 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\PeerCCUnityVS.Debug_x86.astri\System.Runtime.WindowsRuntime.UI.Xaml.dll'。已略過載入符號。模組已最佳化,並已啟用 [Just My Code] 偵錯工具選項。 Loading WebRtcScheme.dll Module information: OS 'Windows 10 (10.0.17134)' PlayerConnection initialized from C:/Data/Users/DefaultAccount/AppData/Local/DevelopmentFiles/PeerCCUnityVS.Debug_x86.astri/Data (debug = 0) PlayerConnection initialized network socket : 0.0.0.0 55493 Multi-casting "[IP] 192.168.0.112 [Port] 55493 [Flags] 2 [Guid] 2412587978 [EditorId] 0 [Version] 1048832 [Id] MetroPlayerX86(HoloLens-NCHR5) [Debug] 0" to [225.0.0.222:54997]... Started listening to [0.0.0.0:55493] GfxDevice: creating device client; threaded=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: HoloLens Graphics (ID=0x22b0) Vendor: Intel VRAM: 604 MB PeerCCUnity.exe' (CoreCLR: CoreCLR_UWP_Domain): 已載入 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\PeerCCUnityVS.Debug_x86.astri\UnityEngineProxy.dll'。找不到或無法開啟 PDB 檔案。 If your machine has multiple graphics adapters, Unity may have created a WindowContext on the wrong adapter. If you experience a black screen when playing, please restart the Editor. (Filename: C:\buildslave\unity\build\Runtime/VR/VRDevice.cpp Line: 225) Setting up 1 worker threads for Enlighten. Thread -> id: 890 -> priority: 1 UnloadTime: 25.607724 ms 0xbf8 執行緒以返回碼 0 (0x0) 結束。 (Filename: C:\buildslave\unity\build\Runtime/VR/HoloLens/Gestures/GestureRecognizer.cpp Line: 829) Failed to get pointer data. Error code: '0x80004005'. (Filename: C:\buildslave\unity\build\Runtime/VR/HoloLens/Gestures/GestureRecognizer.cpp Line: 829) 0x360 執行緒以返回碼 0 (0x0) 結束。 |
Hey,
Any help is greatly appreciated. @happyao How did you get the crash report? |
@YousufAzadSami This is the log from visual studio. |
Is it normal that this runs in HoloLens but does not run in Unity? In unity I am getting ...dll not found.
|
@tomitrescak yes that is normal. Those dlls are specifically for UWP, they are not compatible with the editor. Yes I know, it makes testing a bit more annoying. |
@Fritzwald is it possible somehow to compile them for Unity in a different setting? Truth be told, I could not make it run in simulator, it always crashes. I'll take Hololens tomorrow so I'll do more testing directly in the headset, but having RTC in Unity would be awesome. |
Sorry for the very late reply, I was out and about since December. To my knowledge it is unfortunately not possible to have it run in the Unity Editor. Something I sometimes do is build the project for UWP, but not for hololens but rather for PC, also disabling the Mixed Reality SDK. In Visual Studio you can then run it on your computer, making testing a bit easier. Some things in your project might not work properly just because they were specifically meant for Hololens, but for the most part they behave the same. |
so I keep having the same issue that @robbartkk was having at the beginning of this thread. namely I've tried building the .sln and replacing the MediaEngineUWP.dll and MediaEngineUWP.pdb as @mingalll suggested but made no difference. any other suggestions? I'm a Unity-first person so I don't quite have the instincts for these plugins |
(2) I can't see any video stream(only black screen). |
Is there any way to have the working Unity project?
Thank you in advance
The text was updated successfully, but these errors were encountered: