ET4.0

打包ios出错

我用的et 4.0, unity是2018.3 ,想出个ios工程,但是就是不行。

报错如下:

error 1:

IL2CPP error for method 'System.Void ILRuntime.CLR.Method.CLRMethod::FixReference(System.Int32,ILRuntime.Runtime.Stack.StackObject*,System.Object[],System.Collections.Generic.IList`1<System.Object>,System.Object,System.Boolean)' in assembly 'F:\PetOrchard_ET_FGUI\POClient\Temp\StagingArea\Data\Managed\Unity.ThirdParty.dll'
Additional information: Build a development build for more information. ��������Ϊ��System.Exception�����쳣��

 

error 2:

Failed running D:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --map-file-parser="D:\Program Files\Unity\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="F:\PetOrchard_ET_FGUI\POClient\Temp\StagingArea\Data\Managed" --generatedcppdir="F:\PetOrchard_ET_FGUI\POClient\Temp\il2cppOutput\il2cppOutput" 

stdout:
IL2CPP error for method 'System.Void ILRuntime.CLR.Method.CLRMethod::FixReference(System.Int32,ILRuntime.Runtime.Stack.StackObject*,System.Object[],System.Collections.Generic.IList`1<System.Object>,System.Object,System.Boolean)' in assembly 'F:\PetOrchard_ET_FGUI\POClient\Temp\StagingArea\Data\Managed\Unity.ThirdParty.dll'
Additional information: Build a development build for more information. ��������Ϊ��System.Exception�����쳣��
il2cpp.exe didn't catch exception: System.Exception: ��������Ϊ��System.Exception�����쳣��
   �� Unity.IL2CPP.MethodBodyWriter.GetPointerOrByRefType(StackInfo address)
   �� Unity.IL2CPP.MethodBodyWriter.LoadIndirectNativeInteger()
   �� Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
   �� Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
   �� Unity.IL2CPP.MethodBodyWriter.Generate()
   �� Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   �� Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
   �� Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, IMethodVerifier methodVerifier, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder)
   �� Unity.IL2CPP.SourceWriter.<>c__DisplayClass12_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
   �� Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
   �� Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
   �� Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, ReadOnlyCollection`1 assemblyDefinitions, IMethodCollector methodCollector, IInteropDataCollector interopDataCollector)
   �� Unity.IL2CPP.AssemblyConverter.Apply()
   �� Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
   �� il2cpp.Program.DoRun(String[] args)
   �� il2cpp.Program.Run(String[] args)
   �� il2cpp.Program.Main(String[] args)
stderr:

δ��������쳣:  System.Exception: ��������Ϊ��System.Exception�����쳣��
   �� Unity.IL2CPP.MethodBodyWriter.GetPointerOrByRefType(StackInfo address)
   �� Unity.IL2CPP.MethodBodyWriter.LoadIndirectNativeInteger()
   �� Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
   �� Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
   �� Unity.IL2CPP.MethodBodyWriter.Generate()
   �� Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   �� Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
   �� Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, IMethodVerifier methodVerifier, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder)
   �� Unity.IL2CPP.SourceWriter.<>c__DisplayClass12_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
   �� Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
   �� Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
   �� Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, ReadOnlyCollection`1 assemblyDefinitions, IMethodCollector methodCollector, IInteropDataCollector interopDataCollector)
   �� Unity.IL2CPP.AssemblyConverter.Apply()
   �� Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
   �� il2cpp.Program.DoRun(String[] args)
   �� il2cpp.Program.Run(String[] args)
   �� il2cpp.Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

error 3:

Exception: D:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:840)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:659)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:605)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:48)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

4 errors

 

UnityEditor.BuildPlayerWindow+BuildMethodException: 
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:96 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

不知道有没有大大遇到类似问题。

 

对应版本: 

仍未有答复

怎么添加新的网络消息?

看完HotFixMessage,整个人都不好了,这个是要手敲的吗?群里面大佬都挺忙的,只说了一句是工具生成的!但是,作为小白的我,自己琢磨起来真的好难。。。。。。求大佬指点!

/*

 public partial class C2R_Login : pb::IMessage {
    private static readonly pb::MessageParser<C2R_Login> _parser = new pb::MessageParser<C2R_Login>(() => (C2R_Login)MessagePool.Instance.Fetch(typeof(C2R_Login)));
    public static pb::MessageParser<C2R_Login> Parser { get { return _parser; } }

    private int rpcId_;
    public int RpcId {
      get { return rpcId_; }
      set {
        rpcId_ = value;
      }
    }

    private string account_ = "";
    /// <summary>
    /// 帐号
    /// </summary>
    public string Account {
      get { return account_; }
      set {
        account_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    private string password_ = "";
    /// <summary>
    /// 密码
    /// </summary>
    public string Password {
      get { return password_; }
      set {
        password_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (Account.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Account);
      }
      if (Password.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Password);
      }
      if (RpcId != 0) {
        output.WriteRawTag(208, 5);
        output.WriteInt32(RpcId);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (RpcId != 0) {
        size += 2 + pb::CodedOutputStream.ComputeInt32Size(RpcId);
      }
      if (Account.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Account);
      }
      if (Password.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Password);
      }
      return size;
    }

    public void MergeFrom(pb::CodedInputStream input) {
      account_ = "";
      password_ = "";
      rpcId_ = 0;
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            Account = input.ReadString();
            break;
          }
          case 18: {
            Password = input.ReadString();
            break;
          }
          case 720: {
            RpcId = input.ReadInt32();
            break;
          }
        }
      }
    }

  }

*/

 

对应版本: 

使用ET自带的工具生成网络消息

编辑....ET\Proto\HotfixMessage.proto==》等的文件,然后Unity-Tools-Proto2cs

mono模式,设置找不到Hotifix工程的ILRuntime宏,不知道怎么删除

unity中ILRuntime宏已经删除了,但是就是找不到Hotfix工程的ILRuntime宏在什么地方删除,请知道的人讲解一下。。。

如果Hotfix工程中的ILRuntime宏没删除,启动4.0的demo帧同步,mono模式debug,unity2017.4.11会崩溃。

对应版本: 

ET 4.0的版本只需要删除unity的ILRuntime宏定义就可以了

ET 4.0的版本只需要删除unity的ILRuntime宏定义就可以进行mono 模式debug。

如果要发包,还是要把ILRuntime宏定义添加上,才能通过服务器进行热更。