mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-12-01 10:12:38 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6c363cc47 | |||
| d9fa3641e3 |
@@ -1,3 +1,10 @@
|
|||||||
|
## [5.15.1](https://github.com/mob-sakai/UIEffect/compare/5.15.0...5.15.1) (2026-11-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improve round corner inspector ([d9fa364](https://github.com/mob-sakai/UIEffect/commit/d9fa3641e36b84c976b6282ca5013c4d5248df41))
|
||||||
|
|
||||||
# [5.15.0](https://github.com/mob-sakai/UIEffect/compare/5.14.1...5.15.0) (2026-11-26)
|
# [5.15.0](https://github.com/mob-sakai/UIEffect/compare/5.14.1...5.15.0) (2026-11-26)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 514 B |
Binary file not shown.
|
After Width: | Height: | Size: 696 B |
@@ -0,0 +1,109 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 253286b92599345a0b7261e3ae1eac75
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 2
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 697 B |
@@ -0,0 +1,109 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c58c458b53265474ea456ff2861bd6fd
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 2
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -21,6 +21,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
|
|
||||||
private static GUIContent s_PasteColorContent;
|
private static GUIContent s_PasteColorContent;
|
||||||
private static GUIContent s_PasteGradientContent;
|
private static GUIContent s_PasteGradientContent;
|
||||||
|
private static GUIContent s_RoundCornerIconContent;
|
||||||
private static readonly GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
private static readonly GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
||||||
private static readonly GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
private static readonly GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
||||||
|
|
||||||
@@ -110,24 +111,31 @@ namespace Coffee.UIEffects.Editors
|
|||||||
private SerializedProperty _detailTexSpeed;
|
private SerializedProperty _detailTexSpeed;
|
||||||
|
|
||||||
private SerializedProperty _roundCornerMode;
|
private SerializedProperty _roundCornerMode;
|
||||||
private SerializedProperty _roundCornerRadiusTopLeft;
|
private SerializedProperty _roundCornerRadius;
|
||||||
private SerializedProperty _roundCornerRadiusTopRight;
|
private SerializedProperty _roundCornerRadiusTL;
|
||||||
private SerializedProperty _roundCornerRadiusBottomRight;
|
private SerializedProperty _roundCornerRadiusTR;
|
||||||
private SerializedProperty _roundCornerRadiusBottomLeft;
|
private SerializedProperty _roundCornerRadiusBR;
|
||||||
|
private SerializedProperty _roundCornerRadiusBL;
|
||||||
|
private bool _roundCornerRadiiLinked;
|
||||||
|
|
||||||
private SerializedProperty _flip;
|
private SerializedProperty _flip;
|
||||||
|
|
||||||
protected virtual void OnEnable()
|
protected virtual void OnEnable()
|
||||||
{
|
{
|
||||||
|
const string iconDir = "Packages/com.coffee.ui-effect/Editor/Icons";
|
||||||
if (s_PasteColorContent == null)
|
if (s_PasteColorContent == null)
|
||||||
{
|
{
|
||||||
var iconDir = "Packages/com.coffee.ui-effect/Editor/Icons";
|
|
||||||
s_PasteColorContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
s_PasteColorContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
||||||
$"Paste {PasteColorUtil.SupportedFormats} or CSS background/background-color declarations.");
|
$"Paste {PasteColorUtil.SupportedFormats} or CSS background/background-color declarations.");
|
||||||
s_PasteGradientContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
s_PasteGradientContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
||||||
"Paste CSS linear-gradient(...) or radial-gradient(...).");
|
"Paste CSS linear-gradient(...) or radial-gradient(...).");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s_RoundCornerIconContent == null)
|
||||||
|
{
|
||||||
|
s_RoundCornerIconContent = Misc.GetIconContent($"{iconDir}/RoundCornerIcon.png");
|
||||||
|
}
|
||||||
|
|
||||||
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
||||||
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
||||||
|
|
||||||
@@ -217,11 +225,21 @@ namespace Coffee.UIEffects.Editors
|
|||||||
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
||||||
|
|
||||||
_roundCornerMode = serializedObject.FindProperty("m_RoundCornerMode");
|
_roundCornerMode = serializedObject.FindProperty("m_RoundCornerMode");
|
||||||
var roundCornerRadius = serializedObject.FindProperty("m_RoundCornerRadius");
|
_roundCornerRadius = serializedObject.FindProperty("m_RoundCornerRadius");
|
||||||
_roundCornerRadiusTopLeft = roundCornerRadius.FindPropertyRelative("x");
|
_roundCornerRadiusTL = _roundCornerRadius.FindPropertyRelative("x");
|
||||||
_roundCornerRadiusTopRight = roundCornerRadius.FindPropertyRelative("y");
|
_roundCornerRadiusTR = _roundCornerRadius.FindPropertyRelative("y");
|
||||||
_roundCornerRadiusBottomRight = roundCornerRadius.FindPropertyRelative("z");
|
_roundCornerRadiusBR = _roundCornerRadius.FindPropertyRelative("z");
|
||||||
_roundCornerRadiusBottomLeft = roundCornerRadius.FindPropertyRelative("w");
|
_roundCornerRadiusBL = _roundCornerRadius.FindPropertyRelative("w");
|
||||||
|
_roundCornerRadiiLinked = !_roundCornerRadiusTL.hasMultipleDifferentValues
|
||||||
|
&& !_roundCornerRadiusTR.hasMultipleDifferentValues
|
||||||
|
&& !_roundCornerRadiusBR.hasMultipleDifferentValues
|
||||||
|
&& !_roundCornerRadiusBL.hasMultipleDifferentValues
|
||||||
|
&& Mathf.Approximately(_roundCornerRadiusTL.floatValue,
|
||||||
|
_roundCornerRadiusTR.floatValue)
|
||||||
|
&& Mathf.Approximately(_roundCornerRadiusTL.floatValue,
|
||||||
|
_roundCornerRadiusBR.floatValue)
|
||||||
|
&& Mathf.Approximately(_roundCornerRadiusTL.floatValue,
|
||||||
|
_roundCornerRadiusBL.floatValue);
|
||||||
|
|
||||||
_flip = serializedObject.FindProperty("m_Flip");
|
_flip = serializedObject.FindProperty("m_Flip");
|
||||||
}
|
}
|
||||||
@@ -507,10 +525,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
if (DrawHeaderPopup(_roundCornerMode))
|
if (DrawHeaderPopup(_roundCornerMode))
|
||||||
{
|
{
|
||||||
EditorGUI.indentLevel++;
|
EditorGUI.indentLevel++;
|
||||||
DrawRoundCornerRadiusField(_roundCornerRadiusTopLeft, "Top Left");
|
DrawRoundCornerRadii();
|
||||||
DrawRoundCornerRadiusField(_roundCornerRadiusTopRight, "Top Right");
|
|
||||||
DrawRoundCornerRadiusField(_roundCornerRadiusBottomRight, "Bottom Right");
|
|
||||||
DrawRoundCornerRadiusField(_roundCornerRadiusBottomLeft, "Bottom Left");
|
|
||||||
EditorGUI.indentLevel--;
|
EditorGUI.indentLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,13 +554,72 @@ namespace Coffee.UIEffects.Editors
|
|||||||
EditorGUI.indentLevel = indentLevel;
|
EditorGUI.indentLevel = indentLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DrawRoundCornerRadiusField(SerializedProperty property, string label)
|
private void DrawRoundCornerRadii()
|
||||||
{
|
{
|
||||||
|
var radii = _roundCornerRadius;
|
||||||
|
var lineH = EditorGUIUtility.singleLineHeight;
|
||||||
|
var r = EditorGUILayout.GetControlRect(false, lineH * 2 + 2);
|
||||||
|
var labelW = EditorGUIUtility.labelWidth;
|
||||||
|
var controlX = r.x + labelW;
|
||||||
|
var controlW = r.width - labelW;
|
||||||
|
var fieldW = (controlW - 48) / 2;
|
||||||
|
var leftIconX = controlX;
|
||||||
|
var leftFieldX = leftIconX + 4;
|
||||||
|
var linkX = leftFieldX + fieldW + 10;
|
||||||
|
var rightFieldX = linkX + 14;
|
||||||
|
var rightIconX = rightFieldX + fieldW + 2;
|
||||||
|
var bottomY = r.y + lineH + 2;
|
||||||
|
var prefixPos = new Rect(r.x, r.y, r.width, lineH);
|
||||||
|
|
||||||
|
// Label
|
||||||
|
{
|
||||||
|
var label = EditorGUIUtility.TrTempContent("Corner Radii");
|
||||||
|
label = EditorGUI.BeginProperty(prefixPos, label, _roundCornerRadius);
|
||||||
|
EditorGUI.PrefixLabel(prefixPos, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Link toggle
|
||||||
|
{
|
||||||
|
var linkRect = new Rect(linkX, r.y + (r.height - 22) * 0.5f, 22, 22);
|
||||||
|
var linkContent = EditorGUIUtility.IconContent(_roundCornerRadiiLinked ? "Linked" : "Unlinked");
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
EditorGUILayout.PropertyField(property, EditorGUIUtility.TrTempContent(label));
|
_roundCornerRadiiLinked = GUI.Toggle(linkRect, _roundCornerRadiiLinked, linkContent, "IconButton");
|
||||||
if (EditorGUI.EndChangeCheck())
|
if (EditorGUI.EndChangeCheck())
|
||||||
{
|
{
|
||||||
property.floatValue = Mathf.Max(0, property.floatValue);
|
var v = Mathf.Max(0, _roundCornerRadiusTL.floatValue);
|
||||||
|
radii.vector4Value = new Vector4(v, v, v, v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw fields
|
||||||
|
var linked = _roundCornerRadiiLinked;
|
||||||
|
Misc.DrawIconContent(new Rect(leftIconX, r.y, 18, 18), s_RoundCornerIconContent, 0);
|
||||||
|
DrawRadiusField(new Rect(leftFieldX, r.y, fieldW, lineH), _roundCornerRadiusTL, radii, linked);
|
||||||
|
|
||||||
|
Misc.DrawIconContent(new Rect(rightIconX, r.y, 18, 18), s_RoundCornerIconContent, 90);
|
||||||
|
DrawRadiusField(new Rect(rightFieldX, r.y, fieldW, lineH), _roundCornerRadiusTR, radii, linked);
|
||||||
|
|
||||||
|
Misc.DrawIconContent(new Rect(rightIconX, bottomY, 18, 18), s_RoundCornerIconContent, 180);
|
||||||
|
DrawRadiusField(new Rect(leftFieldX, bottomY, fieldW, lineH), _roundCornerRadiusBL, radii, linked);
|
||||||
|
|
||||||
|
Misc.DrawIconContent(new Rect(leftIconX, bottomY, 18, 18), s_RoundCornerIconContent, 270);
|
||||||
|
DrawRadiusField(new Rect(rightFieldX, bottomY, fieldW, lineH), _roundCornerRadiusBR, radii, linked);
|
||||||
|
|
||||||
|
EditorGUI.EndProperty();
|
||||||
|
return;
|
||||||
|
|
||||||
|
static void DrawRadiusField(Rect rect, SerializedProperty radius, SerializedProperty radii, bool linked)
|
||||||
|
{
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
EditorGUI.PropertyField(rect, radius, GUIContent.none);
|
||||||
|
if (!EditorGUI.EndChangeCheck()) return;
|
||||||
|
|
||||||
|
var v = Mathf.Max(0, radius.floatValue);
|
||||||
|
radius.floatValue = v;
|
||||||
|
if (linked)
|
||||||
|
{
|
||||||
|
radii.vector4Value = new Vector4(v, v, v, v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -455,10 +455,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Round Corner
|
#### Round Corner
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Mode**: `Off` or `On`. The default is `Off`.
|
- **Mode**: `Off` or `On`. The default is `Off`.
|
||||||
- **Top Left**, **Top Right**, **Bottom Right**, **Bottom Left**: Set each corner radius independently.
|
- **Corner Radii**: Set each corner radius independently.
|
||||||

|

|
||||||
- Radius values use `transitionRoot` local units. They are normalized against its shorter dimension and clamped to half that dimension; `0` keeps a corner square.
|
- Radius values use `transitionRoot` local units. They are normalized against its shorter dimension and clamped to half that dimension; `0` keeps a corner square.
|
||||||
- The mask applies to the main UI surface; Shadow and Mirror outputs are left unchanged to avoid shadow-edge artifacts.
|
- The mask applies to the main UI surface; Shadow and Mirror outputs are left unchanged to avoid shadow-edge artifacts.
|
||||||
|
|||||||
@@ -108,6 +108,14 @@ namespace Coffee.UIEffectInternal
|
|||||||
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
|
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
|
||||||
return new GUIContent(icon, tooltip);
|
return new GUIContent(icon, tooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void DrawIconContent(Rect rect, GUIContent content, float angle = 0f)
|
||||||
|
{
|
||||||
|
var matrix = GUI.matrix;
|
||||||
|
GUIUtility.RotateAroundPivot(angle, rect.center);
|
||||||
|
GUI.Label(rect, content);
|
||||||
|
GUI.matrix = matrix;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ namespace Coffee.UIEffects
|
|||||||
private static readonly int s_RoundCornerViewMatrix = Shader.PropertyToID("_RoundCornerViewMatrix");
|
private static readonly int s_RoundCornerViewMatrix = Shader.PropertyToID("_RoundCornerViewMatrix");
|
||||||
private static readonly int s_GradViewMatrix = Shader.PropertyToID("_GradViewMatrix");
|
private static readonly int s_GradViewMatrix = Shader.PropertyToID("_GradViewMatrix");
|
||||||
private static readonly int s_MirrorRootViewMatrix = Shader.PropertyToID("_MirrorRootViewMatrix");
|
private static readonly int s_MirrorRootViewMatrix = Shader.PropertyToID("_MirrorRootViewMatrix");
|
||||||
|
|
||||||
private static readonly int s_MirrorRoundCornerViewMatrix =
|
private static readonly int s_MirrorRoundCornerViewMatrix =
|
||||||
Shader.PropertyToID("_MirrorRoundCornerViewMatrix");
|
Shader.PropertyToID("_MirrorRoundCornerViewMatrix");
|
||||||
|
|
||||||
private static readonly int s_MirrorGradViewMatrix = Shader.PropertyToID("_MirrorGradViewMatrix");
|
private static readonly int s_MirrorGradViewMatrix = Shader.PropertyToID("_MirrorGradViewMatrix");
|
||||||
private static readonly int s_CanvasToWorldMatrix = Shader.PropertyToID("_CanvasToWorldMatrix");
|
private static readonly int s_CanvasToWorldMatrix = Shader.PropertyToID("_CanvasToWorldMatrix");
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect.shadergraph-builtin",
|
"name": "com.coffee.ui-effect.shadergraph-builtin",
|
||||||
"displayName": "UI Effect - ShaderGraph Support (Unity 6 BuiltIn)",
|
"displayName": "UI Effect - ShaderGraph Support (Unity 6 BuiltIn)",
|
||||||
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 BuiltIn).",
|
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 BuiltIn).",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"url": "https://github.com/mob-sakai"
|
"url": "https://github.com/mob-sakai"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.coffee.ui-effect": "5.15.0"
|
"com.coffee.ui-effect": "5.15.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ui",
|
"ui",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect.shadergraph-urp",
|
"name": "com.coffee.ui-effect.shadergraph-urp",
|
||||||
"displayName": "UI Effect - ShaderGraph Support (Unity 6 URP)",
|
"displayName": "UI Effect - ShaderGraph Support (Unity 6 URP)",
|
||||||
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 URP).",
|
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 URP).",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
"url": "https://github.com/mob-sakai"
|
"url": "https://github.com/mob-sakai"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.coffee.ui-effect": "5.15.0",
|
"com.coffee.ui-effect": "5.15.1",
|
||||||
"com.coffee.ui-effect-shadergraph-builtin": "5.15.0"
|
"com.coffee.ui-effect-shadergraph-builtin": "5.15.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ui",
|
"ui",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect.textmeshpro-legacy",
|
"name": "com.coffee.ui-effect.textmeshpro-legacy",
|
||||||
"displayName": "UI Effect - TextMeshPro Support",
|
"displayName": "UI Effect - TextMeshPro Support",
|
||||||
"description": "An extension for UI Effect that adds TextMeshPro support.",
|
"description": "An extension for UI Effect that adds TextMeshPro support.",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"url": "https://github.com/mob-sakai"
|
"url": "https://github.com/mob-sakai"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.coffee.ui-effect": "5.15.0"
|
"com.coffee.ui-effect": "5.15.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ui",
|
"ui",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect.textmeshpro",
|
"name": "com.coffee.ui-effect.textmeshpro",
|
||||||
"displayName": "UI Effect - TextMeshPro Support (Unity 6)",
|
"displayName": "UI Effect - TextMeshPro Support (Unity 6)",
|
||||||
"description": "An extension for UI Effect that adds TextMeshPro support (Unity 6).",
|
"description": "An extension for UI Effect that adds TextMeshPro support (Unity 6).",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"url": "https://github.com/mob-sakai"
|
"url": "https://github.com/mob-sakai"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.coffee.ui-effect": "5.15.0"
|
"com.coffee.ui-effect": "5.15.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ui",
|
"ui",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect.v4-compatible-components",
|
"name": "com.coffee.ui-effect.v4-compatible-components",
|
||||||
"displayName": "UI Effect - v4 Compatible Components",
|
"displayName": "UI Effect - v4 Compatible Components",
|
||||||
"description": "An extension for UI Effect that adds v4 compatible components.",
|
"description": "An extension for UI Effect that adds v4 compatible components.",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"url": "https://github.com/mob-sakai"
|
"url": "https://github.com/mob-sakai"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.coffee.ui-effect": "5.15.0",
|
"com.coffee.ui-effect": "5.15.1",
|
||||||
"com.unity.modules.animation": "1.0.0"
|
"com.unity.modules.animation": "1.0.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-effect",
|
"name": "com.coffee.ui-effect",
|
||||||
"displayName": "UI Effect",
|
"displayName": "UI Effect",
|
||||||
"description": "UIEffect is an open-source package that allows you to intuitively apply rich UI effects directly from the Inspector or via code.\nCombine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!",
|
"description": "UIEffect is an open-source package that allows you to intuitively apply rich UI effects directly from the Inspector or via code.\nCombine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!",
|
||||||
"version": "5.15.0",
|
"version": "5.15.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user