diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dacadd..fddb130 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,11 @@ name: Generate upm branches on: push: + branches: + - main tags: - v* + workflow_dispatch: env: MAIN_BRANCH: main diff --git a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs index b4e89a3..4ac03b9 100644 --- a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs +++ b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs @@ -15,6 +15,9 @@ using UnityEditor; using System.Reflection; using UnityEngine.Events; #endif +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif namespace Kirurobo { @@ -637,7 +640,11 @@ namespace Kirurobo /// private void HitTestByOpaquePixel() { +#if ENABLE_INPUT_SYSTEM + Vector2 mousePos = Mouse.current.position.ReadValue(); +#elif ENABLE_LEGACY_INPUT_MANAGER Vector2 mousePos = Input.mousePosition; +#endif // マウス座標を調べる if (GetOnOpaquePixel(mousePos)) @@ -701,7 +708,11 @@ namespace Kirurobo /// private void HitTestByRaycast() { - var position = Input.mousePosition; +#if ENABLE_INPUT_SYSTEM + Vector2 position = Mouse.current.position.ReadValue(); +#elif ENABLE_LEGACY_INPUT_MANAGER + Vector2 position = Input.mousePosition; +#endif // // uGUIの上か否かを判定 var raycastResults = new List(); diff --git a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs index 50a64cb..3eadbf7 100644 --- a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs +++ b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs @@ -10,6 +10,9 @@ using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.EventSystems; +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif namespace Kirurobo { @@ -147,9 +150,13 @@ namespace Kirurobo if (eventData.button != PointerEventData.InputButton.Left) return; // Return if any modifier key is pressed +#if ENABLE_INPUT_SYSTEM + if (Keyboard.current[Key.LeftShift].isPressed || Keyboard.current[Key.RightShift].isPressed || Keyboard.current[Key.LeftCtrl].isPressed || Keyboard.current[Key.RightCtrl].isPressed || Keyboard.current[Key.LeftAlt].isPressed || Keyboard.current[Key.RightAlt].isPressed) return; +#elif ENABLE_LEGACY_INPUT_MANAGER if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift) - || Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl) + || Input.GetKey(KeyCode.LeftCtrl) || Input.GetKey(KeyCode.RightCtrl) || Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) return; +#endif // フルスクリーンならウィンドウ移動は行わない // エディタだと true になってしまうようなので、エディタ以外でのみ確認 diff --git a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Unity.UniWindowController.asmdef b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Unity.UniWindowController.asmdef index b6df801..a679371 100644 --- a/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Unity.UniWindowController.asmdef +++ b/UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Unity.UniWindowController.asmdef @@ -1,7 +1,9 @@ { "name": "Unity.UniWindowController", - "references": [], - "optionalUnityReferences": [], + "rootNamespace": "", + "references": [ + "GUID:75469ad4d38634e559750d17036d5f7c" + ], "includePlatforms": [ "Editor", "macOSStandalone", @@ -13,5 +15,7 @@ "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, - "defineConstraints": [] + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false } \ No newline at end of file diff --git a/UniWinC/Assets/Kirurobo/UniWindowController/Samples/02_UiSample/UiSample.unity b/UniWinC/Assets/Kirurobo/UniWindowController/Samples/02_UiSample/UiSample.unity index ba2c96a..ee860c6 100644 --- a/UniWinC/Assets/Kirurobo/UniWindowController/Samples/02_UiSample/UiSample.unity +++ b/UniWinC/Assets/Kirurobo/UniWindowController/Samples/02_UiSample/UiSample.unity @@ -38,7 +38,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481676, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &4 LightmapSettings: @@ -891,7 +890,7 @@ GameObject: m_Component: - component: {fileID: 1909436763} - component: {fileID: 1909436762} - - component: {fileID: 1909436761} + - component: {fileID: 1909436764} m_Layer: 0 m_Name: EventSystem m_TagString: Untagged @@ -899,26 +898,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1909436761 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1909436760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 --- !u!114 &1909436762 MonoBehaviour: m_ObjectHideFlags: 0 @@ -949,6 +928,47 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1909436764 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1909436760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_MoveRepeatDelay: 0.5 + m_MoveRepeatRate: 0.1 + m_XRTrackingOrigin: {fileID: 0} + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_DeselectOnBackgroundClick: 1 + m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!1 &1923367064 GameObject: m_ObjectHideFlags: 0 diff --git a/UniWinC/Packages/manifest.json b/UniWinC/Packages/manifest.json index 4b94830..6722d22 100644 --- a/UniWinC/Packages/manifest.json +++ b/UniWinC/Packages/manifest.json @@ -1,7 +1,7 @@ { "dependencies": { - "com.unity.ai.navigation": "1.1.5", "com.unity.ide.visualstudio": "2.0.22", + "com.unity.inputsystem": "1.7.0", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/UniWinC/Packages/packages-lock.json b/UniWinC/Packages/packages-lock.json index 58361b6..197273a 100644 --- a/UniWinC/Packages/packages-lock.json +++ b/UniWinC/Packages/packages-lock.json @@ -1,14 +1,5 @@ { "dependencies": { - "com.unity.ai.navigation": { - "version": "1.1.5", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.ai": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 2, @@ -25,6 +16,15 @@ }, "url": "https://packages.unity.com" }, + "com.unity.inputsystem": { + "version": "1.7.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.test-framework": { "version": "1.1.33", "depth": 1, diff --git a/UniWinC/ProjectSettings/ProjectSettings.asset b/UniWinC/ProjectSettings/ProjectSettings.asset index e5b1e1c..90dcebe 100644 --- a/UniWinC/ProjectSettings/ProjectSettings.asset +++ b/UniWinC/ProjectSettings/ProjectSettings.asset @@ -137,8 +137,6 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - visionOSBundleVersion: 1.0 - tvOSBundleVersion: 1.0 bundleVersion: 0.9.4 preloadedAssets: [] metroInputSource: 0 @@ -233,6 +231,7 @@ PlayerSettings: iOSMetalForceHardShadows: 0 metalEditorSupport: 1 metalAPIValidation: 1 + metalCompileShaderBinary: 0 iOSRenderExtraFrameOnPause: 0 iosCopyPluginsCodeInsteadOfSymlink: 0 appleDeveloperTeamID: @@ -744,7 +743,7 @@ PlayerSettings: hmiLogStartupTiming: 0 hmiCpuConfiguration: apiCompatibilityLevel: 6 - activeInputHandler: 0 + activeInputHandler: 2 windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0