浏览代码

修复登录过程中的一些问题

大爷 2 年之前
父节点
当前提交
55a912ddc2

+ 2 - 2
DotNet/Hotfix/Demo/Scenes/Realm/Handler/C2R_LoginHandler.cs

@@ -41,13 +41,13 @@ namespace ET.Server
                 return;
             }
 
-            if (!Regex.IsMatch(request.Account.Trim(), @"^[a-zA-Z][a-zA-Z0-9_]{5,19}$"))
+            /*if (!Regex.IsMatch(request.Account.Trim(), @"^[a-zA-Z][a-zA-Z0-9_]{2,19}$"))
             {
                 Log.Debug($"用户名或密码格式错误");
                 response.Error = ErrorCode.ERR_UserNameOrPasswordFormatError;
                 reply();
                 return;
-            }
+            }*/
 
             UserInfo userInfo;
 

+ 5 - 1
FGUIProject/assets/Login/Login.xml

@@ -14,5 +14,9 @@
     <group id="n16_8ibs" name="Gro_LoginInfo" xy="6,838" size="888,489"/>
     <text id="n23_rwz6" name="Text_Version" xy="0,1213" size="865,343" fontSize="20" color="#ffffff" align="right" vAlign="bottom" autoSize="none" text="Version:1"/>
   </displayList>
-  <transition name="Tween_LoginPanelFlyIn" autoPlay="true"/>
+  <transition name="t1">
+    <item time="0" type="Pivot" target="n32_a12q" value="0.5,0.5"/>
+    <item time="0" type="Rotation" target="n32_a12q" value="0"/>
+    <item time="12" type="Rotation" target="n32_a12q" value="360"/>
+  </transition>
 </component>

+ 0 - 12
Unity/Assets/AssetBundleCollectorSetting.asset

@@ -124,15 +124,3 @@ MonoBehaviour:
       PackRuleName: PackDirectory
       FilterRuleName: CollectPrefab
       AssetTags: 
-  - GroupName: GameEditor
-    GroupDesc: "GameEditor\u5BFC\u51FA\u6570\u636E"
-    AssetTags: 
-    ActiveRuleName: EnableGroup
-    Collectors:
-    - CollectPath: Assets/Res/Skill
-      CollectorGUID: 876849b01c4d4f743ae7c5f8033ed2b2
-      CollectorType: 0
-      AddressRuleName: AddressByCollectorAndFileName
-      PackRuleName: PackDirectory
-      FilterRuleName: CollectGameEditorBin
-      AssetTags: 

+ 2 - 2
Unity/Assets/HybridCLRData/Generated/AOTGenericReferences.cs

@@ -2,7 +2,7 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
 {
 
 	// {{ constraint implement type
-	// }}
+	// }} 
 
 	// {{ AOT generic type
 	//Cysharp.Threading.Tasks.UniTask`1<System.Object>
@@ -277,4 +277,4 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
 		// System.Object UnityEngine.Object::Instantiate<System.Object>(System.Object,UnityEngine.Transform,System.Boolean)
 		// System.Object YooAsset.AssetOperationHandle::GetAssetObject<System.Object>()
 	}
-}
+}

+ 1 - 1
Unity/Assets/HybridCLRData/Generated/link.xml

@@ -333,4 +333,4 @@
     <type fullname="YooAsset.SceneOperationHandle" preserve="all" />
     <type fullname="YooAsset.YooAssetSettings" preserve="all" />
   </assembly>
-</linker>
+</linker>

+ 4 - 4
Unity/Assets/Plugins/Animancer/Internal/Core/SoloAnimation.cs

@@ -17,7 +17,7 @@ namespace Animancer
     /// <see href="https://kybernetik.com.au/animancer/docs/examples/fine-control/solo-animation">Solo Animation</see>
     /// </example>
     /// https://kybernetik.com.au/animancer/api/Animancer/SoloAnimation
-    ///
+    /// 
     [AddComponentMenu(Strings.MenuPrefix + "Solo Animation")]
     [DefaultExecutionOrder(DefaultExecutionOrder)]
     [HelpURL(Strings.DocsURLs.APIDocumentation + "/" + nameof(SoloAnimation))]
@@ -88,8 +88,8 @@ namespace Animancer
         /// </remarks>
         public bool StopOnDisable
         {
-            get => !_Animator.keepAnimatorStateOnDisable;
-            set => _Animator.keepAnimatorStateOnDisable = !value;
+            get => !_Animator.keepAnimatorControllerStateOnDisable;
+            set => _Animator.keepAnimatorControllerStateOnDisable = !value;
         }
 
         /************************************************************************************************************************/
@@ -367,7 +367,7 @@ namespace Animancer.Editor
 {
     /// <summary>[Editor-Only] A custom Inspector for <see cref="SoloAnimation"/>.</summary>
     /// https://kybernetik.com.au/animancer/api/Animancer.Editor/SoloAnimationEditor
-    ///
+    /// 
     [UnityEditor.CustomEditor(typeof(SoloAnimation)), UnityEditor.CanEditMultipleObjects]
     public class SoloAnimationEditor : UnityEditor.Editor
     {

二进制
Unity/Assets/Plugins/MacOS/x86_64/kcp.dll


+ 0 - 27
Unity/Assets/Plugins/MacOS/x86_64/kcp.dll.meta

@@ -1,27 +0,0 @@
-fileFormatVersion: 2
-guid: 58ae00e6e3b96448f9851f020088625a
-PluginImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  iconMap: {}
-  executionOrder: {}
-  defineConstraints: []
-  isPreloaded: 0
-  isOverridable: 0
-  isExplicitlyReferenced: 0
-  validateReferences: 1
-  platformData:
-  - first:
-      Any: 
-    second:
-      enabled: 1
-      settings: {}
-  - first:
-      Editor: Editor
-    second:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Unity/Assets/Res/FGUI/Login_fui.bytes


+ 5 - 4
Unity/Assets/Scripts/Codes/Hotfix/Client/Demo/Login/LoginHelper.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Net;
 using System.Net.Sockets;
 
@@ -52,8 +52,9 @@ namespace ET.Client
 
                 // 保存账号信息
                 clientScene.AddComponent<SessionComponent>().Session = gateSession;
-                clientScene.AddComponent<AccountInfoComponent>().Token = r2CLogin.Token;
-                clientScene.AddComponent<AccountInfoComponent>().UserId = r2CLogin.UserId;
+                var accountComponet = clientScene.AddComponent<AccountInfoComponent>();
+                accountComponet.Token = r2CLogin.Token;
+                accountComponet.UserId = r2CLogin.UserId;
 
                 Log.Debug($"登陆gate成功...token={r2CLogin.Token}, userId={r2CLogin.UserId}, playerId={g2CLoginGate.PlayerId}");
 
@@ -62,7 +63,7 @@ namespace ET.Client
             catch (Exception e)
             {
                 Log.Error($"登陆出错...{e.Message}");
-                await EventSystem.Instance.PublishAsync(clientScene, new EventType.LoginFinish() { exeception = e.Message });
+                return ErrorCode.ERR_LoginError;
             }
 
             return ErrorCode.ERR_Success;

+ 2 - 8
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILobby/LoginFinish_CreateLobbyUI.cs

@@ -9,12 +9,6 @@ namespace ET.Client
     {
         protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
         {
-            if (!args.exeception.IsNullOrWhitespace())
-            {
-                //登录过程出现了问题,这里不管
-                return;
-            }
-
             Log.Debug("enter lobby.");
             var view = await UIHelper.Create("Lobby");
             InitView(scene, view);
@@ -23,7 +17,7 @@ namespace ET.Client
         private void InitView(Scene scene, GComponent view)
         {
             var name = view.GetChild("userName");
-            var level = view.GetChild("User Level");
+            var level = view.GetChild("UserLevel");
             var gem = view.GetChild("txt_gem");
             var gold = view.GetChild("txt_gold");
             var point = view.GetChild("txt_point");
@@ -40,7 +34,7 @@ namespace ET.Client
                 EnterMapHelper.EnterMapAsync(scene).Coroutine();
             });
 
-            btn = view.GetChild("Btn_RoomMode");
+            btn = view.GetChild("Btn_PVE");
             btn.onClick.Add(() =>
             {
                 EnterMapHelper.EnterMapAsync(scene).Coroutine();

+ 32 - 5
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs

@@ -1,5 +1,6 @@
 using Cysharp.Threading.Tasks;
 using FairyGUI;
+using Sirenix.Utilities;
 using UnityEngine;
 
 namespace ET.Client
@@ -36,19 +37,45 @@ namespace ET.Client
             item.owner.SetItemAsset(item, tex.GetAsset<Texture>(), DestroyMethod.Unload);
         }
 
-
         private void InitLogin(Scene scene, GComponent view)
         {
             var account = view.GetChild("input_name");
             var password = view.GetChild("input_password");
             var btn = view.GetChild("Btn_Login");
-            btn.onClick.Add(() =>
+            btn.onClick.Add(async () =>
             {
-                view.GetChild("img_tips").visible = false;
-                view.GetChild("txt_tips").visible = false;
+                var imgtips = view.GetChild("img_tips");
+                var tips = view.GetChild("txt_tips");
+                tips.visible = false;
+                imgtips.visible = false;
+                if (account.text.IsNullOrWhitespace() || password.text.IsNullOrWhitespace())
+                {
+                    tips.visible = true;
+                    tips.text = "用户名或密码为空";
+                    return;
+                }
 
+                imgtips.visible = true;
                 btn.enabled = false;
-                LoginHelper.Login(scene, account.text, password.text).Coroutine();
+                var ret = await LoginHelper.Login(scene, account.text, password.text);
+                if (ret != ErrorCode.ERR_Success)
+                {
+                    imgtips.visible = false;
+                    tips.visible = true;
+                    btn.enabled = true;
+
+                    if (ret == ErrorCode.ERR_UserNameOrPasswordFormatError ||
+                    ret == ErrorCode.ERR_UserNameOrPasswordError)
+                    {
+                        tips.text = "用户名或密码错误";
+                    }
+                    else
+                    {
+                        tips.text = "连接服务器过程中出现了问题\n" +
+                                                "如重试后还是不行,请与客服联系" +
+                                                "\n[color=#FFCCCC][b]QQ: 400888666[/b][/color]  微信:[color=#FFCCCC][b]大老板[/color][/b]";
+                    }
+                }
             });
         }
     }

+ 0 - 21
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILogin/LoginFinish_RemoveLoginUI.cs

@@ -8,27 +8,6 @@ namespace ET.Client
     {
         protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
         {
-            if (!args.exeception.IsNullOrWhitespace())
-            {
-                var loginview = GRoot.inst.GetChild("Login");
-                if (loginview != null)
-                {
-                    var component = loginview.asCom;
-                    var tips = component.GetChild("txt_tips");
-                    tips.visible = true;
-                    tips.text = "连接服务器过程中出现了问题\n" +
-                        "如重试后还是不行,请与客服联系" +
-                        "\n[color=#FFCCCC][b]QQ: 400888666[/b][/color]  微信:[color=#FFCCCC][b]大老板[/color][/b]";
-                    component.GetChild("img_tips").visible = false;
-                    component.GetChild("Btn_Login").enabled = true;
-                }
-                else
-                {
-                    Log.Error("not found login view @login error");
-                }
-                return;
-            }
-
             await TimerComponent.Instance.WaitAsync(1000);
             GRoot.inst.RemoveChildAt(0, true);
             UIPackage.RemovePackage("Login");

+ 2 - 4
Unity/Assets/Scripts/Codes/Model/Share/Demo/EventType.cs

@@ -8,13 +8,11 @@
         public struct AfterCreateClientScene { }
         public struct AfterCreateCurrentScene { }
         public struct AppStartInitFinish { }
-        public struct LoginFinish {
-            public string exeception;
-        }
+        public struct LoginFinish { }
         public struct EnterMapFinish { }
         public struct AfterUnitCreate
         {
             public Unit Unit;
         }
     }
-}
+}

+ 1 - 1
Unity/Packages/manifest.json

@@ -4,7 +4,7 @@
     "com.unity.ide.rider": "3.0.18",
     "com.unity.ide.visualstudio": "2.0.17",
     "com.unity.ide.vscode": "1.2.5",
-    "com.unity.render-pipelines.universal": "12.1.10",
+    "com.unity.render-pipelines.universal": "12.1.8",
     "com.unity.scriptablebuildpipeline": "1.20.2",
     "com.unity.textmeshpro": "3.0.6",
     "com.unity.timeline": "1.7.1",

+ 19 - 19
Unity/Packages/packages-lock.json

@@ -36,20 +36,20 @@
       "dependencies": {}
     },
     "com.unity.burst": {
-      "version": "1.8.2",
+      "version": "1.7.3",
       "depth": 1,
       "source": "registry",
       "dependencies": {
         "com.unity.mathematics": "1.2.1"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.ext.nunit": {
       "version": "1.0.6",
       "depth": 1,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.ide.rider": {
       "version": "3.0.18",
@@ -58,7 +58,7 @@
       "dependencies": {
         "com.unity.ext.nunit": "1.0.6"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.ide.visualstudio": {
       "version": "2.0.17",
@@ -67,24 +67,24 @@
       "dependencies": {
         "com.unity.test-framework": "1.1.9"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.ide.vscode": {
       "version": "1.2.5",
       "depth": 0,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.mathematics": {
       "version": "1.2.6",
       "depth": 1,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.render-pipelines.core": {
-      "version": "12.1.10",
+      "version": "12.1.8",
       "depth": 1,
       "source": "builtin",
       "dependencies": {
@@ -94,14 +94,14 @@
       }
     },
     "com.unity.render-pipelines.universal": {
-      "version": "12.1.10",
+      "version": "12.1.8",
       "depth": 0,
       "source": "builtin",
       "dependencies": {
         "com.unity.mathematics": "1.2.1",
-        "com.unity.burst": "1.8.2",
-        "com.unity.render-pipelines.core": "12.1.10",
-        "com.unity.shadergraph": "12.1.10"
+        "com.unity.burst": "1.7.3",
+        "com.unity.render-pipelines.core": "12.1.8",
+        "com.unity.shadergraph": "12.1.8"
       }
     },
     "com.unity.scriptablebuildpipeline": {
@@ -109,21 +109,21 @@
       "depth": 0,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.searcher": {
       "version": "4.9.1",
       "depth": 2,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.shadergraph": {
-      "version": "12.1.10",
+      "version": "12.1.8",
       "depth": 1,
       "source": "builtin",
       "dependencies": {
-        "com.unity.render-pipelines.core": "12.1.10",
+        "com.unity.render-pipelines.core": "12.1.8",
         "com.unity.searcher": "4.9.1"
       }
     },
@@ -136,7 +136,7 @@
         "com.unity.modules.imgui": "1.0.0",
         "com.unity.modules.jsonserialize": "1.0.0"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.textmeshpro": {
       "version": "3.0.6",
@@ -145,7 +145,7 @@
       "dependencies": {
         "com.unity.ugui": "1.0.0"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.timeline": {
       "version": "1.7.1",
@@ -157,7 +157,7 @@
         "com.unity.modules.audio": "1.0.0",
         "com.unity.modules.particlesystem": "1.0.0"
       },
-      "url": "https://packages.unity.com"
+      "url": "https://packages.unity.cn"
     },
     "com.unity.ugui": {
       "version": "1.0.0",

+ 8 - 8
Unity/ProjectSettings/PackageManagerSettings.asset

@@ -10,8 +10,8 @@ MonoBehaviour:
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
-  m_Name:
-  m_EditorClassIdentifier:
+  m_Name: 
+  m_EditorClassIdentifier: 
   m_EnablePreReleasePackages: 0
   m_EnablePackageDependencies: 1
   m_AdvancedSettingsExpanded: 1
@@ -20,17 +20,17 @@ MonoBehaviour:
   oneTimeWarningShown: 1
   m_Registries:
   - m_Id: main
-    m_Name:
-    m_Url: https://packages.unity.com
+    m_Name: 
+    m_Url: https://packages.unity.cn
     m_Scopes: []
     m_IsDefault: 1
     m_Capabilities: 7
     m_ConfigSource: 0
-  m_UserSelectedRegistryName:
+  m_UserSelectedRegistryName: 
   m_UserAddingNewScopedRegistry: 0
   m_RegistryInfoDraft:
     m_Modified: 0
-    m_ErrorMessage:
-    m_UserModificationsInstanceId: -826
-    m_OriginalInstanceId: -828
+    m_ErrorMessage: 
+    m_UserModificationsInstanceId: -852
+    m_OriginalInstanceId: -854
   m_LoadAssets: 0

+ 2 - 2
Unity/ProjectSettings/ProjectVersion.txt

@@ -1,2 +1,2 @@
-m_EditorVersion: 2021.3.18f1
-m_EditorVersionWithRevision: 2021.3.18f1 (3129e69bc0c7)
+m_EditorVersion: 2021.3.15f1c1
+m_EditorVersionWithRevision: 2021.3.15f1c1 (080beb55ecda)