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 :0 

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

  at com.QH.QPGame.Lobby.ResourceManager.LoadGameOptions () [0x00000] in :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.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 :0 

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

解决方法一:把加密解密部分注释掉

解决方法二:把所有Awake放到Start里面

 

你可能感兴趣的:(unity里面可以运行。打包exe无法运行解决方案)