From e5842ea24356d1ab212b67bc6a0a902903728c9c Mon Sep 17 00:00:00 2001 From: BelicusBr Date: Mon, 30 Jan 2023 18:47:48 -0300 Subject: [PATCH] #Update-vs1.0.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.0.13] - 30/01/2023 ### Changed - Romoção de campos não utilizados. - Remoção de atribuições desnecessárias. - Transformando possiveis campos em `readonly`. --- CHANGELOG.md | 5 +++++ Editor/IGU/Attributes/IGUCustomDrawer.cs | 4 ++-- Editor/IGU/Attributes/IGUCustomFieldDrawer.cs | 2 +- Editor/IGU/Auxiliaries/IGUObjectDrawer.cs | 2 +- Editor/IGU/Auxiliaries/IGUPropertyDrawer.cs | 8 ++++---- Editor/IGU/IGUObjects/IGUComboBoxDraw.cs | 2 +- Editor/IGU/IGUObjects/IGUSelectionGridDraw.cs | 2 +- Editor/IGU/Values/IGUColorDraw.cs | 2 +- Editor/IGU/Values/IGUConfigDraw.cs | 2 +- Editor/IGU/Values/IGUContentDraw.cs | 3 +-- Editor/IGU/Values/IGUTextSettingsDraw.cs | 3 +-- Editor/IGU/Values/MarkedTextDraw.cs | 2 +- Editor/IGU/Values/MaxMinSliderDraw.cs | 2 +- Editor/IGU/Values/MaxMinSliderIntDraw.cs | 2 +- Runtime/IGU/Auxiliaries/HashCodeCompare.cs | 2 +- Runtime/IGU/Auxiliaries/IGUContainer.cs | 2 +- Runtime/IGU/Auxiliaries/IGUDrawer.cs | 9 +++++---- Runtime/IGU/IGUObjects/IGUButton.cs | 2 +- Runtime/IGU/IGUObjects/IGUHorizontalScrollbar.cs | 1 - Runtime/IGU/IGUObjects/IGUNumericBox.cs | 4 ++-- Runtime/IGU/IGUObjects/IGUNumericBoxInt.cs | 4 ++-- Runtime/IGU/IGUObjects/IGUSelectionGrid.cs | 2 +- Runtime/Resolution/CobilasResolutions.cs | 14 ++++++++------ com.cobilas.unity.graphics.gpack | 5 +++-- package.json | 2 +- 25 files changed, 47 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50ed4d4..2790fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## [1.0.13] - 30/01/2023 +### Changed +- Romoção de campos não utilizados. +- Remoção de atribuições desnecessárias. +- Transformando possiveis campos em `readonly`. ## [1.0.12] 09/01/2023 ### Change O corpo do método `public static Vector2Int GetBaseResolutionPlatform()` foi alterado. diff --git a/Editor/IGU/Attributes/IGUCustomDrawer.cs b/Editor/IGU/Attributes/IGUCustomDrawer.cs index 7cc0a5d..5a40018 100644 --- a/Editor/IGU/Attributes/IGUCustomDrawer.cs +++ b/Editor/IGU/Attributes/IGUCustomDrawer.cs @@ -3,8 +3,8 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] internal sealed class IGUCustomDrawerAttribute : Attribute { - private Type typeTarget; - private bool useForChildren; + private readonly Type typeTarget; + private readonly bool useForChildren; public Type TypeTarget => typeTarget; public bool UseForChildren => useForChildren; diff --git a/Editor/IGU/Attributes/IGUCustomFieldDrawer.cs b/Editor/IGU/Attributes/IGUCustomFieldDrawer.cs index a71430b..ae8bfbb 100644 --- a/Editor/IGU/Attributes/IGUCustomFieldDrawer.cs +++ b/Editor/IGU/Attributes/IGUCustomFieldDrawer.cs @@ -3,7 +3,7 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] internal sealed class IGUCustomFieldDrawerAttribute : Attribute { - private string targetField; + private readonly string targetField; public string TargetField => targetField; diff --git a/Editor/IGU/Auxiliaries/IGUObjectDrawer.cs b/Editor/IGU/Auxiliaries/IGUObjectDrawer.cs index 78ee09a..c025b4c 100644 --- a/Editor/IGU/Auxiliaries/IGUObjectDrawer.cs +++ b/Editor/IGU/Auxiliaries/IGUObjectDrawer.cs @@ -7,7 +7,7 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [CustomPropertyDrawer(typeof(IGUObject), true)] public class IGUObjectDrawer : PropertyDrawer { - private Dictionary pairs = new Dictionary(); + private readonly Dictionary pairs = new Dictionary(); public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { EditorGUI.BeginProperty(position, label, property); diff --git a/Editor/IGU/Auxiliaries/IGUPropertyDrawer.cs b/Editor/IGU/Auxiliaries/IGUPropertyDrawer.cs index 91fb125..8172468 100644 --- a/Editor/IGU/Auxiliaries/IGUPropertyDrawer.cs +++ b/Editor/IGU/Auxiliaries/IGUPropertyDrawer.cs @@ -8,10 +8,10 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { public static class IGUPropertyDrawer { public delegate void IGUPropertyDrawerCallback(Type type, IGUObjectPropertyDrawer drawer); - private static Dictionary list = new Dictionary(); - private static Dictionary listSubClass = new Dictionary(); - private static Dictionary listUseForChildren = new Dictionary(); - private static Dictionary listFieldDrawer = new Dictionary(); + private readonly static Dictionary list = new Dictionary(); + private readonly static Dictionary listSubClass = new Dictionary(); + private readonly static Dictionary listUseForChildren = new Dictionary(); + private readonly static Dictionary listFieldDrawer = new Dictionary(); [InitializeOnLoadMethod] private static void Init() { diff --git a/Editor/IGU/IGUObjects/IGUComboBoxDraw.cs b/Editor/IGU/IGUObjects/IGUComboBoxDraw.cs index 02073a9..872c535 100644 --- a/Editor/IGU/IGUObjects/IGUComboBoxDraw.cs +++ b/Editor/IGU/IGUObjects/IGUComboBoxDraw.cs @@ -9,7 +9,7 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [IGUCustomDrawer(typeof(IGUComboBox))] public class IGUComboBoxDraw : IGUObjectDraw { - private Dictionary SelectIndex = new Dictionary(); + private readonly Dictionary SelectIndex = new Dictionary(); protected override void IOnGUI(Rect position, SerializedObject serialized) => base.IOnGUI(position, serialized); diff --git a/Editor/IGU/IGUObjects/IGUSelectionGridDraw.cs b/Editor/IGU/IGUObjects/IGUSelectionGridDraw.cs index 213d3ee..1d10143 100644 --- a/Editor/IGU/IGUObjects/IGUSelectionGridDraw.cs +++ b/Editor/IGU/IGUObjects/IGUSelectionGridDraw.cs @@ -9,7 +9,7 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [IGUCustomDrawer(typeof(IGUSelectionGrid))] public class IGUSelectionGridDraw : IGUObjectDraw { - private Dictionary SelectIndex = new Dictionary(); + private readonly Dictionary SelectIndex = new Dictionary(); protected override void IOnGUI(Rect position, SerializedObject serialized) => base.IOnGUI(position, serialized); diff --git a/Editor/IGU/Values/IGUColorDraw.cs b/Editor/IGU/Values/IGUColorDraw.cs index 0882783..e729e6c 100644 --- a/Editor/IGU/Values/IGUColorDraw.cs +++ b/Editor/IGU/Values/IGUColorDraw.cs @@ -26,7 +26,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten EditorGUI.indentLevel++; color = EditorGUI.ColorField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("color"), color); textColor = EditorGUI.ColorField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("text color"), textColor); - backgroundColor = EditorGUI.ColorField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("background color"), backgroundColor); + backgroundColor = EditorGUI.ColorField(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("background color"), backgroundColor); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_color.colorValue = color; diff --git a/Editor/IGU/Values/IGUConfigDraw.cs b/Editor/IGU/Values/IGUConfigDraw.cs index e54ba3f..e5840fa 100644 --- a/Editor/IGU/Values/IGUConfigDraw.cs +++ b/Editor/IGU/Values/IGUConfigDraw.cs @@ -29,7 +29,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten isVisible = EditorGUI.Toggle(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("is visible"), isVisible); isEnabled = EditorGUI.Toggle(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("is enabled"), isEnabled); depth = EditorGUI.IntField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("depth"), depth); - MouseButtonType buttonType = (MouseButtonType)EditorGUI.EnumPopup(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("mouse type"), (MouseButtonType)mouseType); + MouseButtonType buttonType = (MouseButtonType)EditorGUI.EnumPopup(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("mouse type"), (MouseButtonType)mouseType); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_depth.intValue = depth; diff --git a/Editor/IGU/Values/IGUContentDraw.cs b/Editor/IGU/Values/IGUContentDraw.cs index daec195..a5a3c68 100644 --- a/Editor/IGU/Values/IGUContentDraw.cs +++ b/Editor/IGU/Values/IGUContentDraw.cs @@ -8,7 +8,6 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [CustomPropertyDrawer(typeof(IGUContent))] [IGUCustomFieldDrawer("#IGUContent")] public class IGUContentDraw : CPropertyDrawer { - private IGUContent content = new IGUContent(); public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { //foldout position.height = SingleLineHeight; @@ -30,7 +29,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten text = EditorGUI.TextField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("text"), text); image = ObjectField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("image"), image as Texture); if (hide_Tooltip) - tooltip = EditorGUI.TextField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("tooltip"), tooltip); + tooltip = EditorGUI.TextField(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("tooltip"), tooltip); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_text.stringValue = text; diff --git a/Editor/IGU/Values/IGUTextSettingsDraw.cs b/Editor/IGU/Values/IGUTextSettingsDraw.cs index e47db5b..9330385 100644 --- a/Editor/IGU/Values/IGUTextSettingsDraw.cs +++ b/Editor/IGU/Values/IGUTextSettingsDraw.cs @@ -8,7 +8,6 @@ namespace Cobilas.Unity.Editor.Graphics.IGU { [CustomPropertyDrawer(typeof(IGUTextSettings))] [IGUCustomFieldDrawer("#IGUTextSettings")] public class IGUTextSettingsDraw : CPropertyDrawer { - private IGUTextSettings settings = new IGUTextSettings(); public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { //foldout position.height = SingleLineHeight; @@ -33,7 +32,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten selectionColor = EditorGUI.ColorField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("selection color"), selectionColor); cursorFlashSpeed = EditorGUI.FloatField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("cursor flash speed"), cursorFlashSpeed); doubleClickSelectsWord = EditorGUI.Toggle(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("double click selects word"), doubleClickSelectsWord); - tripleClickSelectsLine = EditorGUI.Toggle(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("triple click selects line"), tripleClickSelectsLine); + tripleClickSelectsLine = EditorGUI.Toggle(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("triple click selects line"), tripleClickSelectsLine); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_cursorColor.colorValue = cursorColor; diff --git a/Editor/IGU/Values/MarkedTextDraw.cs b/Editor/IGU/Values/MarkedTextDraw.cs index 61c72ea..a13f8aa 100644 --- a/Editor/IGU/Values/MarkedTextDraw.cs +++ b/Editor/IGU/Values/MarkedTextDraw.cs @@ -29,7 +29,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten text = EditorGUI.TextField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("text"), text); textColor = EditorGUI.ColorField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("text color"), textColor); unchangeText = EditorGUI.Toggle(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("unchange text"), unchangeText); - fontStyle = (FontStyle)EditorGUI.EnumPopup(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("font style"), fontStyle); + fontStyle = (FontStyle)EditorGUI.EnumPopup(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("font style"), fontStyle); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_text.stringValue = text; diff --git a/Editor/IGU/Values/MaxMinSliderDraw.cs b/Editor/IGU/Values/MaxMinSliderDraw.cs index ae5ce34..ef41572 100644 --- a/Editor/IGU/Values/MaxMinSliderDraw.cs +++ b/Editor/IGU/Values/MaxMinSliderDraw.cs @@ -23,7 +23,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten EditorGUI.BeginChangeCheck(); EditorGUI.indentLevel++; min = EditorGUI.FloatField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("min"), min); - max = EditorGUI.FloatField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("max"), max); + max = EditorGUI.FloatField(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("max"), max); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_min.floatValue = min; diff --git a/Editor/IGU/Values/MaxMinSliderIntDraw.cs b/Editor/IGU/Values/MaxMinSliderIntDraw.cs index 056b335..913b056 100644 --- a/Editor/IGU/Values/MaxMinSliderIntDraw.cs +++ b/Editor/IGU/Values/MaxMinSliderIntDraw.cs @@ -22,7 +22,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten EditorGUI.BeginChangeCheck(); EditorGUI.indentLevel++; min = EditorGUI.IntField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("min"), min); - max = EditorGUI.IntField(position = MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("max"), max); + max = EditorGUI.IntField(MoveDownWithBlankSpace(position), IGUTextObject.GetGUIContentTemp("max"), max); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { prop_min.intValue = min; diff --git a/Runtime/IGU/Auxiliaries/HashCodeCompare.cs b/Runtime/IGU/Auxiliaries/HashCodeCompare.cs index a59b781..adaa53e 100644 --- a/Runtime/IGU/Auxiliaries/HashCodeCompare.cs +++ b/Runtime/IGU/Auxiliaries/HashCodeCompare.cs @@ -1,6 +1,6 @@ namespace Cobilas.Unity.Graphics.IGU { public sealed class HashCodeCompare { - private int[] list; + private readonly int[] list; public HashCodeCompare(int capacity) => list = new int[capacity]; diff --git a/Runtime/IGU/Auxiliaries/IGUContainer.cs b/Runtime/IGU/Auxiliaries/IGUContainer.cs index 4ce91df..0b6bb28 100644 --- a/Runtime/IGU/Auxiliaries/IGUContainer.cs +++ b/Runtime/IGU/Auxiliaries/IGUContainer.cs @@ -12,7 +12,7 @@ public class IGUContainer : IGUBehaviour, IIGUContainer, ISerializationCallbackR private bool wasDestroyed; private Action onIGU; private Action> alteredDepth; - private List AlteredDepthList = new List(); + private readonly List AlteredDepthList = new List(); void IIGUContainer.OnIGU() { onIGU?.Invoke(); diff --git a/Runtime/IGU/Auxiliaries/IGUDrawer.cs b/Runtime/IGU/Auxiliaries/IGUDrawer.cs index 528cdf1..dbf2f15 100644 --- a/Runtime/IGU/Auxiliaries/IGUDrawer.cs +++ b/Runtime/IGU/Auxiliaries/IGUDrawer.cs @@ -10,13 +10,14 @@ namespace Cobilas.Unity.Graphics.IGU { public class IGUDrawer : IGUBehaviour, ISerializationCallbackReceiver { private Action onIGU; private Coroutine EndOfFrameCoroutine = null; - private IGUToolTip toolTip = new IGUToolTip(); + private readonly IGUToolTip toolTip = new IGUToolTip(); [SerializeField] private IGUMouseInput[] mouses; [SerializeField] private IGUContainer[] containers; #if UNITY_EDITOR +#pragma warning disable IDE0052 [SerializeField, HideInInspector] private Vector2 editor_ScaleFactor; [SerializeField, HideInInspector] private Vector2Int editor_CurrentResolution; - +#pragma warning restore IDE0052 #endif private static IGUDrawer drawer; @@ -158,12 +159,12 @@ public static Vector2Int GetBaseResolutionPlatform() { private sealed class IGUToolTip { private string tooltip; - private GUIContent gUIContent; private bool close; private Vector2 position; private Vector2 scaleFactor; private GUIStyle style; private IGUColor color; + private readonly GUIContent gUIContent; public IGUToolTip() { color = IGUColor.DefaultBoxColor; @@ -188,7 +189,7 @@ public IGUToolTip() { public void Draw() { if (close) return; gUIContent.text = tooltip; - style = style == null ? GUI.skin.box : style; + style = style ?? GUI.skin.box; Vector2 size = style.CalcSize(gUIContent); Matrix4x4 oldMatrix = GUI.matrix; GUI.color = color.MyColor; diff --git a/Runtime/IGU/IGUObjects/IGUButton.cs b/Runtime/IGU/IGUObjects/IGUButton.cs index cf4c4f0..4eaa236 100644 --- a/Runtime/IGU/IGUObjects/IGUButton.cs +++ b/Runtime/IGU/IGUObjects/IGUButton.cs @@ -6,7 +6,7 @@ namespace Cobilas.Unity.Graphics.IGU.Elements { public class IGUButton : IGUTextObject, ISerializationCallbackReceiver { public const string DefaultContentIGUButton = "IGU Button"; - private List stackTraceCount = new List(); + private readonly List stackTraceCount = new List(); [SerializeField] protected bool[] clicked; [SerializeField] protected GUIStyle buttonStyle; [SerializeField] protected IGUOnClickEvent onClick; diff --git a/Runtime/IGU/IGUObjects/IGUHorizontalScrollbar.cs b/Runtime/IGU/IGUObjects/IGUHorizontalScrollbar.cs index 2722260..7711038 100644 --- a/Runtime/IGU/IGUObjects/IGUHorizontalScrollbar.cs +++ b/Runtime/IGU/IGUObjects/IGUHorizontalScrollbar.cs @@ -3,7 +3,6 @@ namespace Cobilas.Unity.Graphics.IGU.Elements { public class IGUHorizontalScrollbar : IGUSliderObject { - private float oldValue; [SerializeField] protected float scrollbarThumbSize; [SerializeField] protected IGUOnSliderValueEvent onModifiedScrollbar; [SerializeField] protected IGUOnSliderIntValueEvent onModifiedScrollbarInt; diff --git a/Runtime/IGU/IGUObjects/IGUNumericBox.cs b/Runtime/IGU/IGUObjects/IGUNumericBox.cs index cbd8dfc..f7ed516 100644 --- a/Runtime/IGU/IGUObjects/IGUNumericBox.cs +++ b/Runtime/IGU/IGUObjects/IGUNumericBox.cs @@ -75,8 +75,8 @@ public override void OnIGU() { } private void InitEvents() { - buttonLeft.OnClick.AddListener(() => { value = value - additionValue; }); - buttonRight.OnClick.AddListener(() => { value = value + additionValue; }); + buttonLeft.OnClick.AddListener(() => value -= additionValue); + buttonRight.OnClick.AddListener(() => value += additionValue); } void ISerializationCallbackReceiver.OnBeforeSerialize() { } diff --git a/Runtime/IGU/IGUObjects/IGUNumericBoxInt.cs b/Runtime/IGU/IGUObjects/IGUNumericBoxInt.cs index 85d56e2..9b6bc09 100644 --- a/Runtime/IGU/IGUObjects/IGUNumericBoxInt.cs +++ b/Runtime/IGU/IGUObjects/IGUNumericBoxInt.cs @@ -68,8 +68,8 @@ public override void OnIGU() { } private void InitEvents() { - buttonLeft.OnClick.AddListener(() => { value = value - additionValue; }); - buttonRight.OnClick.AddListener(() => { value = value + additionValue; }); + buttonLeft.OnClick.AddListener(() => value -= additionValue); + buttonRight.OnClick.AddListener(() => value += additionValue); } void ISerializationCallbackReceiver.OnBeforeSerialize() { } diff --git a/Runtime/IGU/IGUObjects/IGUSelectionGrid.cs b/Runtime/IGU/IGUObjects/IGUSelectionGrid.cs index 13a125b..7e33877 100644 --- a/Runtime/IGU/IGUObjects/IGUSelectionGrid.cs +++ b/Runtime/IGU/IGUObjects/IGUSelectionGrid.cs @@ -6,7 +6,7 @@ namespace Cobilas.Unity.Graphics.IGU.Elements { public class IGUSelectionGrid : IGUObject, ISerializationCallbackReceiver { - private HashCodeCompare compare = new HashCodeCompare(6); + private readonly HashCodeCompare compare = new HashCodeCompare(6); [SerializeField] protected int _xCount; [SerializeField] protected bool useTooltip; [SerializeField] protected Vector2 spacing; diff --git a/Runtime/Resolution/CobilasResolutions.cs b/Runtime/Resolution/CobilasResolutions.cs index ec39d98..972866b 100644 --- a/Runtime/Resolution/CobilasResolutions.cs +++ b/Runtime/Resolution/CobilasResolutions.cs @@ -74,7 +74,9 @@ void ISerializationCallbackReceiver.OnBeforeSerialize() { } //[CRIOLM_CallWhen(typeof(ContainerManager), CRIOLMType.AfterSceneLoad)] [CallWhenStart(InitializePriority.Low, "#ContainerManager")] +#pragma warning disable IDE0051 // Remover membros privados não utilizados private static void Init() { +#pragma warning restore IDE0051 // Remover membros privados não utilizados cb_resolutions = FindObjectOfType(); cb_resolutions.Internal_Refresh(); } @@ -132,12 +134,12 @@ private static bool ContainsFrequency(int frequency) { return false; } - private static bool ContainsAspectRatio(AspectRatio aspectRatio) { - for (int I = 0; I < ArrayManipulation.ArrayLength(cb_resolutions.aspectRatios); I++) - if (cb_resolutions.aspectRatios[I] == aspectRatio) - return true; - return false; - } + //private static bool ContainsAspectRatio(AspectRatio aspectRatio) { + // for (int I = 0; I < ArrayManipulation.ArrayLength(cb_resolutions.aspectRatios); I++) + // if (cb_resolutions.aspectRatios[I] == aspectRatio) + // return true; + // return false; + //} private static bool ContainsResolution(Resolution resolution) { for (int I = 0; I < ArrayManipulation.ArrayLength(cb_resolutions.resolutions); I++) diff --git a/com.cobilas.unity.graphics.gpack b/com.cobilas.unity.graphics.gpack index ad6b8af..52d861c 100644 --- a/com.cobilas.unity.graphics.gpack +++ b/com.cobilas.unity.graphics.gpack @@ -1,6 +1,6 @@ { "name": "com.cobilas.unity.graphics", - "version": "1.0.12", + "version": "1.0.13", "repository": "https://github.com/BelicusBr/com.cobilas.unity.graphics.git", "relatedPackages": [ "1.0.7", @@ -8,7 +8,8 @@ "1.0.9", "1.0.10", "1.0.11", - "1.0.12" + "1.0.12", + "1.0.13" ], "gitDependencies": [ { diff --git a/package.json b/package.json index c25acf9..b42d45a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.cobilas.unity.graphics", - "version": "1.0.12", + "version": "1.0.13", "displayName": "Cobilas Graphics", "description": "Pacote que adiciona e manipula elementos", "licensesUrl": "https://github.com/BelicusBr/com.cobilas.unity.graphics/blob/main/LICENSE.md",