|
|
@ -7,6 +7,7 @@ using OpenCVForUnity.UnityUtils.Helper;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.Networking;
|
|
|
|
using UnityEngine.Networking;
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Assets.Scripts
|
|
|
|
namespace Assets.Scripts
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -39,6 +40,7 @@ namespace Assets.Scripts
|
|
|
|
/// The webcam texture to mat helper.
|
|
|
|
/// The webcam texture to mat helper.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
private WebCamTextureToMatHelper webCamTextureToMatHelper;
|
|
|
|
private WebCamTextureToMatHelper webCamTextureToMatHelper;
|
|
|
|
|
|
|
|
|
|
|
|
private bool _isChecking;
|
|
|
|
private bool _isChecking;
|
|
|
|
private static object _lockObject = new object();
|
|
|
|
private static object _lockObject = new object();
|
|
|
|
|
|
|
|
|
|
|
@ -47,6 +49,8 @@ namespace Assets.Scripts
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
protected static readonly string LBP_CASCADE_FILENAME = "lbpcascade_frontalface.xml";
|
|
|
|
protected static readonly string LBP_CASCADE_FILENAME = "lbpcascade_frontalface.xml";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Text text;
|
|
|
|
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
|
// Use this for initialization
|
|
|
|
private void Start()
|
|
|
|
private void Start()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -237,6 +241,11 @@ namespace Assets.Scripts
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Debug.Log(request.downloadHandler.text);
|
|
|
|
Debug.Log(request.downloadHandler.text);
|
|
|
|
|
|
|
|
var result = JsonUtility.FromJson<LoginResult>(request.downloadHandler.text);
|
|
|
|
|
|
|
|
if (result.Success)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
text.text = result.NickName;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|