Procházet zdrojové kódy

vs15.4的bug,hotfix要直接引用ScriptAssemblies/Assembly-CSharp.dll ScriptAssemblies/Assembly-CSharp-firstpass.dll debug没有问题

tanghai před 8 roky
rodič
revize
61926a339b

+ 2 - 0
.gitignore

@@ -41,4 +41,6 @@ _ReSharper.CSharp/
 /Release
 /Release
 .idea/
 .idea/
 /Unity/Logs
 /Unity/Logs
+/Unity/Assets/StreamingAssets/
 /netcoreapp2.0
 /netcoreapp2.0
+/Unity/Assets/StreamingAssets.meta

+ 1 - 1
Unity/Assets/Scripts/Base/Log.cs

@@ -16,7 +16,7 @@ namespace Model
         private static string errorFileName = "/Log-Client-Error.txt";
         private static string errorFileName = "/Log-Client-Error.txt";
 		static Log()
 		static Log()
 		{
 		{
-            string dirPath =PathHelp.AppHotfixResPath + dirName;
+            string dirPath = PathHelp.AppHotfixResPath + dirName;
 			if (!Directory.Exists(dirPath))
 			if (!Directory.Exists(dirPath))
 			{
 			{
 				Directory.CreateDirectory(dirPath);
 				Directory.CreateDirectory(dirPath);

+ 4 - 4
Unity/Assets/Scripts/Helper/PathHelp.cs

@@ -17,7 +17,7 @@ namespace Model
                 string path = AppResPath;
                 string path = AppResPath;
                 if (Application.isMobilePlatform)
                 if (Application.isMobilePlatform)
                 {
                 {
-                    path = $"{Application.persistentDataPath} { "/"} {game} {"/"}";
+                    path = $"{Application.persistentDataPath}/{game}/";
                 }
                 }
                 return path;
                 return path;
             }
             }
@@ -35,13 +35,13 @@ namespace Model
                 switch (Application.platform)
                 switch (Application.platform)
                 {
                 {
                     case RuntimePlatform.Android:
                     case RuntimePlatform.Android:
-                        path = $"{"jar:file://"}{Application.dataPath}{"!!/assets/"}";
+                        path = $"jar:file://{Application.dataPath}!!/assets/";
                         break;
                         break;
                     case RuntimePlatform.IPhonePlayer:
                     case RuntimePlatform.IPhonePlayer:
-                        path = $"{Application.dataPath}{"/Raw/"}";
+                        path = $"{Application.dataPath}/Raw/";
                         break;
                         break;
                     default:
                     default:
-                        path = $"{Application.dataPath}{"/StreamingAssets/"}";
+                        path = $"{Application.dataPath}/StreamingAssets/";
                         break;
                         break;
                 }
                 }
                 return path;
                 return path;

+ 12 - 0
Unity/Assets/Scripts/Helper/PathHelp.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 17fbf19c32edc0e4e80e07c1e826710f
+timeCreated: 1508557211
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 10
Unity/Hotfix/Unity.Hotfix.csproj

@@ -35,6 +35,12 @@
     <Prefer32Bit>false</Prefer32Bit>
     <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>..\Library\ScriptAssemblies\Assembly-CSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\Library\ScriptAssemblies\Assembly-CSharp-firstpass.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />
     <Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
     <Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -91,16 +97,6 @@
     <Compile Include="UI\UILogin\Event\InitSceneStart_CreateLoginUI.cs" />
     <Compile Include="UI\UILogin\Event\InitSceneStart_CreateLoginUI.cs" />
     <Compile Include="UI\UILogin\Factory\UILoginFactory.cs" />
     <Compile Include="UI\UILogin\Factory\UILoginFactory.cs" />
   </ItemGroup>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\Unity.csproj">
-      <Project>{cf118143-7e37-744f-be45-3f55345fec40}</Project>
-      <Name>Unity</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\Unity.Plugins.csproj">
-      <Project>{d1fdb199-0fb7-099d-3771-c6a942e4e326}</Project>
-      <Name>Unity.Plugins</Name>
-    </ProjectReference>
-  </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Folder Include="Handler\" />
     <Folder Include="Handler\" />
   </ItemGroup>
   </ItemGroup>

+ 7 - 5
Unity/Unity.Editor.Plugins.csproj

@@ -119,17 +119,17 @@
     <Reference Include="ICSharpCode.SharpZipLib">
     <Reference Include="ICSharpCode.SharpZipLib">
       <HintPath>Assets\Plugins\ICSharpCode.SharpZipLib.dll</HintPath>
       <HintPath>Assets\Plugins\ICSharpCode.SharpZipLib.dll</HintPath>
     </Reference>
     </Reference>
+    <Reference Include="NPOI">
+      <HintPath>Assets\Plugins\Editor\npoi\NPOI.dll</HintPath>
+    </Reference>
     <Reference Include="NPOI.OOXML">
     <Reference Include="NPOI.OOXML">
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OOXML.dll</HintPath>
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OOXML.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="NPOI.OpenXmlFormats">
-      <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXmlFormats.dll</HintPath>
-    </Reference>
     <Reference Include="NPOI.OpenXml4Net">
     <Reference Include="NPOI.OpenXml4Net">
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXml4Net.dll</HintPath>
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXml4Net.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="NPOI">
-      <HintPath>Assets\Plugins\Editor\npoi\NPOI.dll</HintPath>
+    <Reference Include="NPOI.OpenXmlFormats">
+      <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXmlFormats.dll</HintPath>
     </Reference>
     </Reference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
@@ -148,6 +148,8 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Error.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Info.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />

+ 7 - 5
Unity/Unity.Editor.csproj

@@ -119,17 +119,17 @@
     <Reference Include="ICSharpCode.SharpZipLib">
     <Reference Include="ICSharpCode.SharpZipLib">
       <HintPath>Assets\Plugins\ICSharpCode.SharpZipLib.dll</HintPath>
       <HintPath>Assets\Plugins\ICSharpCode.SharpZipLib.dll</HintPath>
     </Reference>
     </Reference>
+    <Reference Include="NPOI">
+      <HintPath>Assets\Plugins\Editor\npoi\NPOI.dll</HintPath>
+    </Reference>
     <Reference Include="NPOI.OOXML">
     <Reference Include="NPOI.OOXML">
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OOXML.dll</HintPath>
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OOXML.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="NPOI.OpenXmlFormats">
-      <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXmlFormats.dll</HintPath>
-    </Reference>
     <Reference Include="NPOI.OpenXml4Net">
     <Reference Include="NPOI.OpenXml4Net">
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXml4Net.dll</HintPath>
       <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXml4Net.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="NPOI">
-      <HintPath>Assets\Plugins\Editor\npoi\NPOI.dll</HintPath>
+    <Reference Include="NPOI.OpenXmlFormats">
+      <HintPath>Assets\Plugins\Editor\npoi\NPOI.OpenXmlFormats.dll</HintPath>
     </Reference>
     </Reference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
@@ -194,6 +194,8 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Error.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Info.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />

+ 2 - 0
Unity/Unity.Plugins.csproj

@@ -496,6 +496,8 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Error.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Info.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />

+ 3 - 0
Unity/Unity.csproj

@@ -296,6 +296,7 @@
     <Compile Include="Assets\Scripts\Helper\GameObjectHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\GameObjectHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ILHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ILHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\MongoHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\MongoHelper.cs" />
+    <Compile Include="Assets\Scripts\Helper\PathHelp.cs" />
     <Compile Include="Assets\Scripts\Helper\PositionHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\PositionHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ResourceHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ResourceHelper.cs" />
     <Compile Include="Assets\Scripts\Init.cs" />
     <Compile Include="Assets\Scripts\Init.cs" />
@@ -562,6 +563,8 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Error.txt" />
+    <None Include="Assets\StreamingAssets\Logs\Log-Client-Info.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />