Sprint 6
This commit is contained in:
@@ -20,7 +20,6 @@ public class BootScreen : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Request authorization and check whether at least 1 webcam is available
|
||||
/// </summary>
|
||||
/// <returns>IEnumerator object</returns>
|
||||
IEnumerator Start()
|
||||
{
|
||||
UserList.AVATARS = sprites.avatars;
|
||||
@@ -31,7 +30,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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user