Resolve WES-43 "Minigame framework"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-06 12:14:25 +00:00
parent f670c0cd0a
commit 9eebf4e4f2
34 changed files with 3092 additions and 2354 deletions

View File

@@ -25,8 +25,10 @@ public class Webcam : MonoBehaviour
tex.Play();
}
public void SwapCam(){
if(WebCamTexture.devices.Length > 0){
public void SwapCam()
{
if (WebCamTexture.devices.Length > 0)
{
// Stop the old camera
display.texture = null;
tex.Stop();
@@ -44,8 +46,10 @@ public class Webcam : MonoBehaviour
tex.Play();
}
}
// Scene changing is implemented here to avoid problems with webcam
public void loadScene(string sceneName) {
public void LoadScene(string sceneName)
{
display.texture = null;
tex.Stop();
tex = null;