示例#1
0
    IEnumerator NewValueListener()
    {
        VideoController videoCont = FindObjectOfType <VideoController>();

        while (newValue != "ready")
        {
            if (newValue != "")
            {
                print(newValue);
                newValue = "";
            }
            yield return(null);
        }
        print("Ready");
        newValue = "";
        //videoCont.StartRecording();
        while (true)
        {
            if (newValue != "")
            {
                if (newValue == "null")
                {
                    trackerCont.SetProjectionEnabled(false);
                }
                else
                {
                    trackerCont.PlaceProjection(newValue);
                }
                print(newValue);
                newValue = "";
            }
            yield return(null);
        }
    }
示例#2
0
 private void onIncomingData(string data)
 {
     if (data != "null")
     {
         trackerCont.PlaceProjection(data);
     }
     else
     {
         trackerCont.SetProjectionEnabled(false);
     }
 }