Resolve WES-187 "Unit tests common and course"

This commit is contained in:
Jelle De Geest
2023-05-12 11:53:17 +00:00
committed by Jerome Coudron
parent 672ff367e2
commit 48b915acba
25 changed files with 1248 additions and 101 deletions

View File

@@ -31,7 +31,21 @@ public class BootScreen : MonoBehaviour
{
if (0 < WebCamTexture.devices.Length)
{
SystemController.GetInstance().SwapScene("Common/Scenes/MainMenuScreen");
WebCamTexture webcamTexture = new WebCamTexture();
webcamTexture.deviceName = WebCamTexture.devices[0].name;
webcamTexture.Play();
yield return new WaitForSeconds(0.1f); // Wait a little for the webcam to start
if (webcamTexture.isPlaying)
{
webcamTexture.Stop();
SystemController.GetInstance().SwapScene("Common/Scenes/MainMenuScreen");
}
else
{
errorText.text = "Zorg ervoor dat je webcam niet in gebruik is door een andere applicatie!";
}
}
else
{
@@ -43,4 +57,6 @@ public class BootScreen : MonoBehaviour
errorText.text = "Zorg ervoor dat deze applicatie toegang heeft tot je webcam!";
}
}
}