From cd4163d9fe7f44558e1c1c03eca791d02237cfd5 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 19 Aug 2025 11:26:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0joycon=E6=89=8B=E6=9F=84?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Icons/DevicesIcons/SwitchJoyCon.png | Bin 0 -> 4090 bytes .../Icons/DevicesIcons/SwitchJoyCon.png.meta | 130 ++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png b/AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png new file mode 100644 index 0000000000000000000000000000000000000000..53cbfaeb30cab91cce352abd514425aba188ab1e GIT binary patch literal 4090 zcmcIn`9G9j-=7&{3>sz>*^McwWEr~=W-^L2M7EKLS?t1$os5$2$d(pMmJkXJAt5Rv zWJVNYt%xFJtGQbw^<2Ks_jNzd{RiAXoa;KD^Esd8dY|ij&ikYuw>yFmlNSSlKnNRa zq9gF`+iGwa@Z`AF76UIZ!|})=Q0;TYML>Z15=aCPs6I>lm$xt=i-ua086c3vldT4p z-g}e<82sh$O(9m7%11Z#Oy&-l=^qJu+$*&xtCi|9~qN+6Ai_M!RuhnT6awmnuy z`%}%-T@6S&q)V zF%IZ&4Qpe}4~A3eI7i~)e`WxZ8OD#v48>_{M@2*#9h>S_Wr zG#N1=Oz&vT5XP>591v*?O1OV0)Bj8edds1=&zT6O873mapNgY<(+zy6R0B;PZ#}9e z7EATk^rq@zHK}@fR3ihdu`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y_;v@>?N|+SqzPD{Cr4(6L+Z^pjIKbhFdMYAjQCye@J`yTE;uc zXi4k5^WBzMNkG0*@wxA|;0JM}cYVoc!{EFu4!m0+V3Z|D zSavzUs7fa@QF@6o*|nRSfuR?%#uB{t@_vL1ubnzy*DJqug$IFHmKzqZ-#57PggZyK OWE(3xV(p>R=l%zmnJbk5 literal 0 HcmV?d00001 diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta b/AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta new file mode 100644 index 00000000..4a2106ba --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 562e8ae4167d26b42b4dd08d3f809531 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: From a7807194ed75b19afc6f76f1343ca5b8de65423b Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 19 Aug 2025 11:27:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0SwitchJoyCon=E6=89=8B?= =?UTF-8?q?=E6=9F=84=E7=B1=BB=E5=9E=8B=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Devices/SwitchJoyCon_D.cs | 36 ++++++ .../Devices/SwitchJoyCon_D.cs.meta | 2 + .../InputResolver/InputSystemResolver.cs | 114 ++++++++++-------- 3 files changed, 101 insertions(+), 51 deletions(-) create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs new file mode 100644 index 00000000..4cd68be1 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs @@ -0,0 +1,36 @@ +using AxibugProtobuf; +using System.Collections; +using UnityEngine; + +namespace AxibugEmuOnline.Client.InputDevices +{ + public class SwitchJoyCon_D : InputDevice_D + { + public Button_C LeftSL; + public Button_C LeftSR; + public Button_C RightSL; + public Button_C RightSR; + + public Button_C B; + public Button_C A; + public Button_C Y; + public Button_C X; + + public Button_C Up; + public Button_C Down; + public Button_C Left; + public Button_C Right; + + public Button_C Minus; + public Button_C Plus; + + public Stick_C LeftStick; + public Stick_C RightStick; + public Button_C LeftStickPress; + public Button_C RightStickPress; + + public SwitchJoyCon_D(InputResolver resolver) : base(resolver) { } + + public override GamePadType PadType => GamePadType.SwitchJoyCon; + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta new file mode 100644 index 00000000..0fe358eb --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 28380f06191bd35458b20113fbd2960b \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs index daac33ba..15b9e85a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs @@ -1,8 +1,18 @@ #if ENABLE_INPUT_SYSTEM + +#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_WSA || PACKAGE_DOCS_GENERATION +#define DUALSHOCK_SUPPORT +#endif + +#if UNITY_EDITOR || UNITY_SWITCH || PACKAGE_DOCS_GENERATION +#define JOYCON_SUPPORT +#endif + using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.DualShock; +using UnityEngine.InputSystem.Switch; using UnityEngine.InputSystem.XInput; namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem @@ -24,25 +34,25 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem InputDevice_D newDevice = null; if (ipdev is Keyboard) newDevice = new Keyboard_D(this); - -#if UNITY_STANDALONE || UNITY_PS5 || UNITY_PS4 || UNITY_PS3 //PC/Mac/Linux/PS345 才能用 DualShock +#if DUALSHOCK_SUPPORT else if (ipdev is DualShockGamepad) { if (ipdev is DualShock3GamepadHID) newDevice = new DualShockController_D(this, ps3: true); else if (ipdev is DualShock4GamepadHID) newDevice = new DualShockController_D(this, ps4: true); else if (ipdev is DualSenseGamepadHID) newDevice = new DualShockController_D(this, ps5: true); else newDevice = new DualShockController_D(this); - } #endif - -#if UNITY_STANDALONE_WIN //仅Windows 才能用Xinput else if (ipdev is XInputController) { newDevice = new XboxController_D(this); } +#if JOYCON_SUPPORT + else if (ipdev is NPad) + { + newDevice = new SwitchJoyCon_D(this); + } #endif - else if (ipdev is Gamepad) newDevice = new GamePad_D(this); //注意Gamepad的优先级,因为任何手柄,Inputsystem中的基类都是GamePad if (newDevice != null) @@ -240,6 +250,7 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem mapper[keyboard_d.Semicolon] = ipKeyboard.semicolonKey; mapper[keyboard_d.Quote] = ipKeyboard.quoteKey; } +#if DUALSHOCK_SUPPORT else if (device_d is DualShockController_D ds_d) { var ipDsGamePad = ipdevice as DualShockGamepad; @@ -263,6 +274,7 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem mapper[ds_d.LeftStick] = ipDsGamePad.leftStick; mapper[ds_d.RightStick] = ipDsGamePad.rightStick; } +#endif else if (device_d is XboxController_D xbox_d) { var ipXInputGamePad = ipdevice as XInputController; @@ -284,53 +296,53 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem mapper[xbox_d.RightStickPress] = ipXInputGamePad.rightStickButton; mapper[xbox_d.LeftStick] = ipXInputGamePad.leftStick; mapper[xbox_d.RightStick] = ipXInputGamePad.rightStick; - } +#if JOYCON_SUPPORT + else if (device_d is SwitchJoyCon_D joycon_d) + { + var ipdevice_joycon = ipdevice as NPad; + mapper[joycon_d.LeftSL] = ipdevice_joycon.leftSL; + mapper[joycon_d.LeftSR] = ipdevice_joycon.leftSR; + mapper[joycon_d.RightSL] = ipdevice_joycon.rightSL; + mapper[joycon_d.RightSR] = ipdevice_joycon.rightSR; + mapper[joycon_d.B] = ipdevice_joycon.bButton; + mapper[joycon_d.A] = ipdevice_joycon.aButton; + mapper[joycon_d.Y] = ipdevice_joycon.yButton; + mapper[joycon_d.X] = ipdevice_joycon.xButton; + mapper[joycon_d.Up] = ipdevice_joycon.dpad.up; + mapper[joycon_d.Down] = ipdevice_joycon.dpad.down; + mapper[joycon_d.Left] = ipdevice_joycon.dpad.left; + mapper[joycon_d.Right] = ipdevice_joycon.dpad.right; + mapper[joycon_d.Minus] = ipdevice_joycon.selectButton; + mapper[joycon_d.Plus] = ipdevice_joycon.startButton; + mapper[joycon_d.LeftStick] = ipdevice_joycon.leftStick; + mapper[joycon_d.RightStick] = ipdevice_joycon.rightStick; + mapper[joycon_d.RightStickPress] = ipdevice_joycon.rightStickButton; + mapper[joycon_d.LeftStickPress] = ipdevice_joycon.leftStickButton; + } +#endif else if (device_d is GamePad_D gamepad_d) { - if (ipdevice is UnityEngine.InputSystem.Switch.NPad ipdevice_ns) - { - mapper[gamepad_d.Up] = ipdevice_ns.dpad.up; - mapper[gamepad_d.Down] = ipdevice_ns.dpad.down; - mapper[gamepad_d.Left] = ipdevice_ns.dpad.left; - mapper[gamepad_d.Right] = ipdevice_ns.dpad.right; - mapper[gamepad_d.Select] = ipdevice_ns.selectButton; - mapper[gamepad_d.Start] = ipdevice_ns.startButton; - mapper[gamepad_d.North] = ipdevice_ns.xButton; - mapper[gamepad_d.South] = ipdevice_ns.bButton; - mapper[gamepad_d.West] = ipdevice_ns.yButton; - mapper[gamepad_d.East] = ipdevice_ns.aButton; - mapper[gamepad_d.LeftShoulder] = ipdevice_ns; - mapper[gamepad_d.RightShoulder] = ipdevice_ns.rightShoulder; - mapper[gamepad_d.LeftTrigger] = ipdevice_ns.leftTrigger; - mapper[gamepad_d.RightTrigger] = ipdevice_ns.rightTrigger; - mapper[gamepad_d.LeftStickPress] = ipdevice_ns.leftStickButton; - mapper[gamepad_d.RightStickPress] = ipdevice_ns.rightStickButton; - mapper[gamepad_d.LeftStick] = ipdevice_ns.leftStick; - mapper[gamepad_d.RightStick] = ipdevice_ns.rightStick; - } - else - { - var ipGamepad = ipdevice as Gamepad; - mapper[gamepad_d.Up] = ipGamepad.dpad.up; - mapper[gamepad_d.Down] = ipGamepad.dpad.down; - mapper[gamepad_d.Left] = ipGamepad.dpad.left; - mapper[gamepad_d.Right] = ipGamepad.dpad.right; - mapper[gamepad_d.Select] = ipGamepad.selectButton; - mapper[gamepad_d.Start] = ipGamepad.startButton; - mapper[gamepad_d.North] = ipGamepad.buttonNorth; - mapper[gamepad_d.South] = ipGamepad.buttonSouth; - mapper[gamepad_d.West] = ipGamepad.buttonWest; - mapper[gamepad_d.East] = ipGamepad.buttonEast; - mapper[gamepad_d.LeftShoulder] = ipGamepad.leftShoulder; - mapper[gamepad_d.RightShoulder] = ipGamepad.rightShoulder; - mapper[gamepad_d.LeftTrigger] = ipGamepad.leftTrigger; - mapper[gamepad_d.RightTrigger] = ipGamepad.rightTrigger; - mapper[gamepad_d.LeftStickPress] = ipGamepad.leftStickButton; - mapper[gamepad_d.RightStickPress] = ipGamepad.rightStickButton; - mapper[gamepad_d.LeftStick] = ipGamepad.leftStick; - mapper[gamepad_d.RightStick] = ipGamepad.rightStick; - } + var ipGamepad = ipdevice as Gamepad; + mapper[gamepad_d.Up] = ipGamepad.dpad.up; + mapper[gamepad_d.Down] = ipGamepad.dpad.down; + mapper[gamepad_d.Left] = ipGamepad.dpad.left; + mapper[gamepad_d.Right] = ipGamepad.dpad.right; + mapper[gamepad_d.Select] = ipGamepad.selectButton; + mapper[gamepad_d.Start] = ipGamepad.startButton; + mapper[gamepad_d.North] = ipGamepad.buttonNorth; + mapper[gamepad_d.South] = ipGamepad.buttonSouth; + mapper[gamepad_d.West] = ipGamepad.buttonWest; + mapper[gamepad_d.East] = ipGamepad.buttonEast; + mapper[gamepad_d.LeftShoulder] = ipGamepad.leftShoulder; + mapper[gamepad_d.RightShoulder] = ipGamepad.rightShoulder; + mapper[gamepad_d.LeftTrigger] = ipGamepad.leftTrigger; + mapper[gamepad_d.RightTrigger] = ipGamepad.rightTrigger; + mapper[gamepad_d.LeftStickPress] = ipGamepad.leftStickButton; + mapper[gamepad_d.RightStickPress] = ipGamepad.rightStickButton; + mapper[gamepad_d.LeftStick] = ipGamepad.leftStick; + mapper[gamepad_d.RightStick] = ipGamepad.rightStick; + } else throw new System.NotImplementedException($"初始化设备失败,未实现的物理按键映射 for {device_d.GetType()}"); } @@ -339,6 +351,6 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem m_deviceMapper.Remove(keyboard_d); } } - } + #endif \ No newline at end of file From 1a526b10f6f458f64723bd35abf11ec0857795bd Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 19 Aug 2025 11:27:35 +0800 Subject: [PATCH 3/3] projectsetting --- .../ProjectSettings/ProjectSettings.asset | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset b/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset index 4bc25db1..05218d76 100644 --- a/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset +++ b/AxibugEmuOnline.Client/ProjectSettings/ProjectSettings.asset @@ -163,7 +163,7 @@ PlayerSettings: androidMaxAspectRatio: 2.1 androidMinAspectRatio: 1 applicationIdentifier: - Android: com.DefaultCompany.AxibugEmuOnline.Client + Android: com.AlienTechnology.AxibugEmuOnline.Client Standalone: com.AlienTechnology.AxibugEmuOnline.Client buildNumber: Standalone: 0 @@ -404,11 +404,13 @@ PlayerSettings: iPhone: 1 tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] - m_BuildTargetGroupHDRCubemapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetNormalMapEncoding: [] - m_BuildTargetDefaultTextureCompressionFormat: [] + m_BuildTargetDefaultTextureCompressionFormat: + - serializedVersion: 3 + m_BuildTarget: Android + m_Formats: 01000000 playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -668,12 +670,12 @@ PlayerSettings: webGLMemoryLinearGrowthStep: 16 webGLMemoryGeometricGrowthStep: 0.2 webGLMemoryGeometricGrowthCap: 96 + webGLEnableWebGPU: 0 webGLPowerPreference: 2 webGLWebAssemblyTable: 0 webGLWebAssemblyBigInt: 0 webGLCloseOnQuit: 0 webWasm2023: 0 - webEnableSubmoduleStrippingCompatibility: 0 scriptingDefineSymbols: Android: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY;UNITY_POST_PROCESSING_STACK_V2 EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 @@ -820,4 +822,3 @@ PlayerSettings: insecureHttpOption: 2 androidVulkanDenyFilterList: [] androidVulkanAllowFilterList: [] - androidVulkanDeviceFilterListAsset: {fileID: 0}