Forráskód Böngészése

修改获取bytes方式2

“hujiajun” 4 hónapja
szülő
commit
bded1513c7
1 módosított fájl, 1 hozzáadás és 6 törlés
  1. 1 6
      package/Runtime/MQTT/1.0.0/GHZMQTT/QTTManager.cs

+ 1 - 6
package/Runtime/MQTT/1.0.0/GHZMQTT/QTTManager.cs

@@ -102,12 +102,7 @@ public class QTTManager
 #if (!UNITY_EDITOR && UNITY_WSA_10_0 && !ENABLE_IL2CPP)
                 client = new MqttClient(brokerAddress,brokerPort,isEncrypted, isEncrypted ? MqttSslProtocols.SSLv3 : MqttSslProtocols.None);
 #else
-            string folderPath;
-            if (File.Exists(Application.streamingAssetsPath + "/emqxsl-ca.crt"))
-                folderPath = Application.streamingAssetsPath + "/emqxsl-ca.crt";
-            else
-                folderPath = Path.Combine("Assets", "Samples", "MQTT", "1.0.0", "GHZMQTT", "StreamingAssets", "emqxsl-ca.crt");
-            X509Certificate cert = new X509Certificate();
+            X509Certificate cert = new X509Certificate(bytes);
             Debug.Log("IP地址或URL==>" + brokerAddress);
         isEncrypted = false;
             client = new MqttClient(brokerAddress, brokerPort, isEncrypted, cert, cert, isEncrypted ? MqttSslProtocols.SSLv3 : MqttSslProtocols.None);