diff --git a/.github/workflows/rununitybuildmultiversion.yml b/.github/workflows/rununitybuildmultiversion.yml index ffd309c..ee228ee 100644 --- a/.github/workflows/rununitybuildmultiversion.yml +++ b/.github/workflows/rununitybuildmultiversion.yml @@ -52,17 +52,29 @@ jobs: unityVersion: 2021.3 build-target: WSAPlayer - os: windows - unityVersion: 2022.2 + unityVersion: 2022.3 build-target: Android - os: macOS - unityVersion: 2022.2 + unityVersion: 2022.3 build-target: iOS - os: windows - unityVersion: 2022.2 + unityVersion: 2022.3 build-target: StandaloneWindows64 - os: windows - unityVersion: 2022.2 + unityVersion: 2022.3 build-target: WSAPlayer + - os: windows + unityVersion: 2023.1 + build-target: Android + - os: macOS + unityVersion: 2023.1 + build-target: iOS + - os: windows + unityVersion: 2023.1 + build-target: StandaloneWindows64 + - os: windows + unityVersion: 2023.1 + build-target: WSAPlayer steps: - name: Script Version run: | diff --git a/Editor/CanvasGroupActivator.cs b/Editor/CanvasGroupActivator.cs index 5730bb6..cd71657 100644 --- a/Editor/CanvasGroupActivator.cs +++ b/Editor/CanvasGroupActivator.cs @@ -29,7 +29,11 @@ namespace UnityEngine.UI.Extensions void ObtainCanvasGroups() { +#if UNITY_2023_1_OR_NEWER + canvasGroups = GameObject.FindObjectsByType(FindObjectsSortMode.None); +#else canvasGroups = GameObject.FindObjectsOfType(); +#endif } void OnGUI() diff --git a/Editor/UIExtensionsMenuOptions.cs b/Editor/UIExtensionsMenuOptions.cs index 75711d6..ac4bbe4 100644 --- a/Editor/UIExtensionsMenuOptions.cs +++ b/Editor/UIExtensionsMenuOptions.cs @@ -159,7 +159,11 @@ namespace UnityEditor.UI private static void CreateEventSystem(bool select, GameObject parent) { +#if UNITY_2023_1_OR_NEWER + var esys = Object.FindFirstObjectByType(); +#else var esys = Object.FindObjectOfType(); +#endif if (esys == null) { var eventSystem = new GameObject("EventSystem"); @@ -191,7 +195,11 @@ namespace UnityEditor.UI return canvas.gameObject; // No canvas in selection or its parents? Then use just any canvas.. +#if UNITY_2023_1_OR_NEWER + canvas = Object.FindFirstObjectByType(); +#else canvas = Object.FindObjectOfType(typeof(Canvas)) as Canvas; +#endif if (canvas != null && canvas.gameObject.activeInHierarchy) return canvas.gameObject; @@ -1121,7 +1129,7 @@ namespace UnityEditor.UI mainButtonRT.anchorMin = Vector2.zero; mainButtonRT.anchorMax = Vector2.one; mainButtonRT.sizeDelta = Vector2.zero; - Events.UnityEventTools.AddBoolPersistentListener(mainButton.GetComponent