Beispiel #1
0
    void Update()
    {
        if (testSettings.runTest)
        {
            testSettings.runTest = false;

            using (Stream stream = new MemoryStream(testSettings.testModel.bytes))
            {
                StartQuery(ObjToJsonConverter.Convert(stream));
            }
        }
    }
    private void OnCollisionEnter(Collision collision)
    {
        var queryResultObject = collision.gameObject.GetComponent <QueryResultObject>();

        if (queryResultObject != null)
        {
            Debug.Log("Starting new query!");

            using (Stream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(queryResultObject.QueryResult.objModel)))
            {
                cineastApi.StartQuery(ObjToJsonConverter.Convert(stream));
            }

            Destroy(collision.gameObject);
        }
    }