This commit is contained in:
Jelle De Geest
2023-05-24 21:08:16 +02:00
parent 2a172bdb28
commit 163eb40c0f
1052 changed files with 20520 additions and 17253 deletions

View File

@@ -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
{