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`.vr
parent
34515216a3
commit
0347b04fb7
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Demos
|
namespace Coffee.UISoftMask.Demos
|
||||||
{
|
{
|
||||||
public class SoftMask_Demo : MonoBehaviour
|
public class SoftMask_Demo : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,19 +4,19 @@ using UnityEditor.Experimental.SceneManagement;
|
||||||
using UnityEditor.SceneManagement;
|
using UnityEditor.SceneManagement;
|
||||||
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Editors
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
public static class Utils
|
public static class EditorUtils
|
||||||
{
|
{
|
||||||
public static void MarkPrefabDirty ()
|
public static void MarkPrefabDirty ()
|
||||||
{
|
{
|
||||||
#if UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3_OR_NEWER
|
||||||
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage ();
|
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage ();
|
||||||
if (prefabStage != null)
|
if (prefabStage != null)
|
||||||
{
|
{
|
||||||
EditorSceneManager.MarkSceneDirty (prefabStage.scene);
|
EditorSceneManager.MarkSceneDirty (prefabStage.scene);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,9 +4,9 @@ using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
public static class ImportSampleMenu_UISoftMask
|
public static class ImportSampleMenu
|
||||||
{
|
{
|
||||||
[MenuItem("Assets/Samples/Import UISoftMask Sample")]
|
[MenuItem("Assets/Samples/Import UISoftMask Sample")]
|
||||||
private static void ImportSample()
|
private static void ImportSample()
|
||||||
|
|
|
@ -5,7 +5,7 @@ using UnityEditor;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Editors
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SoftMask editor.
|
/// SoftMask editor.
|
||||||
|
@ -41,8 +41,8 @@ namespace Coffee.UIExtensions.Editors
|
||||||
{
|
{
|
||||||
p.gameObject.AddComponent<SoftMaskable> ();
|
p.gameObject.AddComponent<SoftMaskable> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.MarkPrefabDirty ();
|
EditorUtils.MarkPrefabDirty ();
|
||||||
}
|
}
|
||||||
if (GUILayout.Button ("Ping"))
|
if (GUILayout.Button ("Ping"))
|
||||||
{
|
{
|
||||||
|
@ -131,4 +131,4 @@ namespace Coffee.UIExtensions.Editors
|
||||||
(so.targetObject as MonoBehaviour).enabled = oldEnable;
|
(so.targetObject as MonoBehaviour).enabled = oldEnable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ using Object = UnityEngine.Object;
|
||||||
using MaskIntr = UnityEngine.SpriteMaskInteraction;
|
using MaskIntr = UnityEngine.SpriteMaskInteraction;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Editors
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SoftMaskable editor.
|
/// SoftMaskable editor.
|
||||||
|
@ -98,7 +98,7 @@ namespace Coffee.UIExtensions.Editors
|
||||||
|
|
||||||
s_MaskWarning = new GUIContent(EditorGUIUtility.FindTexture("console.warnicon.sml"), "This component is not SoftMask. Use SoftMask instead of Mask.");
|
s_MaskWarning = new GUIContent(EditorGUIUtility.FindTexture("console.warnicon.sml"), "This component is not SoftMask. Use SoftMask instead of Mask.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDisable ()
|
void OnDisable ()
|
||||||
{
|
{
|
||||||
ClearMaterialEditors ();
|
ClearMaterialEditors ();
|
||||||
|
@ -235,7 +235,7 @@ namespace Coffee.UIExtensions.Editors
|
||||||
ShowMaterialEditors (fontSharedMaterials, 1, fontSharedMaterials.Length - 1);
|
ShowMaterialEditors (fontSharedMaterials, 1, fontSharedMaterials.Length - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DetectMask (current.transform.parent))
|
if (!DetectMask (current.transform.parent))
|
||||||
{
|
{
|
||||||
GUILayout.BeginHorizontal ();
|
GUILayout.BeginHorizontal ();
|
||||||
|
@ -243,8 +243,8 @@ namespace Coffee.UIExtensions.Editors
|
||||||
if (GUILayout.Button ("Remove", GUILayout.Height (40)))
|
if (GUILayout.Button ("Remove", GUILayout.Height (40)))
|
||||||
{
|
{
|
||||||
DestroyImmediate (current);
|
DestroyImmediate (current);
|
||||||
|
|
||||||
Utils.MarkPrefabDirty ();
|
EditorUtils.MarkPrefabDirty ();
|
||||||
}
|
}
|
||||||
GUILayout.EndHorizontal ();
|
GUILayout.EndHorizontal ();
|
||||||
}
|
}
|
||||||
|
@ -410,4 +410,4 @@ namespace Coffee.UIExtensions.Editors
|
||||||
return spriteAsset;
|
return spriteAsset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
internal static class GraphicConnectorExtension
|
internal static class GraphicConnectorExtension
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
internal class MaterialCache
|
internal class MaterialCache
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
using UnityEngine.Rendering;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Soft mask.
|
/// Soft mask.
|
||||||
|
|
|
@ -4,7 +4,7 @@ using UnityEngine.Rendering;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using MaskIntr = UnityEngine.SpriteMaskInteraction;
|
using MaskIntr = UnityEngine.SpriteMaskInteraction;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
namespace Coffee.UISoftMask
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Soft maskable.
|
/// Soft maskable.
|
||||||
|
|
Loading…
Reference in New Issue