Resolve WES-187 "Unit tests common and course"
This commit is contained in:
committed by
Jerome Coudron
parent
672ff367e2
commit
48b915acba
@@ -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!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user