Open stef-t opened 3 years ago
@stef-t Thanks for your report! I have never known the behavior of the Device Simulator with this package. We will check it and fix the verification of the graphics API and write some note into the package docs.
memo: WRS-138
Hey,
I've been using this package and the DeviceSimulator package in the same Unity project. I noticed that the OpenGL verification that is triggered during
WebRTC.Initialize
fails when both the DeviceSimulator and this WebRTC package are part of the same Unity project.To Reproduce Steps to reproduce the behavior:
Expected behavior The sample runs as expected without error.
Current behaviour The sample aborts with error:
Environment:
Additional context
What happens is that the DeviceSimulator simulates SystemInfo! Now when, e.g., the Google Pixel 2 is selected,
SystemInfo.graphicsDeviceType
(seeWebRTC.Initialize
) will return the simulated graphicsDeviceType of the selected simulated device instead of the graphicsDeviceType of, e.g. in my case, my MacBook.Note that is the expected behaviour of the DeviceSimulator. It's just that the OpenGL verification fails to take into account the DeviceSimulator in the Editor.
As a band aid fix one can turn off the simulation of SystemInfo (ProjectSettings > DeviceSimulator > "Simulate SystemInfoClass"). For projects that actively use the DeviceSimulator this might break some stuff, if they rely on the simulation of SystemInfo in the Editor.