Resolve WES-133 "Multiple choice"
This commit is contained in:
committed by
Jelle De Geest
parent
04d9a4bf2b
commit
4e9d801e61
@@ -136,7 +136,7 @@ public class SignPredictor : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Webcam texture
|
||||
/// </summary>
|
||||
private WebCamTexture webcamTexture;
|
||||
private WebCamTexture webcamTexture = null;
|
||||
|
||||
/// <summary>
|
||||
/// Input texture
|
||||
@@ -418,7 +418,7 @@ public class SignPredictor : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SetModel(ModelIndex index)
|
||||
{
|
||||
this.modelList.SetCurrentModel(index);
|
||||
@@ -430,7 +430,14 @@ public class SignPredictor : MonoBehaviour
|
||||
public void SwapScreen(RawImage screen)
|
||||
{
|
||||
this.screen = screen;
|
||||
this.screen.texture = webcamTexture;
|
||||
//width = webcamTexture.width;
|
||||
//height = webcamTexture.height;
|
||||
if (webcamTexture != null)
|
||||
{
|
||||
float webcamAspect = (float)webcamTexture.width / (float)webcamTexture.height;
|
||||
this.screen.rectTransform.sizeDelta = new Vector2(this.screen.rectTransform.sizeDelta.y * webcamAspect, (this.screen.rectTransform.sizeDelta.y));
|
||||
this.screen.texture = webcamTexture;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user