unity裏面可以運行。打包exe無法運行解決方案

output_log.txt打印日誌
FormatException: Invalid character found.
  at (wrapper managed-to-native) System.Convert:InternalFromBase64String (string,bool)

  at System.Convert.FromBase64String (System.String s) [0x00000] in <filename unknown>:0 

  at com.QH.QPGame.Utility.DESEncryption.Decrypt (System.String decryptString, System.String decryptKey) [0x00000] in <filename unknown>:0 

  at com.QH.QPGame.Lobby.ResourceManager.LoadGameOptions () [0x00000] in <filename unknown>:0 
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
com.QH.QPGame.GameUtils.Logger:LogException(Exception)
com.QH.QPGame.Lobby.ResourceManager:LoadGameOptions()
com.QH.QPGame.Lobby.<LoadConfig>c__Iterator6C:MoveNext()
 
(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at com.QH.QPGame.Lobby.GameRuntimeData.Initialize () [0x00000] in <filename unknown>:0 

  at com.QH.QPGame.Lobby.ResourceManager+<LoadConfig>c__Iterator6C.MoveNext () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

解決方法一:把加密解密部分註釋掉

解決方法二:把所有Awake放到Start裏面

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章