From bac3e514b6e28450b9ab1442d9d4292044dea975 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Wed, 25 Dec 2024 14:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=A4=E9=95=9C=E9=A2=84=E8=A7=88=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=82=E9=85=8D=E6=BB=A4=E9=95=9C=E6=9C=BA=E5=88=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Scene/AxibugEmuOnline.Client.unity | 64 ++++++++++++------- .../AppMain/Filter/UIFilterPreviewer.cs | 21 ++++++ .../AppMain/Filter/UIFilterPreviewer.cs.meta | 2 + 3 files changed, 64 insertions(+), 23 deletions(-) create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs.meta diff --git a/AxibugEmuOnline.Client/Assets/Scene/AxibugEmuOnline.Client.unity b/AxibugEmuOnline.Client/Assets/Scene/AxibugEmuOnline.Client.unity index 1fb969e..ae4dfb2 100644 --- a/AxibugEmuOnline.Client/Assets/Scene/AxibugEmuOnline.Client.unity +++ b/AxibugEmuOnline.Client/Assets/Scene/AxibugEmuOnline.Client.unity @@ -353,7 +353,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_SizeDelta.x - value: -0.97058296 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_SizeDelta.y @@ -389,7 +389,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.x - value: -0.48529053 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3} propertyPath: m_AnchoredPosition.y @@ -931,7 +931,8 @@ GameObject: m_Component: - component: {fileID: 802786939} - component: {fileID: 802786941} - - component: {fileID: 802786940} + - component: {fileID: 802786942} + - component: {fileID: 802786943} m_Layer: 5 m_Name: Image2 m_TagString: Untagged @@ -958,7 +959,15 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &802786940 +--- !u!222 &802786941 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 802786938} + m_CullTransparentMesh: 1 +--- !u!114 &802786942 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -967,7 +976,7 @@ MonoBehaviour: m_GameObject: {fileID: 802786938} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} @@ -978,24 +987,25 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: e043954733c440645ba43b09301ee4a6, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &802786941 -CanvasRenderer: + m_Texture: {fileID: 2800000, guid: e043954733c440645ba43b09301ee4a6, type: 3} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!114 &802786943 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 802786938} - m_CullTransparentMesh: 1 + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0987fcca76655248ac8defaffd1cb45, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!224 &939125854 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 3531919739338806919, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} @@ -1026,8 +1036,8 @@ RectTransform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1124446956} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10799.999} - m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1471857115} @@ -1035,10 +1045,10 @@ RectTransform: m_Father: {fileID: 1599240741} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 960.00006, y: 540} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1124446961 CanvasGroup: m_ObjectHideFlags: 0 @@ -2235,6 +2245,10 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 736530578155193984, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 935090267056593628, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -2727,6 +2741,10 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 8801936766261209235, guid: 1de15a80c8c1aa94486563740a15d91c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs new file mode 100644 index 0000000..8ba8837 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs @@ -0,0 +1,21 @@ +using AxibugEmuOnline.Client.ClientCore; +using UnityEngine; +using UnityEngine.UI; + +[RequireComponent(typeof(RawImage))] +public class UIFilterPreviewer : MonoBehaviour +{ + private RawImage m_rawImg; + private Texture m_src; + + private void Awake() + { + m_rawImg = GetComponent(); + m_src = m_rawImg.texture; + } + + private void Update() + { + m_rawImg.texture = App.filter.ExecuteFilterRender(m_src); + } +} diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs.meta new file mode 100644 index 0000000..8e6b7bd --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Filter/UIFilterPreviewer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a0987fcca76655248ac8defaffd1cb45 \ No newline at end of file