Ejemplo n.º 1
0
        public bool Init()
        {
            TXRDebugger.Log("NativeController start init:");
            int count = GetControllerCount();

            TXRDebugger.Log("__controller count:" + count);
            for (int i = 0; i < count; i++)
            {
                m_StateHandles[i] = 1;
            }
            return(true);
        }
 new void Awake()
 {
     base.Awake();
     if (isDirty)
     {
         return;
     }
     #if !UNITY_EDITOR
     TXRDebugger.EnableLog = Debug.isDebugBuild;
     #endif
     TXRDebugger.Log("[TXRSessionBehaviour Awake: CreateSession]");
     TXRSessionManager.Instance.CreateSession(this);
 }
Ejemplo n.º 3
0
        internal void SetCameraPermission()
        {
            var manifest = SelectSingleNode("/manifest");

            if (!manifest.InnerXml.Contains("android.permission.CAMERA"))
            {
                XmlElement child = CreateElement("uses-permission");
                manifest.AppendChild(child);
                XmlAttribute newAttribute = CreateAndroidAttribute("name", "android.permission.CAMERA");
                child.Attributes.Append(newAttribute);
            }
            else
            {
                TXRDebugger.Log("Already has the camera permission.");
            }
        }
Ejemplo n.º 4
0
        internal void SetBlueToothPermission()
        {
            var manifest = SelectSingleNode("/manifest");

            if (!manifest.InnerXml.Contains("android.permission.BLUETOOTH"))
            {
                XmlElement child = CreateElement("uses-permission");
                manifest.AppendChild(child);
                XmlAttribute newAttribute = CreateAndroidAttribute("name", "android.permission.BLUETOOTH");
                child.Attributes.Append(newAttribute);
                newAttribute = CreateAndroidAttribute("name", "android.permission.BLUETOOTH_ADMIN");
                child.Attributes.Append(newAttribute);
            }
            else
            {
                TXRDebugger.Log("Already has the bluetooth permission.");
            }
        }
Ejemplo n.º 5
0
        private void InitNativeController()
        {
            m_NativeController = new NativeController();
            if (m_NativeController.Init())
            {
                Inited = true;
                TXRDebugger.Log("TXRControllerProvider Init Succeed");
            }
            else
            {
                m_NativeController = null;
                TXRDebugger.LogError("TXRControllerProvider Init Failed !!");
            }

#if !UNITY_EDITOR
            Debug.Log("[TXRInput] version:" + GetVersion(0));
#endif
            m_NeedInit = false;
        }