Pārlūkot izejas kodu

Options调用简化

tanghai 3 gadi atpakaļ
vecāks
revīzija
4fa0239ab1

+ 2 - 4
DotNet/App/Init.cs

@@ -20,12 +20,10 @@ namespace ET
 
 				
 				// 命令行参数
-				Options options = null;
 				Parser.Default.ParseArguments<Options>(args)
-						.WithNotParsed(error => throw new Exception($"命令行格式错误! {error}"))
-						.WithParsed(o => { options = o; });
+					.WithNotParsed(error => throw new Exception($"命令行格式错误! {error}"))
+					.WithParsed(Game.AddSingleton);
 				
-				Game.AddSingleton(options);
 				Game.AddSingleton<RandomGenerator>();
 				Game.AddSingleton<TimeInfo>();
 				Game.AddSingleton<Logger>().ILog = new NLogger(Options.Instance.AppType.ToString(), Options.Instance.Process, "../Config/NLog/NLog.config");

+ 2 - 4
Share/Tool/Init.cs

@@ -23,12 +23,10 @@ namespace ET.Server
                 SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);
 				
                 // 命令行参数
-                Options options = null;
                 Parser.Default.ParseArguments<Options>(args)
-                        .WithNotParsed(error => throw new Exception($"命令行格式错误! {error}"))
-                        .WithParsed(o => { options = o; });
+                    .WithNotParsed(error => throw new Exception($"命令行格式错误! {error}"))
+                    .WithParsed(Game.AddSingleton);
 				
-                Game.AddSingleton(options);
                 Game.AddSingleton<RandomGenerator>();
                 Game.AddSingleton<TimeInfo>();
                 Game.AddSingleton<Logger>().ILog = new NLogger(Options.Instance.AppType.ToString(), Options.Instance.Process, "../Config/NLog/NLog.config");

+ 1 - 3
Unity/Assets/Scripts/Mono/MonoBehaviour/Init.cs

@@ -25,13 +25,11 @@ namespace ET
 			SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);
 
 			// 命令行参数
-			Options options = null;
 			string[] args = "".Split(" ");
 			Parser.Default.ParseArguments<Options>(args)
 				.WithNotParsed(error => throw new Exception($"命令行格式错误! {error}"))
-				.WithParsed(o => { options = o; });
+				.WithParsed(Game.AddSingleton);
 			
-			Game.AddSingleton(options);
 			Game.AddSingleton<RandomGenerator>();
 			Game.AddSingleton<TimeInfo>();
 			Game.AddSingleton<Logger>().ILog = new UnityLogger();

+ 1 - 1
Unity/ProjectSettings/GraphicsSettings.asset

@@ -63,7 +63,7 @@ GraphicsSettings:
   m_FogKeepExp: 0
   m_FogKeepExp2: 0
   m_AlbedoSwatchInfos: []
-  m_LightsUseLinearIntensity: 0
+  m_LightsUseLinearIntensity: 1
   m_LightsUseColorTemperature: 1
   m_DefaultRenderingLayerMask: 1
   m_LogWhenShaderIsCompiled: 0

+ 6 - 6
Unity/ProjectSettings/ProjectSettings.asset

@@ -53,7 +53,7 @@ PlayerSettings:
   defaultScreenWidthWeb: 960
   defaultScreenHeightWeb: 600
   m_StereoRenderingPath: 0
-  m_ActiveColorSpace: 0
+  m_ActiveColorSpace: 1
   m_MTRendering: 1
   mipStripping: 0
   numberOfMipsStripped: 0
@@ -166,10 +166,10 @@ PlayerSettings:
   androidSupportedAspectRatio: 1
   androidMaxAspectRatio: 2.1
   applicationIdentifier:
-    Android: com.test.Unity
+    Android: com.test.ET
     Standalone: com.test.ET
     Tizen: com.Company.ProductName
-    iPhone: com.Company.ProductName
+    iPhone: com.test.ET
     tvOS: com.Company.ProductName
   buildNumber:
     Standalone: 0
@@ -519,7 +519,7 @@ PlayerSettings:
     m_GraphicsJobMode: 0
   m_BuildTargetGraphicsAPIs:
   - m_BuildTarget: AndroidPlayer
-    m_APIs: 08000000
+    m_APIs: 0b000000
     m_Automatic: 0
   - m_BuildTarget: iOSSupport
     m_APIs: 10000000
@@ -579,7 +579,7 @@ PlayerSettings:
   - m_BuildTarget: tvOS
     m_Enabled: 0
     m_Devices: []
-  openGLRequireES31: 0
+  openGLRequireES31: 1
   openGLRequireES31AEP: 0
   openGLRequireES32: 0
   m_TemplateCustomTags: {}
@@ -855,7 +855,7 @@ PlayerSettings:
     iPhone: 1
   scriptingBackend:
     Android: 0
-    Standalone: 1
+    Standalone: 0
     iPhone: 1
   il2cppCompilerConfiguration: {}
   managedStrippingLevel: {}