public UnityTuioEventProcessor(UnityTuioListener theUnityTuioListener)
		{
			m_listener = theUnityTuioListener;
		}
        private IEnumerator InitInstance()
        {
            m_initialized = true;

            Application.runInBackground = true;

            if (m_persistent)
            {
                GameObject.DontDestroyOnLoad(this.gameObject);
            }

            // start: load config file
            yield return(StartCoroutine(LoadConfigXML()));

            //			Debug.Log ("UnityTuioManager config loaded, continue InitInstance");
            if (m_unityTuioXMLConfig != null)
            {
                string configTrackingEnabled = null;
                string configUDPPort         = null;
                string targetResolutionX     = null;
                string targetResolutionY     = null;
                string stageX = null;
                string stageY = null;
                for (int i = 0; i < m_unityTuioXMLConfig.ConfigNodes.Length; i++)
                {
                    switch (m_unityTuioXMLConfig.ConfigNodes[i].Name)
                    {
                    case "enabled":
                        configTrackingEnabled = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    case "udp-port":
                        configUDPPort = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    case "targetResolutionX":
                        targetResolutionX = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    case "targetResolutionY":
                        targetResolutionY = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    case "stageX":
                        stageX = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    case "stageY":
                        stageY = m_unityTuioXMLConfig.ConfigNodes[i].Value;
                        break;

                    default:
                        break;
                    }
                }

                bool configTrackingEnabledBool;
                if (configTrackingEnabled != null && Boolean.TryParse(configTrackingEnabled, out configTrackingEnabledBool))
                {
                    m_tuioSettings.TrackingEnabled = configTrackingEnabledBool;
                    //Debug.Log(string.Format("XML config: TUIO tracking enabled: {0}", m_tuioSettings.TrackingEnabled));
                }
                else
                {
                    //Debug.Log(string.Format("XML config: invalid TUIO enabled config. Using settings from prefab instead: TUIO tracking enabled: {0}", m_tuioSettings.TrackingEnabled));
                }

                int configUDPPortInt;
                if (configUDPPort != null && int.TryParse(configUDPPort, out configUDPPortInt))
                {
                    m_tuioSettings.UDP_Port = configUDPPortInt;
                    //Debug.Log(string.Format("XML config: TUIO using UDP Port: {0}", configUDPPort));
                }
                else
                {
                    //Debug.LogWarning("XML config: invalid TUIO Port config");
                }

                int configResolutionIntX;
                int configResolutionIntY;
                if (targetResolutionX != null && int.TryParse(targetResolutionX, out configResolutionIntX) &&
                    targetResolutionY != null && int.TryParse(targetResolutionY, out configResolutionIntY))
                {
                    m_tuioSettings.TargetFloorWidth  = configResolutionIntX;
                    m_tuioSettings.TargetFloorHeight = configResolutionIntY;
                    //Debug.Log(string.Format("XML config: new target resolution: {0}x{1}", m_tuioSettings.TargetFloorWidth, m_tuioSettings.TargetFloorHeight));
                }
                else
                {
                    //Debug.LogWarning(string.Format("XML config: invalid resolution config, using resolution specified in TuioManager prefab instead: {0}x{1}", m_tuioSettings.TargetFloorWidth, m_tuioSettings.TargetFloorHeight));
                }

                float configStageFloatX;
                float configStageFloatY;
                if (stageX != null && float.TryParse(stageX, out configStageFloatX) &&
                    stageY != null && float.TryParse(stageY, out configStageFloatY))
                {
                    m_tuioSettings.StageX = configStageFloatX;
                    m_tuioSettings.StageY = configStageFloatY;
                    //Debug.Log(string.Format("XML config: new stage size: {0}x{1}", m_tuioSettings.StageX, m_tuioSettings.StageY));
                }
                else
                {
                    //Debug.LogWarning(string.Format("XML config: invalid stage size config, using stage size specified in TuioManager prefab instead: {0}x{1}", m_tuioSettings.StageX, m_tuioSettings.StageY));
                }
            }
            else
            {
                Debug.Log("no config xml file found in resources: using default TUIO settings");
            }
            // end: load config file

            if (!m_tuioSettings.TrackingEnabled)
            {
                Debug.Log("Disable and Destroy UnityTuioManager");
                this.enabled = false;
                Destroy(this);
                yield break;
            }
            m_listener       = new UnityTuioListener(m_tuioSettings.UDP_Port);
            m_eventProcessor = new UnityTuioEventProcessor(m_listener);


            if (OnTrackingInitialized != null)
            {
                OnTrackingInitialized(this, new EventArgs());
            }

            TrackingAdapter.InjectTrackingManager(m_instance);

            UpdateDebugGUI();
        }