From ad59523369ca7dd5d273de37f464b932246794fa Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Mon, 11 May 2020 11:47:31 +0900 Subject: [PATCH] change: change namespace BREAKING CHANGE: If your code contained the SoftMask API, it would fail to compile. Please change the namespace from `Coffee.UIExtensions` to `Coffee.UISoftMask`. --- .../SoftMaskForUGUI/Samples/Demo/SoftMask_Demo.cs | 2 +- .../Scripts/Editor/{Utils.cs => EditorUtils.cs} | 8 ++++---- .../Editor/{Utils.cs.meta => EditorUtils.cs.meta} | 0 .../Scripts/Editor/ImportSampleMenu.cs | 4 ++-- .../SoftMaskForUGUI/Scripts/Editor/SoftMaskEditor.cs | 8 ++++---- .../Scripts/Editor/SoftMaskableEditor.cs | 12 ++++++------ Packages/SoftMaskForUGUI/Scripts/GraphicConnector.cs | 2 +- Packages/SoftMaskForUGUI/Scripts/MaterialCache.cs | 2 +- Packages/SoftMaskForUGUI/Scripts/SoftMask.cs | 2 +- Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) rename Packages/SoftMaskForUGUI/Scripts/Editor/{Utils.cs => EditorUtils.cs} (80%) rename Packages/SoftMaskForUGUI/Scripts/Editor/{Utils.cs.meta => EditorUtils.cs.meta} (100%) diff --git a/Packages/SoftMaskForUGUI/Samples/Demo/SoftMask_Demo.cs b/Packages/SoftMaskForUGUI/Samples/Demo/SoftMask_Demo.cs index 5b585e7..f88c5da 100644 --- a/Packages/SoftMaskForUGUI/Samples/Demo/SoftMask_Demo.cs +++ b/Packages/SoftMaskForUGUI/Samples/Demo/SoftMask_Demo.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEngine.UI; -namespace Coffee.UIExtensions.Demos +namespace Coffee.UISoftMask.Demos { public class SoftMask_Demo : MonoBehaviour { diff --git a/Packages/SoftMaskForUGUI/Scripts/Editor/Utils.cs b/Packages/SoftMaskForUGUI/Scripts/Editor/EditorUtils.cs similarity index 80% rename from Packages/SoftMaskForUGUI/Scripts/Editor/Utils.cs rename to Packages/SoftMaskForUGUI/Scripts/Editor/EditorUtils.cs index 3dcaea8..4c5df6c 100644 --- a/Packages/SoftMaskForUGUI/Scripts/Editor/Utils.cs +++ b/Packages/SoftMaskForUGUI/Scripts/Editor/EditorUtils.cs @@ -4,19 +4,19 @@ using UnityEditor.SceneManagement; -namespace Coffee.UIExtensions.Editors +namespace Coffee.UISoftMask { - public static class Utils + public static class EditorUtils { public static void MarkPrefabDirty () { #if UNITY_2018_3_OR_NEWER var prefabStage = PrefabStageUtility.GetCurrentPrefabStage (); - if (prefabStage != null) + if (prefabStage != null) { EditorSceneManager.MarkSceneDirty (prefabStage.scene); } #endif } } -} \ No newline at end of file +} diff --git a/Packages/SoftMaskForUGUI/Scripts/Editor/Utils.cs.meta b/Packages/SoftMaskForUGUI/Scripts/Editor/EditorUtils.cs.meta similarity index 100% rename from Packages/SoftMaskForUGUI/Scripts/Editor/Utils.cs.meta rename to Packages/SoftMaskForUGUI/Scripts/Editor/EditorUtils.cs.meta diff --git a/Packages/SoftMaskForUGUI/Scripts/Editor/ImportSampleMenu.cs b/Packages/SoftMaskForUGUI/Scripts/Editor/ImportSampleMenu.cs index 78db652..c61a9d1 100644 --- a/Packages/SoftMaskForUGUI/Scripts/Editor/ImportSampleMenu.cs +++ b/Packages/SoftMaskForUGUI/Scripts/Editor/ImportSampleMenu.cs @@ -4,9 +4,9 @@ using System.Text.RegularExpressions; using UnityEditor; -namespace Coffee.UIExtensions +namespace Coffee.UISoftMask { - public static class ImportSampleMenu_UISoftMask + public static class ImportSampleMenu { [MenuItem("Assets/Samples/Import UISoftMask Sample")] private static void ImportSample() diff --git a/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskEditor.cs b/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskEditor.cs index 80a1c1c..a99ecff 100644 --- a/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskEditor.cs +++ b/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskEditor.cs @@ -5,7 +5,7 @@ using System.Linq; -namespace Coffee.UIExtensions.Editors +namespace Coffee.UISoftMask { /// /// SoftMask editor. @@ -41,8 +41,8 @@ public override void OnInspectorGUI () { p.gameObject.AddComponent (); } - - Utils.MarkPrefabDirty (); + + EditorUtils.MarkPrefabDirty (); } if (GUILayout.Button ("Ping")) { @@ -131,4 +131,4 @@ protected static void ConvertTo(Object context) where T : MonoBehaviour (so.targetObject as MonoBehaviour).enabled = oldEnable; } } -} \ No newline at end of file +} diff --git a/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskableEditor.cs b/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskableEditor.cs index 3f1fd41..8fdbf4e 100644 --- a/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskableEditor.cs +++ b/Packages/SoftMaskForUGUI/Scripts/Editor/SoftMaskableEditor.cs @@ -9,7 +9,7 @@ using MaskIntr = UnityEngine.SpriteMaskInteraction; using System.IO; -namespace Coffee.UIExtensions.Editors +namespace Coffee.UISoftMask { /// /// SoftMaskable editor. @@ -98,7 +98,7 @@ void OnEnable () s_MaskWarning = new GUIContent(EditorGUIUtility.FindTexture("console.warnicon.sml"), "This component is not SoftMask. Use SoftMask instead of Mask."); } - + void OnDisable () { ClearMaterialEditors (); @@ -235,7 +235,7 @@ public override void OnInspectorGUI () ShowMaterialEditors (fontSharedMaterials, 1, fontSharedMaterials.Length - 1); } } - + if (!DetectMask (current.transform.parent)) { GUILayout.BeginHorizontal (); @@ -243,8 +243,8 @@ public override void OnInspectorGUI () if (GUILayout.Button ("Remove", GUILayout.Height (40))) { DestroyImmediate (current); - - Utils.MarkPrefabDirty (); + + EditorUtils.MarkPrefabDirty (); } GUILayout.EndHorizontal (); } @@ -410,4 +410,4 @@ object ModifyTMProSpriteAsset (Material baseMaterial, Shader shader, System.Acti return spriteAsset; } } -} \ No newline at end of file +} diff --git a/Packages/SoftMaskForUGUI/Scripts/GraphicConnector.cs b/Packages/SoftMaskForUGUI/Scripts/GraphicConnector.cs index 08b73dc..1b38a6d 100644 --- a/Packages/SoftMaskForUGUI/Scripts/GraphicConnector.cs +++ b/Packages/SoftMaskForUGUI/Scripts/GraphicConnector.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEngine.UI; -namespace Coffee.UIExtensions +namespace Coffee.UISoftMask { internal static class GraphicConnectorExtension { diff --git a/Packages/SoftMaskForUGUI/Scripts/MaterialCache.cs b/Packages/SoftMaskForUGUI/Scripts/MaterialCache.cs index ce2fb28..055abb2 100644 --- a/Packages/SoftMaskForUGUI/Scripts/MaterialCache.cs +++ b/Packages/SoftMaskForUGUI/Scripts/MaterialCache.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEngine.UI; -namespace Coffee.UIExtensions +namespace Coffee.UISoftMask { internal class MaterialCache { diff --git a/Packages/SoftMaskForUGUI/Scripts/SoftMask.cs b/Packages/SoftMaskForUGUI/Scripts/SoftMask.cs index eb605df..c2c6f7b 100644 --- a/Packages/SoftMaskForUGUI/Scripts/SoftMask.cs +++ b/Packages/SoftMaskForUGUI/Scripts/SoftMask.cs @@ -3,7 +3,7 @@ using UnityEngine.Rendering; using UnityEngine.UI; -namespace Coffee.UIExtensions +namespace Coffee.UISoftMask { /// /// Soft mask. diff --git a/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs b/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs index 3c38e8e..ea05ddc 100755 --- a/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs +++ b/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs @@ -4,7 +4,7 @@ using UnityEngine.UI; using MaskIntr = UnityEngine.SpriteMaskInteraction; -namespace Coffee.UIExtensions +namespace Coffee.UISoftMask { /// /// Soft maskable.