IcePower / X-ET7

X-ET 是一个融合了 ET, FairyGUI, luban, YooAsset 的缝合怪。
MIT License
277 stars 67 forks source link

大佬,就是我想测试一下这个项目的打包,没打包成功. #27

Closed 510463496 closed 4 months ago

510463496 commented 1 year ago

测试打包运行不起来,我的改动跟操作: 我在YooAsset里build,我安装了hybridCLR,并且 生成 全部,没有报错,也编译了项目没有代码报错,在unity上能运行项目. image

然后还在MonoResComponent.GetHostServerURL()改成了我的服务器的ip跟端口,我在我的服务器上iis弄了个web服务器ftp. image

然后就是本地能正常运行,然后打包之后打开打开exe运行不起来,好像是读取不到资源一样. image image

510463496 commented 1 year ago

打开exe只有背景颜色,应该是读取不到资源,哥是我漏了什么操作了吗 image

IcePower commented 1 year ago

这个是HybridCLR的错误。解决方法:

  1. 第一次打包完之后,点击 HybridCLR - CopyAOTDlls。
  2. 然后在 YooAsset 里构建资源。
  3. 然后第二次打包,应该就没这个错了。
510463496 commented 1 year ago

是的,我按照您发的步骤打包之后,前面那个报错没了,不过有了个新的飘红,看起来是配置没有打进来.我查查看 image System.NullReferenceException: Object reference not set to an instance of an object. at ET.Client.GetAllConfigBytes.Handle (ET.ConfigComponent+GetAllConfigBytes args) [0x00000] in <00000000000000000000000000000000>:0 at ET.Entry.StartAsync () [0x00000] in <00000000000000000000000000000000>:0 at ET.Entry.StartAsync () [0x00000] in <00000000000000000000000000000000>:0 at ET.Entry.Start () [0x00000] in <00000000000000000000000000000000>:0 at ET.EventSystem.Invoke[A,T] (System.Int32 type, A args) [0x00000] in <00000000000000000000000000000000>:0 at ET.ConfigComponent.LoadAsync () [0x00000] in <00000000000000000000000000000000>:0 at ET.ConfigComponent.LoadAsync () [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0 at ET.Init+d__0.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown ---

at ET.Entry.StartAsync () [0x00000] in <00000000000000000000000000000000>:0 at ET.Entry.StartAsync () [0x00000] in <00000000000000000000000000000000>:0 at ET.Entry.Start () [0x00000] in <00000000000000000000000000000000>:0 at ET.ETTask.GetResult () [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0 at ET.Init+d__0.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown ---

at ET.Entry.Start () [0x00000] in <00000000000000000000000000000000>:0 at ET.ETTask.GetResult () [0x00000] in <00000000000000000000000000000000>:0 at ET.ETTask.InnerCoroutine () [0x00000] in <00000000000000000000000000000000>:0 at ET.ETTask.Coroutine () [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0 at ET.Init+d__0.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0