Przeglądaj źródła

修复exe UI显示不了的问题(相机参数问题,删除一个默认的UICamera)

大爷 2 lat temu
rodzic
commit
7b525fe1c8

+ 3 - 122
Unity/Assets/Scenes/Init.unity

@@ -152,7 +152,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 575235020}
-  m_RootOrder: 3
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1001 &330417905
 PrefabInstance:
@@ -505,7 +505,6 @@ Transform:
   m_Children:
   - {fileID: 1184451147}
   - {fileID: 1984349697}
-  - {fileID: 1521946826}
   - {fileID: 160894183}
   - {fileID: 1270058932}
   m_Father: {fileID: 0}
@@ -827,7 +826,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 575235020}
-  m_RootOrder: 4
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!82 &1270058933
 AudioSource:
@@ -938,124 +937,6 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   Source: {fileID: 1270058933}
---- !u!1 &1521946825
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1521946826}
-  - component: {fileID: 1521946829}
-  - component: {fileID: 1521946828}
-  - component: {fileID: 1521946827}
-  m_Layer: 0
-  m_Name: UICamera
-  m_TagString: MainCamera
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!4 &1521946826
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1521946825}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children: []
-  m_Father: {fileID: 575235020}
-  m_RootOrder: 2
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &1521946827
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1521946825}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_RenderShadows: 0
-  m_RequiresDepthTextureOption: 2
-  m_RequiresOpaqueTextureOption: 2
-  m_CameraType: 0
-  m_Cameras: []
-  m_RendererIndex: -1
-  m_VolumeLayerMask:
-    serializedVersion: 2
-    m_Bits: 1
-  m_VolumeTrigger: {fileID: 0}
-  m_VolumeFrameworkUpdateModeOption: 2
-  m_RenderPostProcessing: 0
-  m_Antialiasing: 0
-  m_AntialiasingQuality: 2
-  m_StopNaN: 0
-  m_Dithering: 0
-  m_ClearDepth: 1
-  m_AllowXRRendering: 1
-  m_RequiresDepthTexture: 0
-  m_RequiresColorTexture: 0
-  m_Version: 2
---- !u!81 &1521946828
-AudioListener:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1521946825}
-  m_Enabled: 1
---- !u!20 &1521946829
-Camera:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1521946825}
-  m_Enabled: 1
-  serializedVersion: 2
-  m_ClearFlags: 1
-  m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
-  m_projectionMatrixMode: 1
-  m_GateFitMode: 2
-  m_FOVAxisMode: 0
-  m_SensorSize: {x: 36, y: 24}
-  m_LensShift: {x: 0, y: 0}
-  m_FocalLength: 50
-  m_NormalizedViewPortRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
-  near clip plane: 0.3
-  far clip plane: 1000
-  field of view: 60
-  orthographic: 1
-  orthographic size: 5
-  m_Depth: 0
-  m_CullingMask:
-    serializedVersion: 2
-    m_Bits: 32
-  m_RenderingPath: -1
-  m_TargetTexture: {fileID: 0}
-  m_TargetDisplay: 0
-  m_TargetEye: 3
-  m_HDR: 1
-  m_AllowMSAA: 1
-  m_AllowDynamicResolution: 0
-  m_ForceIntoRT: 0
-  m_OcclusionCulling: 1
-  m_StereoConvergence: 10
-  m_StereoSeparation: 0.022
 --- !u!850595691 &1972482029
 LightingSettings:
   m_ObjectHideFlags: 0
@@ -1174,7 +1055,7 @@ MonoBehaviour:
     m_Bits: 1
   m_VolumeTrigger: {fileID: 0}
   m_VolumeFrameworkUpdateModeOption: 2
-  m_RenderPostProcessing: 0
+  m_RenderPostProcessing: 1
   m_Antialiasing: 0
   m_AntialiasingQuality: 2
   m_StopNaN: 0

+ 1 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Global/GlobalViewMgr.cs

@@ -14,7 +14,7 @@ namespace ET.Client
             self.RecycleNode = GameObject.Find("/Global/RecycleNode").transform;
 
             self.BattleCamera = GameObject.Find("/Global/BattleCamera").GetComponent<Camera>();
-            self.UICamera = GameObject.Find("/Global/UICamera").GetComponent<Camera>();
+            //self.UICamera = GameObject.Find("/Global/UICamera").GetComponent<Camera>();
         }
     }
 }

+ 1 - 19
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs

@@ -11,11 +11,7 @@ namespace ET.Client
         protected override async ETTask Run(Scene scene, EventType.AppStartInitFinish args)
         {
             Log.Debug("to load login ui.");
-            var ass = await YooAssetProxy.LoadAssetAsync<TextAsset>("FGUI_Login_fui");
-            UIPackage.AddPackage(ass.GetAssetObject<TextAsset>().bytes, "Login", LoadPackageInternalAsync);
-            var view = UIPackage.CreateObject("Login", "Login").asCom;
-            view.name = "Login";
-            GRoot.inst.AddChild(view);
+            var view = await UIHelper.Create("Login");
             InitLogin(scene, view);
 
             var preView = GRoot.inst.GetChildAt(0);
@@ -23,20 +19,6 @@ namespace ET.Client
             UIPackage.RemovePackage("CheckForResUpdate");
         }
 
-        /// <summary>
-        /// 加载资源的异步委托
-        /// </summary>
-        /// <param name="name">注意,这个name是FGUI内部组装的纹理全名,例如FUILogin_atlas0</param>
-        /// <param name="extension"></param>
-        /// <param name="type"></param>
-        /// <param name="item"></param>
-        private static async void LoadPackageInternalAsync(string name,
-            string extension, System.Type type, PackageItem item)
-        {
-            var tex = await YooAssetProxy.LoadAssetAsync<Texture>($"FGUI_{name}");
-            item.owner.SetItemAsset(item, tex.GetAsset<Texture>(), DestroyMethod.Unload);
-        }
-
         private void InitLogin(Scene scene, GComponent view)
         {
             var account = view.GetChild("input_name");

+ 1 - 1
Unity/Assets/Scripts/Codes/ModelView/Client/Global/GlobalViewComponent.cs

@@ -8,7 +8,7 @@ namespace ET.Client
         [StaticField]
         public static GlobalViewComponent Instance;
 
-        public Camera UICamera;
+        //public Camera UICamera;
         public Camera BattleCamera;
         public Transform Global;
         public Transform Unit { get; set; }