Browse Source

客户端编译

lixu 2 years ago
parent
commit
6060e9b310

+ 2 - 0
Unity/.gitignore

@@ -2,3 +2,5 @@
 /Unity.ThirdParty.csproj
 /Unity.sln
 /Unity.sln.DotSettings.user
+HybridCLRBuildCache
+HybridCLRBuildCache.meta

+ 3 - 3
Unity/Assets/Mono/MonoBehaviour/GameEntry/Init_LoadCode.cs

@@ -50,9 +50,9 @@ namespace ET
                 fixed (byte* ptr = dllBytes)
                 {
 #if !UNITY_EDITOR
-                // 加载assembly对应的dll,会自动为它hook。一旦aot泛型函数的native函数不存在,用解释器版本代码
-                int err = RuntimeApi.LoadMetadataForAOTAssembly((IntPtr)ptr, dllBytes.Length);
-                Debug.Log("LoadMetadataForAOTAssembly. ret:" + err);
+                 // 加载assembly对应的dll,会自动为它hook。一旦aot泛型函数的native函数不存在,用解释器版本代码
+                    LoadImageErrorCode err = RuntimeApi.LoadMetadataForAOTAssembly(dllBytes, HomologousImageMode.SuperSet);
+                    Debug.Log("LoadMetadataForAOTAssembly. ret:" + err);
 #endif
                 }
             }

+ 1 - 1
Unity/Packages/packages-lock.json

@@ -5,7 +5,7 @@
       "depth": 0,
       "source": "git",
       "dependencies": {},
-      "hash": "0edd8221019f3b1a097224b44b883def3ec7fb90"
+      "hash": "00cedc166f7ca58cfb9a9ad645bd4a0ffc9b8fc9"
     },
     "com.nkg.fgui": {
       "version": "file:FairyGUI",

+ 7 - 3
Unity/ProjectSettings/HybridCLRSettings.asset

@@ -16,7 +16,11 @@ MonoBehaviour:
   useGlobalIl2cpp: 0
   hybridclrRepoURL: https://gitee.com/focus-creative-games/hybridclr
   il2cppPlusRepoURL: https://gitee.com/focus-creative-games/il2cpp_plus
-  hotUpdateAssemblyDefinitions: []
+  hotUpdateAssemblyDefinitions:
+  - {fileID: 5897886265953266890, guid: dd49a6aee98625147b438c1f3cc12621, type: 3}
+  - {fileID: 5897886265953266890, guid: 98144a3fda0534746a737325b7935c1d, type: 3}
+  - {fileID: 5897886265953266890, guid: 61be00357cd206e42a4338fff3f5d273, type: 3}
+  - {fileID: 5897886265953266890, guid: 1c9695a401c816a4f8fa3550926b6cfc, type: 3}
   hotUpdateAssemblies: []
   preserveHotUpdateAssemblies: []
   hotUpdateDllCompileOutputRootDir: HybridCLRData/HotUpdateDlls
@@ -24,7 +28,7 @@ MonoBehaviour:
   strippedAOTDllOutputRootDir: HybridCLRData/AssembliesPostIl2CppStrip
   patchAOTAssemblies: []
   collectAssetReferenceTypes: 0
-  outputLinkFile: HybridCLRData/Generated/link.xml
-  outputAOTGenericReferenceFile: HybridCLRData/Generated/AOTGenericReferences.cs
+  outputLinkFile: LinkGenerator/link.xml
+  outputAOTGenericReferenceFile: Main/AOTGenericReferences.cs
   maxGenericReferenceIteration: 10
   maxMethodBridgeGenericIteration: 10

+ 2 - 2
Unity/ProjectSettings/ProjectSettings.asset

@@ -187,7 +187,7 @@ PlayerSettings:
   CreateWallpaper: 0
   APKExpansionFiles: 0
   keepLoadedShadersAlive: 0
-  StripUnusedMeshComponents: 0
+  StripUnusedMeshComponents: 1
   VertexChannelCompressionMask: 214
   iPhoneSdkVersion: 988
   iOSTargetOSVersionString: 11.0
@@ -764,7 +764,7 @@ PlayerSettings:
   additionalIl2CppArgs: 
   scriptingRuntimeVersion: 1
   gcIncremental: 0
-  assemblyVersionValidation: 0
+  assemblyVersionValidation: 1
   gcWBarrierValidation: 0
   apiCompatibilityLevelPerPlatform:
     Android: 3

+ 2 - 0
Unity/ProjectSettings/QualitySettings.asset

@@ -226,3 +226,5 @@ QualitySettings:
   m_PerPlatformDefaultQuality:
     Android: 3
     Standalone: 3
+    WebGL: 0
+    iPhone: 0