Przeglądaj źródła

修复命名空间错误

tanghai 8 lat temu
rodzic
commit
25b5174a9f

+ 2 - 2
Unity/Assets/Scripts/Entity/Hotfix.cs

@@ -67,14 +67,14 @@ namespace ETModel
 				this.appDomain.LoadAssembly(fs, p, new Mono.Cecil.Pdb.PdbReaderProvider());
 			}
 
-			this.start = new ILStaticMethod(this.appDomain, "Hotfix.Init", "Start", 0);
+			this.start = new ILStaticMethod(this.appDomain, "ETHotfix.Init", "Start", 0);
 #else
 			GameObject code = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<GameObject>("code.unity3d", "Code");
 			byte[] assBytes = code.Get<TextAsset>("Hotfix.dll").bytes;
 			byte[] mdbBytes = code.Get<TextAsset>("Hotfix.mdb").bytes;
 			this.assembly = Assembly.Load(assBytes, mdbBytes);
 
-			Type hotfixInit = this.assembly.GetType("Hotfix.Init");
+			Type hotfixInit = this.assembly.GetType("ETHotfix.Init");
 			this.start = new MonoStaticMethod(hotfixInit, "Start");
 #endif
 			Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"code.unity3d");

+ 1 - 1
Unity/Hotfix/Module/Message/IMessage.cs

@@ -2,7 +2,7 @@
 
 namespace ETHotfix
 {
-	public partial class MessageObject
+	public class MessageObject
 	{
 	}
 

+ 4 - 7
Unity/Unity.csproj

@@ -12,15 +12,12 @@
     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
     <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
-    <TargetFrameworkProfile>
-    </TargetFrameworkProfile>
-    <CompilerResponseFile>
-    </CompilerResponseFile>
+    <TargetFrameworkProfile></TargetFrameworkProfile>
+    <CompilerResponseFile></CompilerResponseFile>
     <UnityProjectType>Game:1</UnityProjectType>
     <UnityBuildTarget>StandaloneWindows:5</UnityBuildTarget>
     <UnityVersion>2017.1.1p4</UnityVersion>
-    <RootNamespace>
-    </RootNamespace>
+    <RootNamespace></RootNamespace>
     <LangVersion>6</LangVersion>
   </PropertyGroup>
   <PropertyGroup>
@@ -683,4 +680,4 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
-</Project>
+</Project>