// Use this for initialization
    async void Start()
    {
        OutputTextMesh      = OutputText.GetComponent <TextMesh>();
        OutputTextMesh.text = string.Empty;
        g = new GameObject();
        CameraScanEngine = new ScanEngine(PredictionFrequency);
        await CameraScanEngine.Inititalize(this, ModelName, MaxDetections, ProbabilityThreshold, IouThreshold);

#if UNITY_WSA && !UNITY_EDITOR // RUNNING ON WINDOWS
        CameraScanEngine.StartPullCameraFrames();
#else                          // RUNNING IN UNITY
        ModifyOutputText("Sorry ;-( The app is not supported in the Unity player.");
#endif
    }
Exemple #2
0
    // Use this for initialization
    async void Start()
    {
        OutputTextMesh      = OutputText.GetComponent <TextMesh>();
        OutputTextMesh.text = string.Empty;

#if UNITY_WSA && !UNITY_EDITOR // RUNNING ON WINDOWS
        CameraScanEngine = new ScanEngine();
        await CameraScanEngine.Inititalize(this);

        CameraScanEngine.StartPullCameraFrames();
#else                          // RUNNING IN UNITY
        ModifyOutputText("Sorry ;-( The app is not supported in the Unity player.");
#endif
    }
    async void Start()
    {
        OutputTextMesh      = OutputText.GetComponent <TextMesh>();
        OutputTextMesh.text = string.Empty;
        StoreNetworkResult("0", "TEST", "100%", 0, 0, -1, 1.5f, 3);
        StoreNetworkResult("0", "TEST", "100%", 0, 0, -1, 1.5f, 3);
        // canvas = GameObject.FindGameObjectWithTag("MainCanva").GetComponent<Canvas>();
        Menu.transform.Find("ButtonCollection").Find("ButtonOne").gameObject.GetComponent <Interactable>().OnClick.AddListener(() => { StoreNetworkResult("0", "TEST", "100%", Menu.transform.position.x, Menu.transform.position.y, -Menu.transform.position.z); });
#if UNITY_WSA && !UNITY_EDITOR                    // **RUNNING ON WINDOWS**
        Debug.Log("Starting scan engine");
        var CameraScanEngine = new ScanEngine();  // <-- 1
        await CameraScanEngine.Inititalize(this); // <-- 2

        CameraScanEngine.StartPullCameraFrames(); // <-- 3
        Menu.transform.Find("ButtonCollection").Find("ButtonTwo").gameObject.GetComponent <Interactable>().OnClick.AddListener(() => { CameraScanEngine.ResetReferenceFrame(); });
        Debug.Log("Scan engine started");
#else                          // **RUNNING IN UNITY**
        AddToMessageFlow("Sorry ;-( The app is not supported in the Unity player.");
#endif
    }