Prechádzať zdrojové kódy

集成HybridCLR,使用步骤:
1.点击HybridCLR->Installer,等待安装完成
2.ET->BuildTool->BuildModelAndHotfix,编译好要热更的dll
3.点击HybridCLR->Generate->all
4.点击HybridCLR->CopyAotDlls,这一步会把需要补充元数据的dll复制到Assets/Bundles/AotDlls目录,并且设置ab包标签
然后打包即可

tanghai 3 rokov pred
rodič
commit
07c60b0a4e
25 zmenil súbory, kde vykonal 727 pridanie a 46 odobranie
  1. 4 0
      .gitignore
  2. 82 0
      Unity/Assembly-CSharp-firstpass.csproj
  3. 7 7
      Unity/Assets/Plugins/MacOS/arm64/libkcp.dylib.meta
  4. 1 1
      Unity/Assets/Plugins/MacOS/x86_64/libkcp.dylib.meta
  5. 1 2
      Unity/Assets/Scenes/Init.unity
  6. 5 3
      Unity/Assets/Scripts/Editor/BuildEditor/BuildAssembliesHelper.cs
  7. 8 0
      Unity/Assets/Scripts/Editor/Plugins/HybridCLR.meta
  8. 47 0
      Unity/Assets/Scripts/Editor/Plugins/HybridCLR/HybridCLREditor.cs
  9. 11 0
      Unity/Assets/Scripts/Editor/Plugins/HybridCLR/HybridCLREditor.cs.meta
  10. 3 1
      Unity/Assets/Scripts/Editor/Unity.Editor.asmdef
  11. 2 0
      Unity/Assets/Scripts/Loader/CodeLoader.cs
  12. 8 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR.meta
  13. 8 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated.meta
  14. 173 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs
  15. 11 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs.meta
  16. 249 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/link.xml
  17. 7 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/link.xml.meta
  18. 19 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/HybridCLRHelper.cs
  19. 11 0
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/HybridCLRHelper.cs.meta
  20. 2 1
      Unity/Assets/Scripts/Loader/Unity.Loader.asmdef
  21. 4 3
      Unity/Packages/manifest.json
  22. 17 10
      Unity/Packages/packages-lock.json
  23. 33 0
      Unity/ProjectSettings/HybridCLRSettings.asset
  24. 12 16
      Unity/ProjectSettings/ProjectSettings.asset
  25. 2 2
      Unity/ProjectSettings/ProjectVersion.txt

+ 4 - 0
.gitignore

@@ -84,3 +84,7 @@ Publish/
 /Unity/Unity.ModelView.Codes.csproj
 /Unity/Unity.GenerateClient.csproj
 /Unity/Unity.GenerateServer.csproj
+
+/Unity/Assets/Bundles/AotDlls
+/Unity/Assets/Bundles/AotDlls.meta
+/Unity/HybridCLRData

+ 82 - 0
Unity/Assembly-CSharp-firstpass.csproj

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LangVersion>9.0</LangVersion>
+    <_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package</_TargetFrameworkDirectories>
+    <_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package</_FullFrameworkReferenceAssemblyPaths>
+    <DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
+  </PropertyGroup>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.20506</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <RootNamespace></RootNamespace>
+    <ProjectGuid>{09b46226-3263-561e-d797-c9025c53bdd6}</ProjectGuid>
+    <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <AssemblyName>Assembly-CSharp-firstpass</AssemblyName>
+    <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <BaseDirectory>.</BaseDirectory>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Temp\Bin\Debug\Unity.Rider.Editor\</OutputPath>
+    <DefineConstants>UNITY_EDITOR</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>0169,0649</NoWarn>
+    <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+  </PropertyGroup>
+  <PropertyGroup>
+    <NoConfig>true</NoConfig>
+    <NoStdLib>true</NoStdLib>
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+    <ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades>
+    <ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades>
+  </PropertyGroup>
+  <ItemGroup>
+     <Folder Include="Assets/Plugins/Android" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/win/native" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/linux" />
+     <Folder Include="Assets/Plugins/MacOS" />
+     <Folder Include="Assets/Plugins" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes" />
+     <Folder Include="Assets/Plugins/Android/libs/x86" />
+     <Folder Include="Assets/Plugins/MacOS/x86_64" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/win" />
+     <Folder Include="Assets/Plugins/MongoDB" />
+     <Folder Include="Assets/Plugins/Android/libs/arm64-v8a" />
+     <Folder Include="Assets/Plugins/MacOS/arm64" />
+     <Folder Include="Assets/Plugins/Android/libs/armeabi-v7a" />
+     <Folder Include="Assets/Plugins/iOS" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/osx" />
+     <Folder Include="Assets/Plugins/x86" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/linux/native" />
+     <Folder Include="Assets/Plugins/Android/libs" />
+     <Folder Include="Assets/Plugins/x86_64" />
+     <Folder Include="Assets/Plugins/MongoDB/runtimes/osx/native" />
+     <Reference Include="UnityEngine">
+     <HintPath>/Applications/Unity/Hub/Editor/2021.3.16f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.dll</HintPath>
+     </Reference>
+     <Reference Include="UnityEngine.CoreModule">
+     <HintPath>/Applications/Unity/Hub/Editor/2021.3.16f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath>
+     </Reference>
+     <Reference Include="UnityEditor">
+     <HintPath>/Applications/Unity/Hub/Editor/2021.3.16f1/Unity.app/Contents/Managed/UnityEngine/UnityEditor.dll</HintPath>
+     </Reference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 7 - 7
Unity/Assets/Plugins/MacOS/arm64/libkcp.dylib.meta

@@ -17,9 +17,9 @@ PluginImporter:
       enabled: 0
       settings:
         Exclude Android: 1
-        Exclude Editor: 0
+        Exclude Editor: 1
         Exclude Linux64: 1
-        Exclude OSXUniversal: 0
+        Exclude OSXUniversal: 1
         Exclude WebGL: 1
         Exclude Win: 1
         Exclude Win64: 1
@@ -38,7 +38,7 @@ PluginImporter:
   - first:
       Editor: Editor
     second:
-      enabled: 1
+      enabled: 0
       settings:
         CPU: ARM64
         DefaultValueInitialized: true
@@ -48,11 +48,11 @@ PluginImporter:
     second:
       enabled: 0
       settings:
-        CPU: x86_64
+        CPU: None
   - first:
       Standalone: OSXUniversal
     second:
-      enabled: 1
+      enabled: 0
       settings:
         CPU: ARM64
   - first:
@@ -60,13 +60,13 @@ PluginImporter:
     second:
       enabled: 0
       settings:
-        CPU: x86
+        CPU: None
   - first:
       Standalone: Win64
     second:
       enabled: 0
       settings:
-        CPU: x86_64
+        CPU: None
   - first:
       iPhone: iOS
     second:

+ 1 - 1
Unity/Assets/Plugins/MacOS/x86_64/libkcp.dylib.meta

@@ -54,7 +54,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        CPU: x86_64
+        CPU: AnyCPU
   - first:
       Standalone: Win
     second:

+ 1 - 2
Unity/Assets/Scenes/Init.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 0}
-  m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
+  m_IndirectSpecularColor: {r: 0.12731713, g: 0.13414736, b: 0.121078536, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -456,7 +456,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 3b3cb9b07d7917f4cbf5bc2be18e8585, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  GlobalConfig: {fileID: 11400000, guid: a60778dce43da574aa447ab3fcf5d9f7, type: 2}
 --- !u!1 &630054495
 GameObject:
   m_ObjectHideFlags: 0

+ 5 - 3
Unity/Assets/Scripts/Editor/BuildEditor/BuildAssembliesHelper.cs

@@ -99,11 +99,13 @@ namespace ET
                     throw new Exception("not found enum");
             }
 
-            BuildAssembliesHelper.BuildMuteAssembly(logicFile, codes, new[] { Path.Combine(Define.BuildOutputDir, "Model.dll") }, codeOptimization,
+            BuildAssembliesHelper.BuildMuteAssembly("Hotfix", codes, new[] { Path.Combine(Define.BuildOutputDir, "Model.dll") }, codeOptimization,
                 globalConfig.CodeMode);
 
-            File.Copy(Path.Combine(Define.BuildOutputDir, $"{logicFile}.dll"), Path.Combine(CodeDir, $"Hotfix.dll.bytes"), true);
-            File.Copy(Path.Combine(Define.BuildOutputDir, $"{logicFile}.pdb"), Path.Combine(CodeDir, $"Hotfix.pdb.bytes"), true);
+            File.Copy(Path.Combine(Define.BuildOutputDir, "Hotfix.dll"), Path.Combine(CodeDir, $"Hotfix.dll.bytes"), true);
+            File.Copy(Path.Combine(Define.BuildOutputDir, "Hotfix.pdb"), Path.Combine(CodeDir, $"Hotfix.pdb.bytes"), true);
+            File.Copy(Path.Combine(Define.BuildOutputDir, "Hotfix.dll"), Path.Combine(Define.BuildOutputDir, $"{logicFile}.dll"), true);
+            File.Copy(Path.Combine(Define.BuildOutputDir, "Hotfix.pdb"), Path.Combine(Define.BuildOutputDir, $"{logicFile}.pdb"), true);
             Debug.Log("copy Hotfix.dll to Bundles/Code success!");
         }
 

+ 8 - 0
Unity/Assets/Scripts/Editor/Plugins/HybridCLR.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 96272e9eb37a641098c018e0f2494fd9
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 0
Unity/Assets/Scripts/Editor/Plugins/HybridCLR/HybridCLREditor.cs

@@ -0,0 +1,47 @@
+using System.Collections.Generic;
+using System.IO;
+using HybridCLR.Editor;
+using UnityEditor;
+
+namespace ET
+{
+    public static class HybridCLREditor
+    {
+        private static readonly List<string> AotDlls = new()
+        {
+            "Unity.ThirdParty.dll", 
+            "Unity.Loader.dll", 
+            "Unity.Core.dll", 
+            "MongoDB.Bson.dll",
+            "CommandLine.dll",
+            "NLog.dll",
+            "mscorlib.dll",
+            "System.dll",
+            "System.Core.dll",
+        };
+        
+        [MenuItem("HybridCLR/CopyAotDlls")]
+        public static void CopyAotDll()
+        {
+            BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
+            string fromDir = Path.Combine(HybridCLRSettings.Instance.strippedAOTDllOutputRootDir, target.ToString());
+            string toDir = "Assets/Bundles/AotDlls";
+            if (!Directory.Exists(toDir))
+            {
+                Directory.CreateDirectory(toDir);
+            }
+            AssetDatabase.Refresh();
+            
+            foreach (string aotDll in AotDlls)
+            {
+                File.Copy(Path.Combine(fromDir, aotDll), Path.Combine(toDir, $"{aotDll}.bytes"), true);
+            }
+            
+            // 设置ab包
+            AssetImporter assetImporter = AssetImporter.GetAtPath(toDir);
+            assetImporter.assetBundleName = "AotDlls.unity3d";
+            AssetDatabase.SaveAssets();
+            AssetDatabase.Refresh();
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Scripts/Editor/Plugins/HybridCLR/HybridCLREditor.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3206fa0ceb9db42d7b64ff8b4e91c091
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 1
Unity/Assets/Scripts/Editor/Unity.Editor.asmdef

@@ -4,7 +4,9 @@
     "references": [
         "Unity.ThirdParty",
         "Unity.Core",
-        "Unity.Loader"
+        "Unity.Loader",
+        "HybridCLR.Runtime",
+        "HybridCLR.Editor"
     ],
     "includePlatforms": [
         "Editor"

+ 2 - 0
Unity/Assets/Scripts/Loader/CodeLoader.cs

@@ -44,6 +44,8 @@ namespace ET
 					Dictionary<string, UnityEngine.Object> dictionary = AssetsBundleHelper.LoadBundle("code.unity3d");
 					assBytes = ((TextAsset)dictionary["Model.dll"]).bytes;
 					pdbBytes = ((TextAsset)dictionary["Model.pdb"]).bytes;
+					
+					HybridCLRHelper.Load();
 				}
 				else
 				{

+ 8 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 76d53de90b68748f794dd1d3bf07bc57
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 861f8500341e54e80be11c1ab1812f99
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 173 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs

@@ -0,0 +1,173 @@
+public class AOTGenericReferences : UnityEngine.MonoBehaviour
+{
+
+	// {{ constraint implement type
+	// }} 
+
+	// {{ AOT generic type
+	//ET.AEvent`1<ET.EventType.AfterUnitCreate>
+	//ET.AEvent`1<ET.EventType.NumbericChange>
+	//ET.AEvent`1<ET.Client.NetClientComponentOnRead>
+	//ET.AEvent`1<ET.EventType.EntryEvent3>
+	//ET.AEvent`1<ET.EventType.AfterCreateClientScene>
+	//ET.AEvent`1<ET.EventType.AfterCreateCurrentScene>
+	//ET.AEvent`1<ET.EventType.SceneChangeStart>
+	//ET.AEvent`1<ET.EventType.SceneChangeFinish>
+	//ET.AEvent`1<ET.EventType.LoginFinish>
+	//ET.AEvent`1<ET.EventType.AppStartInitFinish>
+	//ET.AEvent`1<ET.EventType.ChangePosition>
+	//ET.AEvent`1<ET.EventType.ChangeRotation>
+	//ET.AEvent`1<ET.EventType.EntryEvent1>
+	//ET.AInvokeHandler`2<ET.ConfigComponent/GetOneConfigBytes,System.Object>
+	//ET.AInvokeHandler`2<ET.ConfigComponent/GetAllConfigBytes,System.Object>
+	//ET.ATimer`1<System.Object>
+	//ET.AwakeSystem`1<System.Object>
+	//ET.AwakeSystem`2<System.Object,System.Int32>
+	//ET.AwakeSystem`2<System.Object,System.Object>
+	//ET.AwakeSystem`2<System.Object,System.Net.Sockets.AddressFamily>
+	//ET.AwakeSystem`3<System.Object,System.Object,System.Object>
+	//ET.AwakeSystem`3<System.Object,System.Object,System.Int32>
+	//ET.ConfigSingleton`1<System.Object>
+	//ET.DestroySystem`1<System.Object>
+	//ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_SceneChangeFinish>
+	//ET.ETAsyncTaskMethodBuilder`1<System.UInt32>
+	//ET.ETAsyncTaskMethodBuilder`1<System.ValueTuple`2<System.UInt32,System.Object>>
+	//ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_UnitStop>
+	//ET.ETAsyncTaskMethodBuilder`1<System.Byte>
+	//ET.ETAsyncTaskMethodBuilder`1<System.Int32>
+	//ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_CreateMyUnit>
+	//ET.ETAsyncTaskMethodBuilder`1<System.Object>
+	//ET.ETTask`1<ET.Client.Wait_CreateMyUnit>
+	//ET.ETTask`1<System.UInt32>
+	//ET.ETTask`1<System.ValueTuple`2<System.UInt32,System.Object>>
+	//ET.ETTask`1<ET.Client.Wait_UnitStop>
+	//ET.ETTask`1<ET.Client.Wait_SceneChangeFinish>
+	//ET.ETTask`1<System.Int32>
+	//ET.ETTask`1<System.Byte>
+	//ET.ETTask`1<System.Object>
+	//ET.IAwake`1<System.Int32>
+	//ET.IAwake`1<System.Object>
+	//ET.IAwake`1<System.Net.Sockets.AddressFamily>
+	//ET.IAwake`2<System.Object,System.Object>
+	//ET.IAwake`2<System.Object,System.Int32>
+	//ET.LateUpdateSystem`1<System.Object>
+	//ET.ListComponent`1<System.Object>
+	//ET.ListComponent`1<Unity.Mathematics.float3>
+	//ET.LoadSystem`1<System.Object>
+	//ET.Singleton`1<System.Object>
+	//ET.UpdateSystem`1<System.Object>
+	//System.Action`2<System.Int64,System.Int32>
+	//System.Action`3<System.Int64,System.Int64,System.Object>
+	//System.Collections.Generic.Dictionary`2<System.Int32,ET.RpcInfo>
+	//System.Collections.Generic.Dictionary`2<System.Int32,System.Int64>
+	//System.Collections.Generic.Dictionary`2<System.UInt16,System.Object>
+	//System.Collections.Generic.Dictionary`2<System.Object,System.Object>
+	//System.Collections.Generic.Dictionary`2<System.Object,System.Int64>
+	//System.Collections.Generic.Dictionary`2<System.Object,System.Int32>
+	//System.Collections.Generic.Dictionary`2<System.Int32,System.Object>
+	//System.Collections.Generic.Dictionary`2/Enumerator<System.Int32,System.Int64>
+	//System.Collections.Generic.Dictionary`2/Enumerator<System.Object,System.Object>
+	//System.Collections.Generic.Dictionary`2/Enumerator<System.Int32,System.Object>
+	//System.Collections.Generic.Dictionary`2/ValueCollection<System.Object,System.Object>
+	//System.Collections.Generic.Dictionary`2/ValueCollection<System.Int32,System.Object>
+	//System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator<System.Int32,System.Object>
+	//System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator<System.Object,System.Object>
+	//System.Collections.Generic.HashSet`1<System.UInt16>
+	//System.Collections.Generic.HashSet`1<System.Object>
+	//System.Collections.Generic.HashSet`1/Enumerator<System.Object>
+	//System.Collections.Generic.KeyValuePair`2<System.Int32,System.Int64>
+	//System.Collections.Generic.KeyValuePair`2<System.Int32,System.Object>
+	//System.Collections.Generic.KeyValuePair`2<System.Object,System.Object>
+	//System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>
+	//System.Collections.Generic.List`1<System.Int64>
+	//System.Collections.Generic.List`1<System.Object>
+	//System.Collections.Generic.List`1<Unity.Mathematics.float3>
+	//System.Collections.Generic.List`1/Enumerator<System.Int64>
+	//System.Collections.Generic.List`1/Enumerator<Unity.Mathematics.float3>
+	//System.Collections.Generic.List`1/Enumerator<System.Object>
+	//System.Collections.Generic.SortedDictionary`2<System.Int32,System.Object>
+	//System.Collections.Generic.SortedDictionary`2/ValueCollection<System.Int32,System.Object>
+	//System.Collections.Generic.SortedDictionary`2/ValueCollection/Enumerator<System.Int32,System.Object>
+	//System.Func`1<System.Object>
+	//System.Func`2<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Object>
+	//System.Func`2<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Int32>
+	//System.Runtime.CompilerServices.TaskAwaiter`1<System.ValueTuple`2<System.UInt32,System.UInt32>>
+	//System.Runtime.CompilerServices.TaskAwaiter`1<System.Object>
+	//System.Threading.Tasks.Task`1<System.ValueTuple`2<System.UInt32,System.UInt32>>
+	//System.Threading.Tasks.Task`1<System.Object>
+	//System.ValueTuple`2<System.UInt32,System.Object>
+	//System.ValueTuple`2<System.UInt32,System.UInt32>
+	// }}
+
+	public void RefMethods()
+	{
+		// System.Object ET.Entity::AddChild<System.Object,System.Object,System.Object>(System.Object,System.Object,System.Boolean)
+		// System.Object ET.Entity::AddChildWithId<System.Object,System.Int32>(System.Int64,System.Int32,System.Boolean)
+		// System.Object ET.Entity::AddComponent<System.Object,System.Net.Sockets.AddressFamily>(System.Net.Sockets.AddressFamily,System.Boolean)
+		// System.Object ET.Entity::AddComponent<System.Object,System.Object,System.Int32>(System.Object,System.Int32,System.Boolean)
+		// System.Object ET.Entity::AddComponent<System.Object>(System.Boolean)
+		// System.Object ET.Entity::GetChild<System.Object>(System.Int64)
+		// System.Object ET.Entity::GetComponent<System.Object>()
+		// System.Object ET.Entity::GetParent<System.Object>()
+		// System.Void ET.Entity::RemoveComponent<System.Object>()
+		// System.Void ET.ETAsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<ET.ETTaskCompleted,System.Object>(ET.ETTaskCompleted&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter`1<System.ValueTuple`2<System.UInt32,System.UInt32>>,System.Object>(System.Runtime.CompilerServices.TaskAwaiter`1<System.ValueTuple`2<System.UInt32,System.UInt32>>&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter`1<System.Object>,System.Object>(System.Runtime.CompilerServices.TaskAwaiter`1<System.Object>&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Byte>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Object>::AwaitUnsafeOnCompleted<ET.ETTaskCompleted,System.Object>(ET.ETTaskCompleted&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_CreateMyUnit>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Object>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Int32>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Object>::AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter`1<System.Object>,System.Object>(System.Runtime.CompilerServices.TaskAwaiter`1<System.Object>&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.UInt32>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_UnitStop>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.ValueTuple`2<System.UInt32,System.Object>>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_SceneChangeFinish>::AwaitUnsafeOnCompleted<System.Object,System.Object>(System.Object&,System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_UnitStop>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_CreateMyUnit>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Object>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Int32>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.ValueTuple`2<System.UInt32,System.Object>>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.Byte>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<System.UInt32>::Start<System.Object>(System.Object&)
+		// System.Void ET.ETAsyncTaskMethodBuilder`1<ET.Client.Wait_SceneChangeFinish>::Start<System.Object>(System.Object&)
+		// System.Object ET.EventSystem::Invoke<ET.NavmeshComponent/RecastFileLoader,System.Object>(System.Int32,ET.NavmeshComponent/RecastFileLoader)
+		// System.Void ET.EventSystem::Publish<ET.EventType.MoveStop>(ET.Scene,ET.EventType.MoveStop)
+		// System.Void ET.EventSystem::Publish<ET.EventType.SceneChangeStart>(ET.Scene,ET.EventType.SceneChangeStart)
+		// System.Void ET.EventSystem::Publish<ET.EventType.SceneChangeFinish>(ET.Scene,ET.EventType.SceneChangeFinish)
+		// System.Void ET.EventSystem::Publish<ET.EventType.NumbericChange>(ET.Scene,ET.EventType.NumbericChange)
+		// System.Void ET.EventSystem::Publish<ET.EventType.ChangePosition>(ET.Scene,ET.EventType.ChangePosition)
+		// System.Void ET.EventSystem::Publish<ET.EventType.EnterMapFinish>(ET.Scene,ET.EventType.EnterMapFinish)
+		// System.Void ET.EventSystem::Publish<ET.EventType.ChangeRotation>(ET.Scene,ET.EventType.ChangeRotation)
+		// System.Void ET.EventSystem::Publish<ET.EventType.AfterCreateClientScene>(ET.Scene,ET.EventType.AfterCreateClientScene)
+		// System.Void ET.EventSystem::Publish<ET.Client.NetClientComponentOnRead>(ET.Scene,ET.Client.NetClientComponentOnRead)
+		// System.Void ET.EventSystem::Publish<ET.EventType.AfterUnitCreate>(ET.Scene,ET.EventType.AfterUnitCreate)
+		// System.Void ET.EventSystem::Publish<ET.EventType.AfterCreateCurrentScene>(ET.Scene,ET.EventType.AfterCreateCurrentScene)
+		// System.Void ET.EventSystem::Publish<ET.EventType.MoveStart>(ET.Scene,ET.EventType.MoveStart)
+		// ET.ETTask ET.EventSystem::PublishAsync<ET.EventType.EntryEvent1>(ET.Scene,ET.EventType.EntryEvent1)
+		// ET.ETTask ET.EventSystem::PublishAsync<ET.EventType.EntryEvent2>(ET.Scene,ET.EventType.EntryEvent2)
+		// ET.ETTask ET.EventSystem::PublishAsync<ET.EventType.EntryEvent3>(ET.Scene,ET.EventType.EntryEvent3)
+		// ET.ETTask ET.EventSystem::PublishAsync<ET.EventType.AppStartInitFinish>(ET.Scene,ET.EventType.AppStartInitFinish)
+		// ET.ETTask ET.EventSystem::PublishAsync<ET.EventType.LoginFinish>(ET.Scene,ET.EventType.LoginFinish)
+		// System.Object ET.Game::AddSingleton<System.Object>()
+		// System.Object ET.JsonHelper::FromJson<System.Object>(System.String)
+		// System.Void ET.RandomGenerator::BreakRank<System.Object>(System.Collections.Generic.List`1<System.Object>)
+		// System.String ET.StringHelper::ArrayToString<System.Single>(System.Single[])
+		// System.Object ReferenceCollector::Get<System.Object>(System.String)
+		// ET.Client.Wait_UnitStop System.Activator::CreateInstance<ET.Client.Wait_UnitStop>()
+		// ET.Client.Wait_CreateMyUnit System.Activator::CreateInstance<ET.Client.Wait_CreateMyUnit>()
+		// ET.Client.Wait_SceneChangeFinish System.Activator::CreateInstance<ET.Client.Wait_SceneChangeFinish>()
+		// System.Object[] System.Array::Empty<System.Object>()
+		// System.Linq.IOrderedEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>> System.Linq.Enumerable::OrderBy<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Int32>(System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>>,System.Func`2<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Int32>)
+		// System.Collections.Generic.IEnumerable`1<System.Object> System.Linq.Enumerable::Select<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Object>(System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>>,System.Func`2<System.Collections.Generic.KeyValuePair`2<System.Object,System.Int32>,System.Object>)
+		// ET.RpcInfo[] System.Linq.Enumerable::ToArray<ET.RpcInfo>(System.Collections.Generic.IEnumerable`1<ET.RpcInfo>)
+		// System.Object[] System.Linq.Enumerable::ToArray<System.Object>(System.Collections.Generic.IEnumerable`1<System.Object>)
+		// System.Threading.Tasks.Task`1<System.Object> System.Threading.Tasks.TaskFactory::StartNew<System.Object>(System.Func`1<System.Object>,System.Threading.CancellationToken)
+		// System.Object UnityEngine.GameObject::GetComponent<System.Object>()
+		// System.Object UnityEngine.Object::Instantiate<System.Object>(System.Object,UnityEngine.Transform,System.Boolean)
+		// System.Object UnityEngine.Object::Instantiate<System.Object>(System.Object,UnityEngine.Transform)
+		// System.Object UnityEngine.Resources::Load<System.Object>(System.String)
+	}
+}

+ 11 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c45673558bde94d11a7c76dfff4ec1f9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 249 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/link.xml

@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>
+<linker>
+  <assembly fullname="MongoDB.Bson">
+    <type fullname="MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptionsAttribute" preserve="all" />
+    <type fullname="MongoDB.Bson.Serialization.Attributes.BsonElementAttribute" preserve="all" />
+    <type fullname="MongoDB.Bson.Serialization.Attributes.BsonIgnoreAttribute" preserve="all" />
+    <type fullname="MongoDB.Bson.Serialization.Options.DictionaryRepresentation" preserve="all" />
+  </assembly>
+  <assembly fullname="mscorlib">
+    <type fullname="System.Action" preserve="all" />
+    <type fullname="System.Action`2" preserve="all" />
+    <type fullname="System.Action`3" preserve="all" />
+    <type fullname="System.Activator" preserve="all" />
+    <type fullname="System.ArgumentOutOfRangeException" preserve="all" />
+    <type fullname="System.Array" preserve="all" />
+    <type fullname="System.BitConverter" preserve="all" />
+    <type fullname="System.Byte" preserve="all" />
+    <type fullname="System.Collections.Generic.Dictionary`2" preserve="all" />
+    <type fullname="System.Collections.Generic.Dictionary`2/Enumerator" preserve="all" />
+    <type fullname="System.Collections.Generic.Dictionary`2/ValueCollection" preserve="all" />
+    <type fullname="System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator" preserve="all" />
+    <type fullname="System.Collections.Generic.IEnumerable`1" preserve="all" />
+    <type fullname="System.Collections.Generic.KeyValuePair`2" preserve="all" />
+    <type fullname="System.Collections.Generic.List`1" preserve="all" />
+    <type fullname="System.Collections.Generic.List`1/Enumerator" preserve="all" />
+    <type fullname="System.Console" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggableAttribute" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggableAttribute/DebuggingModes" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggerBrowsableAttribute" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggerBrowsableState" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggerDisplayAttribute" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggerHiddenAttribute" preserve="all" />
+    <type fullname="System.Diagnostics.DebuggerStepThroughAttribute" preserve="all" />
+    <type fullname="System.Enum" preserve="all" />
+    <type fullname="System.Exception" preserve="all" />
+    <type fullname="System.Func`1" preserve="all" />
+    <type fullname="System.Func`2" preserve="all" />
+    <type fullname="System.IDisposable" preserve="all" />
+    <type fullname="System.Int32" preserve="all" />
+    <type fullname="System.Int64" preserve="all" />
+    <type fullname="System.IO.File" preserve="all" />
+    <type fullname="System.IO.Path" preserve="all" />
+    <type fullname="System.IO.TextReader" preserve="all" />
+    <type fullname="System.Math" preserve="all" />
+    <type fullname="System.NotImplementedException" preserve="all" />
+    <type fullname="System.Object" preserve="all" />
+    <type fullname="System.Reflection.DefaultMemberAttribute" preserve="all" />
+    <type fullname="System.Reflection.MemberInfo" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.AsyncStateMachineAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.CompilationRelaxationsAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.CompilerGeneratedAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.ExtensionAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.IAsyncStateMachine" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.IsReadOnlyAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.RuntimeHelpers" preserve="all" />
+    <type fullname="System.Runtime.CompilerServices.TaskAwaiter`1" preserve="all" />
+    <type fullname="System.RuntimeFieldHandle" preserve="all" />
+    <type fullname="System.RuntimeTypeHandle" preserve="all" />
+    <type fullname="System.Security.Permissions.SecurityAction" preserve="all" />
+    <type fullname="System.Security.Permissions.SecurityPermissionAttribute" preserve="all" />
+    <type fullname="System.Security.UnverifiableCodeAttribute" preserve="all" />
+    <type fullname="System.Single" preserve="all" />
+    <type fullname="System.String" preserve="all" />
+    <type fullname="System.StringSplitOptions" preserve="all" />
+    <type fullname="System.Text.StringBuilder" preserve="all" />
+    <type fullname="System.Threading.CancellationToken" preserve="all" />
+    <type fullname="System.Threading.CancellationTokenSource" preserve="all" />
+    <type fullname="System.Threading.Tasks.Task" preserve="all" />
+    <type fullname="System.Threading.Tasks.Task`1" preserve="all" />
+    <type fullname="System.Threading.Tasks.TaskFactory" preserve="all" />
+    <type fullname="System.Threading.Thread" preserve="all" />
+    <type fullname="System.Threading.ThreadStart" preserve="all" />
+    <type fullname="System.Type" preserve="all" />
+    <type fullname="System.UInt16" preserve="all" />
+    <type fullname="System.UInt32" preserve="all" />
+    <type fullname="System.ValueTuple`2" preserve="all" />
+    <type fullname="System.ValueType" preserve="all" />
+  </assembly>
+  <assembly fullname="System">
+    <type fullname="System.Collections.Generic.SortedDictionary`2" preserve="all" />
+    <type fullname="System.Collections.Generic.SortedDictionary`2/ValueCollection" preserve="all" />
+    <type fullname="System.Collections.Generic.SortedDictionary`2/ValueCollection/Enumerator" preserve="all" />
+    <type fullname="System.Net.EndPoint" preserve="all" />
+    <type fullname="System.Net.IPAddress" preserve="all" />
+    <type fullname="System.Net.IPEndPoint" preserve="all" />
+    <type fullname="System.Net.Sockets.AddressFamily" preserve="all" />
+    <type fullname="System.Net.Sockets.ProtocolType" preserve="all" />
+    <type fullname="System.Net.Sockets.Socket" preserve="all" />
+    <type fullname="System.Net.Sockets.SocketFlags" preserve="all" />
+    <type fullname="System.Net.Sockets.SocketType" preserve="all" />
+  </assembly>
+  <assembly fullname="System.Core">
+    <type fullname="System.Collections.Generic.HashSet`1" preserve="all" />
+    <type fullname="System.Collections.Generic.HashSet`1/Enumerator" preserve="all" />
+    <type fullname="System.Linq.Enumerable" preserve="all" />
+    <type fullname="System.Linq.IOrderedEnumerable`1" preserve="all" />
+  </assembly>
+  <assembly fullname="System.Net.Http">
+    <type fullname="System.Net.Http.HttpClient" preserve="all" />
+    <type fullname="System.Net.Http.HttpContent" preserve="all" />
+    <type fullname="System.Net.Http.HttpResponseMessage" preserve="all" />
+  </assembly>
+  <assembly fullname="Unity.Core">
+    <type fullname="ET.AEvent`1" preserve="all" />
+    <type fullname="ET.AInvokeHandler`2" preserve="all" />
+    <type fullname="ET.AService" preserve="all" />
+    <type fullname="ET.ATimer`1" preserve="all" />
+    <type fullname="ET.AwakeSystem`1" preserve="all" />
+    <type fullname="ET.AwakeSystem`2" preserve="all" />
+    <type fullname="ET.AwakeSystem`3" preserve="all" />
+    <type fullname="ET.BaseAttribute" preserve="all" />
+    <type fullname="ET.ByteHelper" preserve="all" />
+    <type fullname="ET.ChildOfAttribute" preserve="all" />
+    <type fullname="ET.ComponentOfAttribute" preserve="all" />
+    <type fullname="ET.ConfigAttribute" preserve="all" />
+    <type fullname="ET.ConfigComponent" preserve="all" />
+    <type fullname="ET.ConfigComponent/GetAllConfigBytes" preserve="all" />
+    <type fullname="ET.ConfigComponent/GetOneConfigBytes" preserve="all" />
+    <type fullname="ET.ConfigSingleton`1" preserve="all" />
+    <type fullname="ET.CoroutineLock" preserve="all" />
+    <type fullname="ET.CoroutineLockComponent" preserve="all" />
+    <type fullname="ET.DestroySystem`1" preserve="all" />
+    <type fullname="ET.DisposeObject" preserve="all" />
+    <type fullname="ET.Entity" preserve="all" />
+    <type fullname="ET.EntitySceneFactory" preserve="all" />
+    <type fullname="ET.ErrorCore" preserve="all" />
+    <type fullname="ET.EventAttribute" preserve="all" />
+    <type fullname="ET.EventSystem" preserve="all" />
+    <type fullname="ET.FriendOfAttribute" preserve="all" />
+    <type fullname="ET.Game" preserve="all" />
+    <type fullname="ET.IAwake" preserve="all" />
+    <type fullname="ET.IAwake`1" preserve="all" />
+    <type fullname="ET.IAwake`2" preserve="all" />
+    <type fullname="ET.IConfig" preserve="all" />
+    <type fullname="ET.IDestroy" preserve="all" />
+    <type fullname="ET.IdGenerater" preserve="all" />
+    <type fullname="ET.ILateUpdate" preserve="all" />
+    <type fullname="ET.ILoad" preserve="all" />
+    <type fullname="ET.IMerge" preserve="all" />
+    <type fullname="ET.InvokeAttribute" preserve="all" />
+    <type fullname="ET.ITransfer" preserve="all" />
+    <type fullname="ET.IUpdate" preserve="all" />
+    <type fullname="ET.JsonHelper" preserve="all" />
+    <type fullname="ET.KService" preserve="all" />
+    <type fullname="ET.LateUpdateSystem`1" preserve="all" />
+    <type fullname="ET.ListComponent`1" preserve="all" />
+    <type fullname="ET.LoadSystem`1" preserve="all" />
+    <type fullname="ET.Log" preserve="all" />
+    <type fullname="ET.Logger" preserve="all" />
+    <type fullname="ET.MessageAttribute" preserve="all" />
+    <type fullname="ET.MongoHelper" preserve="all" />
+    <type fullname="ET.NetServices" preserve="all" />
+    <type fullname="ET.NetworkHelper" preserve="all" />
+    <type fullname="ET.ObjectSystemAttribute" preserve="all" />
+    <type fullname="ET.Options" preserve="all" />
+    <type fullname="ET.ProtobufHelper" preserve="all" />
+    <type fullname="ET.ProtoObject" preserve="all" />
+    <type fullname="ET.RandomGenerator" preserve="all" />
+    <type fullname="ET.Root" preserve="all" />
+    <type fullname="ET.RpcException" preserve="all" />
+    <type fullname="ET.Scene" preserve="all" />
+    <type fullname="ET.SceneHelper" preserve="all" />
+    <type fullname="ET.SceneType" preserve="all" />
+    <type fullname="ET.ServiceType" preserve="all" />
+    <type fullname="ET.Singleton`1" preserve="all" />
+    <type fullname="ET.StaticFieldAttribute" preserve="all" />
+    <type fullname="ET.StringHashHelper" preserve="all" />
+    <type fullname="ET.StringHelper" preserve="all" />
+    <type fullname="ET.TimeHelper" preserve="all" />
+    <type fullname="ET.TimeInfo" preserve="all" />
+    <type fullname="ET.TimerComponent" preserve="all" />
+    <type fullname="ET.UniqueIdAttribute" preserve="all" />
+    <type fullname="ET.UpdateSystem`1" preserve="all" />
+    <type fullname="ET.WinPeriod" preserve="all" />
+  </assembly>
+  <assembly fullname="Unity.Loader">
+    <type fullname="ET.CodeLoader" preserve="all" />
+    <type fullname="ET.CodeMode" preserve="all" />
+    <type fullname="ET.CoroutineHelper" preserve="all" />
+    <type fullname="ET.Define" preserve="all" />
+    <type fullname="ET.GlobalConfig" preserve="all" />
+    <type fullname="ET.PathHelper" preserve="all" />
+    <type fullname="ET.UILayer" preserve="all" />
+    <type fullname="ReferenceCollector" preserve="all" />
+  </assembly>
+  <assembly fullname="Unity.Mathematics">
+    <type fullname="Unity.Mathematics.float3" preserve="all" />
+    <type fullname="Unity.Mathematics.math" preserve="all" />
+    <type fullname="Unity.Mathematics.quaternion" preserve="all" />
+  </assembly>
+  <assembly fullname="Unity.ThirdParty">
+    <type fullname="ET.ETAsyncTaskMethodBuilder" preserve="all" />
+    <type fullname="ET.ETAsyncTaskMethodBuilder`1" preserve="all" />
+    <type fullname="ET.ETCancellationToken" preserve="all" />
+    <type fullname="ET.ETTask" preserve="all" />
+    <type fullname="ET.ETTask`1" preserve="all" />
+    <type fullname="ET.ETTaskCompleted" preserve="all" />
+    <type fullname="ET.ETTaskHelper" preserve="all" />
+    <type fullname="ET.Recast" preserve="all" />
+    <type fullname="ProtoBuf.ProtoAfterDeserializationAttribute" preserve="all" />
+    <type fullname="ProtoBuf.ProtoContractAttribute" preserve="all" />
+    <type fullname="ProtoBuf.ProtoIgnoreAttribute" preserve="all" />
+    <type fullname="ProtoBuf.ProtoMemberAttribute" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.AnimationModule">
+    <type fullname="UnityEngine.AnimationClip" preserve="all" />
+    <type fullname="UnityEngine.Animator" preserve="all" />
+    <type fullname="UnityEngine.AnimatorControllerParameter" preserve="all" />
+    <type fullname="UnityEngine.RuntimeAnimatorController" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.AssetBundleModule">
+    <type fullname="UnityEngine.AssetBundle" preserve="all" />
+    <type fullname="UnityEngine.AssetBundleCreateRequest" preserve="all" />
+    <type fullname="UnityEngine.AssetBundleManifest" preserve="all" />
+    <type fullname="UnityEngine.AssetBundleRequest" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.CoreModule">
+    <type fullname="UnityEngine.AsyncOperation" preserve="all" />
+    <type fullname="UnityEngine.Camera" preserve="all" />
+    <type fullname="UnityEngine.Component" preserve="all" />
+    <type fullname="UnityEngine.Events.UnityAction" preserve="all" />
+    <type fullname="UnityEngine.Events.UnityEvent" preserve="all" />
+    <type fullname="UnityEngine.GameObject" preserve="all" />
+    <type fullname="UnityEngine.KeyCode" preserve="all" />
+    <type fullname="UnityEngine.LayerMask" preserve="all" />
+    <type fullname="UnityEngine.Object" preserve="all" />
+    <type fullname="UnityEngine.Quaternion" preserve="all" />
+    <type fullname="UnityEngine.Ray" preserve="all" />
+    <type fullname="UnityEngine.Resources" preserve="all" />
+    <type fullname="UnityEngine.SceneManagement.SceneManager" preserve="all" />
+    <type fullname="UnityEngine.TextAsset" preserve="all" />
+    <type fullname="UnityEngine.Transform" preserve="all" />
+    <type fullname="UnityEngine.Vector3" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.InputLegacyModule">
+    <type fullname="UnityEngine.Input" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.PhysicsModule">
+    <type fullname="UnityEngine.Physics" preserve="all" />
+    <type fullname="UnityEngine.RaycastHit" preserve="all" />
+  </assembly>
+  <assembly fullname="UnityEngine.UI">
+    <type fullname="UnityEngine.UI.Button" preserve="all" />
+    <type fullname="UnityEngine.UI.Button/ButtonClickedEvent" preserve="all" />
+    <type fullname="UnityEngine.UI.InputField" preserve="all" />
+    <type fullname="UnityEngine.UI.Text" preserve="all" />
+  </assembly>
+</linker>

+ 7 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/link.xml.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e6d1622fb1ba04799bf3c11259c90778
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/HybridCLRHelper.cs

@@ -0,0 +1,19 @@
+using System.Collections.Generic;
+using HybridCLR;
+using UnityEngine;
+
+namespace ET
+{
+    public static class HybridCLRHelper
+    {
+        public static void Load()
+        {
+            Dictionary<string, UnityEngine.Object> dictionary = AssetsBundleHelper.LoadBundle("aotdlls.unity3d");
+            foreach (var kv in dictionary)
+            {
+                byte[] bytes = (kv.Value as TextAsset).bytes;
+                RuntimeApi.LoadMetadataForAOTAssembly(bytes, HomologousImageMode.Consistent);
+            }
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/HybridCLRHelper.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 37e13922172164dc0bcb416ecc85b5a0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 1
Unity/Assets/Scripts/Loader/Unity.Loader.asmdef

@@ -3,7 +3,8 @@
     "rootNamespace": "ET",
     "references": [
         "Unity.ThirdParty",
-        "Unity.Core"
+        "Unity.Core",
+        "HybridCLR.Runtime"
     ],
     "includePlatforms": [],
     "excludePlatforms": [],

+ 4 - 3
Unity/Packages/manifest.json

@@ -1,9 +1,10 @@
 {
   "dependencies": {
-    "com.unity.ide.rider": "3.0.15",
-    "com.unity.ide.visualstudio": "2.0.16",
+    "com.focus-creative-games.hybridclr_unity": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
+    "com.unity.ide.rider": "3.0.17",
+    "com.unity.ide.visualstudio": "2.0.17",
     "com.unity.ide.vscode": "1.2.5",
-    "com.unity.render-pipelines.universal": "12.1.7",
+    "com.unity.render-pipelines.universal": "12.1.8",
     "com.unity.textmeshpro": "3.0.6",
     "com.unity.timeline": "1.7.1",
     "com.unity.ugui": "1.0.0",

+ 17 - 10
Unity/Packages/packages-lock.json

@@ -1,7 +1,14 @@
 {
   "dependencies": {
+    "com.focus-creative-games.hybridclr_unity": {
+      "version": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
+      "depth": 0,
+      "source": "git",
+      "dependencies": {},
+      "hash": "00cedc166f7ca58cfb9a9ad645bd4a0ffc9b8fc9"
+    },
     "com.unity.burst": {
-      "version": "1.6.6",
+      "version": "1.8.2",
       "depth": 1,
       "source": "registry",
       "dependencies": {
@@ -17,7 +24,7 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.ide.rider": {
-      "version": "3.0.15",
+      "version": "3.0.17",
       "depth": 0,
       "source": "registry",
       "dependencies": {
@@ -26,7 +33,7 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.ide.visualstudio": {
-      "version": "2.0.16",
+      "version": "2.0.17",
       "depth": 0,
       "source": "registry",
       "dependencies": {
@@ -49,7 +56,7 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.render-pipelines.core": {
-      "version": "12.1.7",
+      "version": "12.1.8",
       "depth": 1,
       "source": "builtin",
       "dependencies": {
@@ -59,14 +66,14 @@
       }
     },
     "com.unity.render-pipelines.universal": {
-      "version": "12.1.7",
+      "version": "12.1.8",
       "depth": 0,
       "source": "builtin",
       "dependencies": {
         "com.unity.mathematics": "1.2.1",
-        "com.unity.burst": "1.5.0",
-        "com.unity.render-pipelines.core": "12.1.7",
-        "com.unity.shadergraph": "12.1.7"
+        "com.unity.burst": "1.8.2",
+        "com.unity.render-pipelines.core": "12.1.8",
+        "com.unity.shadergraph": "12.1.8"
       }
     },
     "com.unity.searcher": {
@@ -77,11 +84,11 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.shadergraph": {
-      "version": "12.1.7",
+      "version": "12.1.8",
       "depth": 1,
       "source": "builtin",
       "dependencies": {
-        "com.unity.render-pipelines.core": "12.1.7",
+        "com.unity.render-pipelines.core": "12.1.8",
         "com.unity.searcher": "4.9.1"
       }
     },

+ 33 - 0
Unity/ProjectSettings/HybridCLRSettings.asset

@@ -0,0 +1,33 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &1
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e189374413a3f00468e49d51d8b27a09, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  enable: 1
+  useGlobalIl2cpp: 0
+  hybridclrRepoURL: https://gitee.com/focus-creative-games/hybridclr
+  il2cppPlusRepoURL: https://gitee.com/focus-creative-games/il2cpp_plus
+  hotUpdateAssemblyDefinitions: []
+  hotUpdateAssemblies:
+  - Model
+  - Hotfix
+  preserveHotUpdateAssemblies: []
+  hotUpdateDllCompileOutputRootDir: HybridCLRData/HotUpdateDlls
+  externalHotUpdateAssembliyDirs:
+  - Temp/Bin/Debug
+  strippedAOTDllOutputRootDir: HybridCLRData/AssembliesPostIl2CppStrip
+  patchAOTAssemblies: []
+  collectAssetReferenceTypes: 0
+  outputLinkFile: Scripts/Loader/Plugins/HybridCLR/Generated/link.xml
+  outputAOTGenericReferenceFile: Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs
+  maxGenericReferenceIteration: 10
+  maxMethodBridgeGenericIteration: 10

+ 12 - 16
Unity/ProjectSettings/ProjectSettings.asset

@@ -41,12 +41,6 @@ PlayerSettings:
     height: 1
   m_SplashScreenLogos: []
   m_VirtualRealitySplashScreen: {fileID: 0}
-  m_ShowUnitySplashAds: 0
-  m_AdsAndroidGameId: 
-  m_AdsIosGameId: 
-  m_ShowSplashAdsSlogan: 0
-  m_SloganImage: {fileID: 0}
-  m_SloganHeight: 150
   m_HolographicTrackingLossScreen: {fileID: 0}
   defaultScreenWidth: 1024
   defaultScreenHeight: 768
@@ -91,11 +85,6 @@ PlayerSettings:
   hideHomeButton: 0
   submitAnalytics: 1
   usePlayerLog: 1
-  autoStreaming: 0
-  useAnimationStreaming: 0
-  useFontStreaming: 0
-  autoStreamingId: 
-  instantGameAppId: 
   bakeCollisionMeshes: 0
   forceSingleInstance: 0
   useFlipModelSwapchain: 1
@@ -260,7 +249,7 @@ PlayerSettings:
   useCustomBaseGradleTemplate: 0
   useCustomGradlePropertiesTemplate: 0
   useCustomProguardFile: 0
-  AndroidTargetArchitectures: 5
+  AndroidTargetArchitectures: 2
   AndroidTargetDevices: 0
   AndroidSplashScreenScale: 0
   androidSplashScreen: {fileID: 0}
@@ -483,6 +472,7 @@ PlayerSettings:
       m_Kind: 4
       m_SubKind: App Store
   m_BuildTargetBatching: []
+  m_BuildTargetShaderSettings: []
   m_BuildTargetGraphicsJobs:
   - m_BuildTarget: MacStandaloneSupport
     m_GraphicsJobs: 0
@@ -579,6 +569,8 @@ PlayerSettings:
   - m_BuildTarget: tvOS
     m_Enabled: 0
     m_Devices: []
+  m_DefaultShaderChunkSizeInMB: 16
+  m_DefaultShaderChunkCount: 0
   openGLRequireES31: 1
   openGLRequireES31AEP: 0
   openGLRequireES32: 0
@@ -745,6 +737,7 @@ PlayerSettings:
   switchNetworkInterfaceManagerInitializeEnabled: 1
   switchPlayerConnectionEnabled: 1
   switchUseNewStyleFilepaths: 0
+  switchUseLegacyFmodPriorities: 1
   switchUseMicroSleepForYield: 1
   switchEnableRamDiskSupport: 0
   switchMicroSleepForYieldTime: 25
@@ -844,19 +837,20 @@ PlayerSettings:
   webGLLinkerTarget: 1
   webGLThreadsSupport: 0
   webGLDecompressionFallback: 0
+  webGLPowerPreference: 2
   scriptingDefineSymbols:
     Android: NETSTANDARD2_0;UNITY
     Server: NETSTANDARD2_0;UNITY
-    Standalone: NETSTANDARD2_0;UNITY;ENABLE_VIEW
+    Standalone: NETSTANDARD2_0;UNITY
     WebGL: NETSTANDARD2_0;UNITY
     iPhone: NETSTANDARD2_0;UNITY
   additionalCompilerArguments: {}
   platformArchitecture:
     iPhone: 1
   scriptingBackend:
-    Android: 0
+    Android: 1
     Server: 0
-    Standalone: 0
+    Standalone: 1
     iPhone: 1
   il2cppCompilerConfiguration: {}
   managedStrippingLevel: {}
@@ -865,6 +859,7 @@ PlayerSettings:
   allowUnsafeCode: 1
   useDeterministicCompilation: 1
   enableRoslynAnalyzers: 1
+  selectedPlatform: 0
   additionalIl2CppArgs: 
   scriptingRuntimeVersion: 1
   gcIncremental: 0
@@ -952,8 +947,9 @@ PlayerSettings:
   luminVersion:
     m_VersionCode: 1
     m_VersionName: 
-  apiCompatibilityLevel: 6
+  apiCompatibilityLevel: 3
   activeInputHandler: 0
+  windowsGamepadBackendHint: 0
   cloudProjectId: 
   framebufferDepthMemorylessMode: 0
   qualitySettingsNames: []

+ 2 - 2
Unity/ProjectSettings/ProjectVersion.txt

@@ -1,2 +1,2 @@
-m_EditorVersion: 2021.3.6f1
-m_EditorVersionWithRevision: 2021.3.6f1 (7da38d85baf6)
+m_EditorVersion: 2021.3.16f1
+m_EditorVersionWithRevision: 2021.3.16f1 (4016570cf34f)