From eae0014efb814fb0fbebc6d8c2474050465369c6 Mon Sep 17 00:00:00 2001 From: CoderGamester Date: Mon, 4 Nov 2024 01:17:29 +0000 Subject: [PATCH] **Fixed**: - Fixed the issue that would crash *NonDrawingView* if the *GameObject* would be missing a *CanvasRenderer* --- CHANGELOG.md | 4 ++++ Editor/NonDrawingViewEditor.cs | 2 +- Runtime/NonDrawingView.cs | 4 +++- Runtime/SafeAreaHelperView.cs | 2 +- package.json | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b76404..e104e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## [0.9.1] - 2024-11-04 + +**Fixed**: +- Fixed the issue that would crash *NonDrawingView* if the *GameObject* would be missing a *CanvasRenderer* ## [0.9.0] - 2024-11-01 diff --git a/Editor/NonDrawingViewEditor.cs b/Editor/NonDrawingViewEditor.cs index 17efc09..f6fdc62 100644 --- a/Editor/NonDrawingViewEditor.cs +++ b/Editor/NonDrawingViewEditor.cs @@ -1,4 +1,4 @@ -using FirstLight.UiService; +using GameLovers.UiService; using UnityEditor; using UnityEditor.UI; using UnityEngine; diff --git a/Runtime/NonDrawingView.cs b/Runtime/NonDrawingView.cs index cbf7e18..55ed8f9 100644 --- a/Runtime/NonDrawingView.cs +++ b/Runtime/NonDrawingView.cs @@ -1,13 +1,15 @@ +using UnityEngine; using UnityEngine.UI; // ReSharper disable CheckNamespace -namespace FirstLight.UiService +namespace GameLovers.UiService { /// /// A concrete subclass of the Unity UI `Graphic` class that just skips drawing. /// Useful for providing a raycast target without actually drawing anything. /// + [RequireComponent(typeof(CanvasRenderer))] public class NonDrawingView : Graphic { public override void SetMaterialDirty() { } diff --git a/Runtime/SafeAreaHelperView.cs b/Runtime/SafeAreaHelperView.cs index 3efeae8..14f473f 100644 --- a/Runtime/SafeAreaHelperView.cs +++ b/Runtime/SafeAreaHelperView.cs @@ -4,7 +4,7 @@ // ReSharper disable CheckNamespace -namespace FirstLight.UiService +namespace GameLovers.UiService { /// /// This view helper translate anchored views based on device safe area (screens witch a notch) diff --git a/package.json b/package.json index 0b8e80d..1a142ba 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.gamelovers.uiservice", "displayName": "UiService", "author": "Miguel Tomas", - "version": "0.9.0", + "version": "0.9.1", "unity": "2022.3", "license": "MIT", "description": "This package provides a service to help manage an Unity's, game UI.\nIt allows to open, close, load, unload and request any Ui Configured in the game.\nThe package provides a Ui Set that allows to group a set of Ui Presenters to help load, open and close multiple Uis at the same time.\n\nTo help configure the game's UI you need to create a UiConfigs Scriptable object by:\n- Right Click on the Project View > Create > ScriptableObjects > Configs > UiConfigs",