Преглед на файлове

修改启动到登陆过程的fps为30

大爷 преди 2 години
родител
ревизия
76e2d8bccb

+ 10 - 3
Unity/Assets/Scripts/Loader/MonoBehaviour/GlobalConfig.cs

@@ -9,11 +9,18 @@ namespace ET
         Server = 2,
         ClientServer = 3,
     }
-    
+
+    public enum FPS
+    {
+        Login = 30,
+        Main = 30
+    }
+
     [CreateAssetMenu(menuName = "ET/CreateGlobalConfig", fileName = "GlobalConfig", order = 0)]
     public class GlobalConfig: ScriptableObject
     {
-        public CodeMode CodeMode;
+        //client/server是否独立运行
+        public CodeMode CodeMode = CodeMode.ClientServer;
 
         [InfoBox("EditorSimulateMode: Editor模式\n\n" +
     "OfflinePlayMode: 加载本地ab:Unity/Assets/StreamingAssets/\n\n" +
@@ -21,7 +28,7 @@ namespace ET
     "下载地址为:\n$\"{host}/[android|ios|web|pc]/{version}\"")]
 
         [LabelText("AB资源模式")]
-        public YooAsset.YooAssets.EPlayMode PlayMode = YooAsset.YooAssets.EPlayMode.EditorSimulateMode;
+        public YooAsset.YooAssets.EPlayMode PlayMode = YooAsset.YooAssets.EPlayMode.HostPlayMode;
 
         [LabelText("AB版本{version}")]
         public string Version = "v0.0.1";

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

@@ -9,7 +9,7 @@ namespace ET
 {
 	public class Init: MonoBehaviour
 	{
-		private void Start()
+		private void Awake()
 		{
 			DontDestroyOnLoad(gameObject);
 #if UNITY_EDITOR
@@ -20,6 +20,8 @@ namespace ET
 				GameObject.Destroy(debugObj);
 			}
 #endif
+			//登陆过程限定帧率为30fps
+			Application.targetFrameRate = (int)FPS.Login;
 
 			AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
 			{

+ 1 - 0
Unity/Packages/manifest.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
+    "com.unity.2d.sprite": "1.0.0",
     "com.unity.ide.rider": "3.0.17",
     "com.unity.ide.visualstudio": "2.0.17",
     "com.unity.ide.vscode": "1.2.5",

+ 6 - 0
Unity/Packages/packages-lock.json

@@ -6,6 +6,12 @@
       "source": "embedded",
       "dependencies": {}
     },
+    "com.unity.2d.sprite": {
+      "version": "1.0.0",
+      "depth": 0,
+      "source": "builtin",
+      "dependencies": {}
+    },
     "com.unity.burst": {
       "version": "1.7.3",
       "depth": 1,

+ 8 - 8
Unity/ProjectSettings/ProjectSettings.asset

@@ -12,8 +12,8 @@ PlayerSettings:
   targetDevice: 2
   useOnDemandResources: 0
   accelerometerFrequency: 60
-  companyName: test
-  productName: ET
+  companyName: mojito
+  productName: StarEscort
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -145,7 +145,7 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 1.0
+  bundleVersion: 1.0.0
   preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
@@ -166,11 +166,11 @@ PlayerSettings:
   androidSupportedAspectRatio: 1
   androidMaxAspectRatio: 2.1
   applicationIdentifier:
-    Android: com.test.ET
-    Standalone: com.test.ET
-    Tizen: com.Company.ProductName
-    iPhone: com.test.ET
-    tvOS: com.Company.ProductName
+    Android: com.mojito.StarEscort
+    Standalone: com.mojito.StarEscort
+    Tizen: com.mojito.StarEscort
+    iPhone: com.mojito.StarEscort
+    tvOS: com.mojito.StarEscort
   buildNumber:
     Standalone: 0
     iPhone: 0