From 03fb998bfb2ef74df615c97741796eed5aad717f Mon Sep 17 00:00:00 2001 From: Anton Pawlik Date: Mon, 21 Jan 2019 15:33:10 +0100 Subject: [PATCH 1/7] fix warnings --- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs | 3 ++- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs | 4 ++++ .../UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs | 2 +- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs index f8549efc..fadf064e 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs @@ -49,11 +49,12 @@ public class UIDissolve : UIEffectBase [Header("Effect Player")] [SerializeField] EffectPlayer m_Player; +#if UNITY_EDITOR [Obsolete][HideInInspector] [SerializeField][Range(0.1f, 10)] float m_Duration = 1; [Obsolete][HideInInspector] [SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal; - +#endif //################################ // Public Members. diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs index b9b29d0e..eed880af 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs @@ -55,16 +55,20 @@ public class UIEffect : UIEffectBase [Tooltip("Advanced blurring remove common artifacts in the blur effect for uGUI.")] [SerializeField] bool m_AdvancedBlur = false; +#if UNITY_EDITOR [Obsolete][HideInInspector] [SerializeField][Range(0, 1)] float m_ShadowBlur = 1; +#endif [Obsolete][HideInInspector] [SerializeField] ShadowStyle m_ShadowStyle; [Obsolete][HideInInspector] [SerializeField] Color m_ShadowColor = Color.black; [Obsolete][HideInInspector] [SerializeField] Vector2 m_EffectDistance = new Vector2(1f, -1f); +#if UNITY_EDITOR [Obsolete][HideInInspector] [SerializeField] bool m_UseGraphicAlpha = true; +#endif [Obsolete][HideInInspector] [SerializeField] Color m_EffectColor = Color.white; [Obsolete][HideInInspector] diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs index 1c925cdd..a7969d93 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs @@ -72,7 +72,7 @@ public enum DesamplingRate [SerializeField] FilterMode m_FilterMode = FilterMode.Bilinear; [Tooltip("Effect material.")] - [SerializeField] Material m_EffectMaterial; + [SerializeField] Material m_EffectMaterial = null; [Tooltip("Blur iterations.")] [FormerlySerializedAs("m_Iterations")] diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs index acb4efc4..b8d03868 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs @@ -55,6 +55,7 @@ public class UIShiny : UIEffectBase [SerializeField] EffectPlayer m_Player; +#if UNITY_EDITOR [Obsolete][HideInInspector] [SerializeField] bool m_Play = false; [Obsolete][HideInInspector] @@ -65,7 +66,7 @@ public class UIShiny : UIEffectBase [SerializeField][Range(0, 10)] float m_LoopDelay = 1; [Obsolete][HideInInspector] [SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal; - +#endif //################################ // Public Members. From 87cacfa3ffc167c3a61fc730eb14984b9feb35d2 Mon Sep 17 00:00:00 2001 From: Anton Pawlik Date: Wed, 13 Feb 2019 10:39:19 +0100 Subject: [PATCH 2/7] add initial play animation delay option to UIShiny --- .../UIEffect/Scripts/Common/EffectPlayer.cs | 16 +++++++++++++++- .../UIEffect/Scripts/Editor/UIShinyEditor.cs | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Common/EffectPlayer.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Common/EffectPlayer.cs index 75850ffc..2a652bd6 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Common/EffectPlayer.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Common/EffectPlayer.cs @@ -19,6 +19,13 @@ public class EffectPlayer [Tooltip("Playing.")] public bool play = false; + /// + /// Gets or sets the delay before looping. + /// + [Tooltip("Initial play delay.")] + [Range(0f, 10f)] + public float initialPlayDelay = 0; + /// /// Gets or sets a value indicating whether can loop. /// @@ -67,7 +74,14 @@ public void OnEnable(Action callback = null) } s_UpdateActions.Add(OnWillRenderCanvases); - _time = 0; + if (play) + { + _time = -initialPlayDelay; + } + else + { + _time = 0; + } _callback = callback; } diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIShinyEditor.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIShinyEditor.cs index 87b6509a..ab690207 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIShinyEditor.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIShinyEditor.cs @@ -31,6 +31,7 @@ protected void OnEnable() var player = serializedObject.FindProperty("m_Player"); _spPlay = player.FindPropertyRelative("play"); _spDuration = player.FindPropertyRelative("duration"); + _spInitialPlayDelay = player.FindPropertyRelative("initialPlayDelay"); _spLoop = player.FindPropertyRelative("loop"); _spLoopDelay = player.FindPropertyRelative("loopDelay"); _spUpdateMode = player.FindPropertyRelative("updateMode"); @@ -75,6 +76,10 @@ public override void OnInspectorGUI() GUILayout.Space(10); EditorGUILayout.LabelField("Effect Player", EditorStyles.boldLabel); EditorGUILayout.PropertyField(_spPlay); + if (_spPlay.boolValue) + { + EditorGUILayout.PropertyField(_spInitialPlayDelay); + } EditorGUILayout.PropertyField(_spDuration); EditorGUILayout.PropertyField(_spLoop); EditorGUILayout.PropertyField(_spLoopDelay); @@ -115,6 +120,7 @@ public override void OnInspectorGUI() SerializedProperty _spLoop; SerializedProperty _spLoopDelay; SerializedProperty _spDuration; + SerializedProperty _spInitialPlayDelay; SerializedProperty _spUpdateMode; } } \ No newline at end of file From 62f80258ec97fe554fa4c15074931ebfff23f454 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 15 Feb 2019 14:32:44 +0900 Subject: [PATCH 3/7] Disable warning for .Net 4.x --- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs | 5 +++-- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs | 6 ++---- Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShadow.cs | 2 ++ Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs index fadf064e..c8afef8d 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIDissolve.cs @@ -49,12 +49,13 @@ public class UIDissolve : UIEffectBase [Header("Effect Player")] [SerializeField] EffectPlayer m_Player; -#if UNITY_EDITOR + #pragma warning disable 0414 [Obsolete][HideInInspector] [SerializeField][Range(0.1f, 10)] float m_Duration = 1; [Obsolete][HideInInspector] [SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal; -#endif + #pragma warning restore 0414 + //################################ // Public Members. diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs index eed880af..75ac65b2 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffect.cs @@ -55,24 +55,22 @@ public class UIEffect : UIEffectBase [Tooltip("Advanced blurring remove common artifacts in the blur effect for uGUI.")] [SerializeField] bool m_AdvancedBlur = false; -#if UNITY_EDITOR + #pragma warning disable 0414 [Obsolete][HideInInspector] [SerializeField][Range(0, 1)] float m_ShadowBlur = 1; -#endif [Obsolete][HideInInspector] [SerializeField] ShadowStyle m_ShadowStyle; [Obsolete][HideInInspector] [SerializeField] Color m_ShadowColor = Color.black; [Obsolete][HideInInspector] [SerializeField] Vector2 m_EffectDistance = new Vector2(1f, -1f); -#if UNITY_EDITOR [Obsolete][HideInInspector] [SerializeField] bool m_UseGraphicAlpha = true; -#endif [Obsolete][HideInInspector] [SerializeField] Color m_EffectColor = Color.white; [Obsolete][HideInInspector] [SerializeField] List m_AdditionalShadows = new List(); + #pragma warning restore 0414 public enum BlurEx { diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShadow.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShadow.cs index e4ad931c..f7b34d54 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShadow.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShadow.cs @@ -69,8 +69,10 @@ public class AdditionalShadow [Tooltip("Shadow effect style.")] [SerializeField] ShadowStyle m_Style = ShadowStyle.Shadow; + #pragma warning disable 0414 [HideInInspector][System.Obsolete] [SerializeField] List m_AdditionalShadows = new List(); + #pragma warning restore 0414 //################################ diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs index b8d03868..9fdeecff 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIShiny.cs @@ -55,7 +55,7 @@ public class UIShiny : UIEffectBase [SerializeField] EffectPlayer m_Player; -#if UNITY_EDITOR + #pragma warning disable 0414 [Obsolete][HideInInspector] [SerializeField] bool m_Play = false; [Obsolete][HideInInspector] @@ -66,7 +66,8 @@ public class UIShiny : UIEffectBase [SerializeField][Range(0, 10)] float m_LoopDelay = 1; [Obsolete][HideInInspector] [SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal; -#endif + #pragma warning restore 0414 + //################################ // Public Members. From 4e048ff93c22aff448da34c892d606fa8c84b72d Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 15 Feb 2019 20:48:10 +0900 Subject: [PATCH 4/7] fix #148; UIEffectCapturedImage.effectColor does not work as expected --- .../UIEffect/Scripts/Editor/UIEffectCapturedImageEditor.cs | 2 +- .../UIExtensions/UIEffect/Scripts/Editor/UIEffectEditor.cs | 4 ++-- .../UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectCapturedImageEditor.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectCapturedImageEditor.cs index 3ea4fbe5..f3840dd5 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectCapturedImageEditor.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectCapturedImageEditor.cs @@ -70,7 +70,7 @@ public override void OnInspectorGUI() //================ GUILayout.Space(10); EditorGUILayout.LabelField("Capture Effect", EditorStyles.boldLabel); - UIEffectEditor.DrawEffectProperties(serializedObject); + UIEffectEditor.DrawEffectProperties(serializedObject, "m_EffectColor"); //================ // Advanced option. diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectEditor.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectEditor.cs index ae673f53..2a74a10f 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectEditor.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/Editor/UIEffectEditor.cs @@ -20,7 +20,7 @@ public class UIEffectEditor : Editor /// /// Draw effect properties. /// - public static void DrawEffectProperties(SerializedObject serializedObject) + public static void DrawEffectProperties(SerializedObject serializedObject, string colorProperty = "m_Color") { //================ // Effect material. @@ -55,7 +55,7 @@ public static void DrawEffectProperties(SerializedObject serializedObject) { EditorGUI.indentLevel++; - SerializedProperty spColor = serializedObject.FindProperty("m_Color"); + SerializedProperty spColor = serializedObject.FindProperty(colorProperty); if (spColor == null && serializedObject.targetObject is UIEffect) { spColor = new SerializedObject (serializedObject.targetObjects.Select(x=>(x as UIEffect).targetGraphic).ToArray()).FindProperty("m_Color"); } diff --git a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs index a7969d93..9ecdd331 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs +++ b/Assets/Coffee/UIExtensions/UIEffect/Scripts/UIEffectCapturedImage.cs @@ -254,7 +254,7 @@ protected override void OnPopulateMesh(VertexHelper vh) base.OnPopulateMesh(vh); int count = vh.currentVertCount; UIVertex vt = default(UIVertex); - Color c = new Color(1, 1, 1, color.a); + Color c = color; for (int i = 0; i < count; i++) { vh.PopulateUIVertex(ref vt, i); @@ -541,6 +541,7 @@ void _Release(ref RenderTexture obj) { if (obj) { + obj.Release(); RenderTexture.ReleaseTemporary (obj); obj = null; } From 40fa78d4010b38c568a307b8ecf6878bb72eda9f Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 15 Feb 2019 20:50:02 +0900 Subject: [PATCH 5/7] Delete documents --- CHANGELOG.md | 1 - LICENSE.md | 1 - README.md | 1 - package.json | 1 - 4 files changed, 4 deletions(-) delete mode 120000 CHANGELOG.md delete mode 120000 LICENSE.md delete mode 120000 README.md delete mode 120000 package.json diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 120000 index af716b98..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 120000 index 5a461f8e..00000000 --- a/LICENSE.md +++ /dev/null @@ -1 +0,0 @@ -Assets/Coffee/UIExtensions/UIEffect/LICENSE.md \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 120000 index 2caf63f6..00000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -Assets/Coffee/UIExtensions/UIEffect/README.md \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 120000 index 501a6d39..00000000 --- a/package.json +++ /dev/null @@ -1 +0,0 @@ -Assets/Coffee/UIExtensions/UIEffect/package.json \ No newline at end of file From 410cfa0973a6d5da7d161367a61d34c813a17e2d Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 15 Feb 2019 20:50:32 +0900 Subject: [PATCH 6/7] Add documents for UnityList --- CHANGELOG.md | 445 +++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.md | 7 + README.md | 222 +++++++++++++++++++++++++ package.json | 18 +++ 4 files changed, 692 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 package.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..69b4175c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,445 @@ +# Changelog + +## [v3.0.3](https://github.com/mob-sakai/UIEffect/tree/v3.0.3) (2019-01-21) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.2...v3.0.3) + +**Fixed bugs:** + +- UIHsvModifier works only on gamma-space [\#145](https://github.com/mob-sakai/UIEffect/issues/145) + +## [v3.0.2](https://github.com/mob-sakai/UIEffect/tree/v3.0.2) (2019-01-15) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.1...v3.0.2) + +**Fixed bugs:** + +- UIEffect & UIHsvModifier & UITransitionEffect Strange action [\#144](https://github.com/mob-sakai/UIEffect/issues/144) + +## [v3.0.1](https://github.com/mob-sakai/UIEffect/tree/v3.0.1) (2018-11-07) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.0...v3.0.1) + +**Fixed bugs:** + +- Compile error in 2018.3 [\#139](https://github.com/mob-sakai/UIEffect/issues/139) + +## [v3.0.0](https://github.com/mob-sakai/UIEffect/tree/v3.0.0) (2018-10-09) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.3...v3.0.0) + +### New architecture: easier, faster and more beautiful. +* Simple & easy-to-use +* 20% faster +* High precision parameter + +### Immediate capturing (UIEffectCapturedImage option) +* Capture the previous frame immediately without any camera. +* You no longer have to wait one frame to capture! +* *NOTE: LWRP, WebGL and Unity 5.x for iOS/Mac are not supported.* + +### Advanced blur (UIEffect option) +* Remove common artifacts in the blur effect for uGUI. +![](https://user-images.githubusercontent.com/12690315/42547121-80134788-84fb-11e8-97a0-048bba9634ea.png) +* It is effective for small padding size atlases, including dynamic fonts! + +**Breaking changes:** + +- UIEffectCapturedImage: Remove 'TargetTexture' feature [\#136](https://github.com/mob-sakai/UIEffect/issues/136) +- Remove 'additional shadow' in UIShadow component [\#110](https://github.com/mob-sakai/UIEffect/issues/110) +- Remove 'custom effect' feature in UIEffect component [\#98](https://github.com/mob-sakai/UIEffect/issues/98) +- Remove 'shadow effect' feature in UIEffect component [\#97](https://github.com/mob-sakai/UIEffect/issues/97) +- Remove 'hue effect' in UIEffect component [\#91](https://github.com/mob-sakai/UIEffect/issues/91) +- Remove 'cutoff' and 'mono' effect in UIEffect component [\#78](https://github.com/mob-sakai/UIEffect/issues/78) +- New architecture: Shared texture for effect parameter [\#63](https://github.com/mob-sakai/UIEffect/issues/63) +- Change: Change `ToneMode` to `EffectMode` [\#61](https://github.com/mob-sakai/UIEffect/issues/61) +- Separate shadow effect to other component [\#52](https://github.com/mob-sakai/UIEffect/issues/52) +- Use the graphic color as effect color, to reduce parameters [\#50](https://github.com/mob-sakai/UIEffect/issues/50) + +**Implemented enhancements:** + +- UITransitionEffect: "Pass ray on hidden" option [\#135](https://github.com/mob-sakai/UIEffect/issues/135) +- Add component menu in editor [\#133](https://github.com/mob-sakai/UIEffect/issues/133) +- UITransitionEffect: Add Show/Hide method [\#132](https://github.com/mob-sakai/UIEffect/issues/132) +- UIEffectCapturedImage: Immediate capturing [\#130](https://github.com/mob-sakai/UIEffect/issues/130) +- Improve blurring for atlas [\#95](https://github.com/mob-sakai/UIEffect/issues/95) +- Use Canvas.willRenderCanvases event instead of Update method [\#87](https://github.com/mob-sakai/UIEffect/issues/87) + +**Closed issues:** + +- Add tooltip [\#92](https://github.com/mob-sakai/UIEffect/issues/92) +- UIShiny: change parameter name `highlight` to `gloss` [\#93](https://github.com/mob-sakai/UIEffect/issues/93) + +## [v2.8.3](https://github.com/mob-sakai/UIEffect/tree/v2.8.3) (2018-09-29) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.2...v2.8.3) + +**Fixed bugs:** + +- UIEffectCapturedImage: Black screen with Unity 2018.1+ editor on Windows [\#131](https://github.com/mob-sakai/UIEffect/issues/131) + +## [v2.8.2](https://github.com/mob-sakai/UIEffect/tree/v2.8.2) (2018-09-26) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.1...v2.8.2) + +**Fixed bugs:** + +- UICapturedEffectImage does not work with 'ScreenSpace - Overlay' in edit mode [\#128](https://github.com/mob-sakai/UIEffect/issues/128) +- The UIEffectCapturedImage is upside down with 'ScreenSpace - Overlay' mode [\#127](https://github.com/mob-sakai/UIEffect/issues/127) +- When "UI-Effect.mat" is created automatically, Unity hangs up. [\#126](https://github.com/mob-sakai/UIEffect/issues/126) +- UICapturedEffectImage does not work with Lightweight Render Pipeline LWRP [\#125](https://github.com/mob-sakai/UIEffect/issues/125) + +## [v2.8.1](https://github.com/mob-sakai/UIEffect/tree/v2.8.1) (2018-08-17) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.0...v2.8.1) + +**Fixed bugs:** + +- \(Demo\) "Transition capture & dissolve" is incorrect [\#119](https://github.com/mob-sakai/UIEffect/issues/119) + +## [v2.8.0](https://github.com/mob-sakai/UIEffect/tree/v2.8.0) (2018-08-14) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.1...v2.8.0) + +* Create a screen transition! +![8 -08-2018 19-29-38](https://user-images.githubusercontent.com/12690315/43832265-dbdecc98-9b41-11e8-8ab5-9f49420a6a16.gif) + +* Some updates make UIEffectCapturedImage easier to use! + + +**Implemented enhancements:** + +- UIEffectCapturedImage: Supports 'ScreenSpace - Overlay' [\#115](https://github.com/mob-sakai/UIEffect/issues/115) +- UIEffectCapturedImage: Keep aspect ratio [\#114](https://github.com/mob-sakai/UIEffect/issues/114) +- UIEffectCapturedImage: 'Capture on enable' option [\#113](https://github.com/mob-sakai/UIEffect/issues/113) +- UITransitionEffect: Change transition texture [\#111](https://github.com/mob-sakai/UIEffect/issues/111) + +**Closed issues:** + +- UIEffectCapturedImage: change parameter name `keepCanvasSize` to `fitToScreen` [\#116](https://github.com/mob-sakai/UIEffect/issues/116) + +## [v2.7.1](https://github.com/mob-sakai/UIEffect/tree/v2.7.1) (2018-08-06) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.0...v2.7.1) + +**Fixed bugs:** + +- In v2.7.0, UIEffectCapturedImage is flipped vertically on Windows [\#112](https://github.com/mob-sakai/UIEffect/issues/112) + +## [v2.7.0](https://github.com/mob-sakai/UIEffect/tree/v2.7.0) (2018-07-26) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.2...v2.7.0) + +UIHsvModifier: Modify hue, saturation, and value as you like! +![](https://user-images.githubusercontent.com/12690315/43200006-d6e2bf54-904e-11e8-9f22-0c0f9ce5912f.gif) + +* Note: `Hue` mode in UIEffect component will be obsolete in the near future. Please use UIHsvModifier component instead. +* Note: `Cutoff` and `Mono` mode in UIEffect component will be obsolete in the near future. Please use UITransitionEffect component instead. + +**Implemented enhancements:** + +- UIEffectCapturedImage: Support target RenderTexture to use external component [\#108](https://github.com/mob-sakai/UIEffect/issues/108) +- Transition effect as other component [\#105](https://github.com/mob-sakai/UIEffect/issues/105) +- Use multi-pass blurring to capture screenshot [\#96](https://github.com/mob-sakai/UIEffect/issues/96) +- Feature: HSV modifier [\#44](https://github.com/mob-sakai/UIEffect/issues/44) + +**Fixed bugs:** + +- UIEffectCapturedImage: ColorMode is not working [\#109](https://github.com/mob-sakai/UIEffect/issues/109) +- UIDissolve is not maskable [\#101](https://github.com/mob-sakai/UIEffect/issues/101) + +## [v2.6.2](https://github.com/mob-sakai/UIEffect/tree/v2.6.2) (2018-07-18) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.1...v2.6.2) + +**Fixed bugs:** + +- Shader has compile errors in D3D9 or D3D11\_9X\(WSA\) [\#99](https://github.com/mob-sakai/UIEffect/issues/99) + +## [v2.6.1](https://github.com/mob-sakai/UIEffect/tree/v2.6.1) (2018-06-14) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.0...v2.6.1) + +**Fixed bugs:** + +- Errors occurred on build \(v2.6.0\) [\#90](https://github.com/mob-sakai/UIEffect/issues/90) + +## [v2.6.0](https://github.com/mob-sakai/UIEffect/tree/v2.6.0) (2018-06-14) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.2...v2.6.0) + +Blurring effect has been improved about 6 times faster! +![](https://user-images.githubusercontent.com/12690315/41393724-08420b1e-6fe2-11e8-8741-721789c2d029.png) + +You can change noise texture for dissolve effect from inspector or script! +![](https://user-images.githubusercontent.com/12690315/41397570-99bda636-6fef-11e8-827b-932d7a8e74c1.gif) + + + + +**Implemented enhancements:** + +- Improve blurring performance [\#88](https://github.com/mob-sakai/UIEffect/issues/88) +- Separate the effect with a character [\#86](https://github.com/mob-sakai/UIEffect/issues/86) +- Change dissolve texture [\#75](https://github.com/mob-sakai/UIEffect/issues/75) + +**Closed issues:** + +- Change BlurMode correctly [\#84](https://github.com/mob-sakai/UIEffect/issues/84) +- Refactoring to prepare v3.0.0 [\#83](https://github.com/mob-sakai/UIEffect/issues/83) +- Change ColorMode correctly [\#51](https://github.com/mob-sakai/UIEffect/issues/51) + +## [v2.5.2](https://github.com/mob-sakai/UIEffect/tree/v2.5.2) (2018-06-07) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.1...v2.5.2) + +**Fixed bugs:** + +- When `UIEFFECT\_SEPARATE` symbol is defined, UIDissolve does not work well [\#85](https://github.com/mob-sakai/UIEffect/issues/85) + +## [v2.5.1](https://github.com/mob-sakai/UIEffect/tree/v2.5.1) (2018-05-31) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.0...v2.5.1) + +**Fixed bugs:** + +- Fix demo [\#82](https://github.com/mob-sakai/UIEffect/issues/82) + +## [v2.5.0](https://github.com/mob-sakai/UIEffect/tree/v2.5.0) (2018-05-31) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.4.1...v2.5.0) + +Shiny effect has been update! + +![v2.5.0](https://user-images.githubusercontent.com/12690315/40654533-8877c99c-6379-11e8-8ae7-b91995fc230b.gif) + +* NOTE: `UIEffect.shadow***` will be obsolete in the near future. Please use `UIShadow` component instead. +* NOTE: `UIEffect.custom***` will be obsolete in the near future. Please use `UICustomEffect` component (experimental) instead. + +**Implemented enhancements:** + +- UIDissolve: Play effect from script/inspector [\#81](https://github.com/mob-sakai/UIEffect/issues/81) +- UIShiny: Play effect from script/inspector [\#80](https://github.com/mob-sakai/UIEffect/issues/80) +- During play mode, you can change the effect type, color type, and blur type \(in Editor\) [\#73](https://github.com/mob-sakai/UIEffect/issues/73) +- Add shadow effect as other component [\#72](https://github.com/mob-sakai/UIEffect/issues/72) +- UIShiny : Visual update [\#68](https://github.com/mob-sakai/UIEffect/issues/68) +- Add Custom effect as other component [\#60](https://github.com/mob-sakai/UIEffect/issues/60) + +**Fixed bugs:** + +- UIDissolve: When width=1 and location=0, image is lacked [\#79](https://github.com/mob-sakai/UIEffect/issues/79) + +**Closed issues:** + +- UIEffect inherit UIEffectBase [\#74](https://github.com/mob-sakai/UIEffect/issues/74) +- Change directory structure [\#56](https://github.com/mob-sakai/UIEffect/issues/56) + +## [v2.4.1](https://github.com/mob-sakai/UIEffect/tree/v2.4.1) (2018-05-29) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.4.0...v2.4.1) + +**Fixed bugs:** + +- UIEffectCapturedImage: The result image is flipped vertically [\#69](https://github.com/mob-sakai/UIEffect/issues/69) + +## [v2.4.0](https://github.com/mob-sakai/UIEffect/tree/v2.4.0) (2018-05-21) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.2...v2.4.0) + +UIDissolve has been updated! + +![v2.4.0](https://user-images.githubusercontent.com/12690315/40294019-a0bfb8aa-5d0e-11e8-8451-873502db6a99.gif) +![editor](https://user-images.githubusercontent.com/12690315/40294212-9e1b1ce2-5d0f-11e8-88ce-78a8c0523dc2.png) + +**Implemented enhancements:** + +- UIDissolve: Add color mode option. [\#64](https://github.com/mob-sakai/UIEffect/issues/64) + +## [v2.3.2](https://github.com/mob-sakai/UIEffect/tree/v2.3.2) (2018-05-21) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.1...v2.3.2) + +**Closed issues:** + +- Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically \(other method\) [\#65](https://github.com/mob-sakai/UIEffect/issues/65) + +## [v2.3.1](https://github.com/mob-sakai/UIEffect/tree/v2.3.1) (2018-05-10) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.0...v2.3.1) + +**Fixed bugs:** + +- UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically \(on Windows\) [\#62](https://github.com/mob-sakai/UIEffect/issues/62) + +## [v2.3.0](https://github.com/mob-sakai/UIEffect/tree/v2.3.0) (2018-05-08) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.2.0...v2.3.0) + +New components has been available! + +* **UIShiny** : Shiny effect WITHOUT Mask component. This will suppress extra draw calls and improve performance. +* **UIDissolve** : Dissolve effect WITHOUT material instancing. This will suppress extra draw calls and improve performance. +* **UIFlip** : Flip graphic horizontal/vertical. + +![v2.3.0](https://user-images.githubusercontent.com/12690315/40706142-cb98d2d0-6427-11e8-96fc-5cc5fd9c553a.gif) + + +**Implemented enhancements:** + +- Feature: Flip horizontal/vertical [\#47](https://github.com/mob-sakai/UIEffect/issues/47) +- Feature: Dissolve [\#45](https://github.com/mob-sakai/UIEffect/issues/45) +- Feature: Shining effect [\#9](https://github.com/mob-sakai/UIEffect/issues/9) + +## [v2.2.0](https://github.com/mob-sakai/UIEffect/tree/v2.2.0) (2018-04-12) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.1.0...v2.2.0) + +**Implemented enhancements:** + +- Feature: Customize shader/material. You can create a custom ui shader and control it with UIEffct. [\#46](https://github.com/mob-sakai/UIEffect/issues/46) +- Feature: UIEffectCapturedImage supports keep canvas size. [\#54](https://github.com/mob-sakai/UIEffect/issues/54) +- Feature: UIEffectCapturedImage supports `Quality Type` to easy setup. [\#53](https://github.com/mob-sakai/UIEffect/issues/53) + +**Fixed bugs:** + +- Bug: Color effect on shadow is incorrect. [\#55](https://github.com/mob-sakai/UIEffect/issues/55) + +**Closed issues:** + +- Change: Reduce the pixelation effect when tone level = 1. [\#57](https://github.com/mob-sakai/UIEffect/issues/57) + +## [v2.1.0](https://github.com/mob-sakai/UIEffect/tree/v2.1.0) (2018-04-04) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.0.0...v2.1.0) + +**Implemented enhancements:** + +- Feature: UIEffectCapturedImage support iterative operation [\#48](https://github.com/mob-sakai/UIEffect/issues/48) + +## [v2.0.0](https://github.com/mob-sakai/UIEffect/tree/v2.0.0) (2018-01-25) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.6.1...v2.0.0) + +**Breaking changes:** + +- Important: Unity 5.3.x & 5.4.x are no longer supported. [\#40](https://github.com/mob-sakai/UIEffect/issues/40) + +**Implemented enhancements:** + +- Improve: Reduce the materials. Too many effect materials are exist. [\#15](https://github.com/mob-sakai/UIEffect/issues/15) + +**Closed issues:** + +- Change: Change namespace to Coffee.UIExtensions [\#6](https://github.com/mob-sakai/UIEffect/issues/6) + +## [v1.6.1](https://github.com/mob-sakai/UIEffect/tree/v1.6.1) (2018-01-25) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.6.0...v1.6.1) + +**Fixed bugs:** + +- Bug: Cannot access protected member `UnityEngine.UI.BaseMeshEffect.graphic` [\#41](https://github.com/mob-sakai/UIEffect/issues/41) + +## [v1.6.0](https://github.com/mob-sakai/UIEffect/tree/v1.6.0) (2018-01-18) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.5.1...v1.6.0) + +**Fixed bugs:** + +- Bug: Pixelization is incorrect. [\#34](https://github.com/mob-sakai/UIEffect/issues/34) + +**Closed issues:** + +- Change: UIEffect inherit BaseMeshEffect. [\#35](https://github.com/mob-sakai/UIEffect/issues/35) +- Change: Blur level range to \[0-1\] [\#32](https://github.com/mob-sakai/UIEffect/issues/32) +- Change: ShadowMode -\> ShadowStyle [\#18](https://github.com/mob-sakai/UIEffect/issues/18) + +## [v1.5.1](https://github.com/mob-sakai/UIEffect/tree/v1.5.1) (2018-01-18) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.5.0...v1.5.1) + +**Fixed bugs:** + +- Bug: An error occurs when no effect is specified for UICapturedImage. [\#36](https://github.com/mob-sakai/UIEffect/issues/36) + +## [v1.5.0](https://github.com/mob-sakai/UIEffect/tree/v1.5.0) (2018-01-16) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.4...v1.5.0) + +**Implemented enhancements:** + +- Feature: ShadowMode 'Shadow 3' [\#11](https://github.com/mob-sakai/UIEffect/issues/11) +- Feature: Hue [\#8](https://github.com/mob-sakai/UIEffect/issues/8) +- Feature: Gradient [\#7](https://github.com/mob-sakai/UIEffect/issues/7) + +## [v1.4.4](https://github.com/mob-sakai/UIEffect/tree/v1.4.4) (2018-01-16) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.3...v1.4.4) + +**Fixed bugs:** + +- Bug: Error has occur on edit prefab. [\#27](https://github.com/mob-sakai/UIEffect/issues/27) + +## [v1.4.3](https://github.com/mob-sakai/UIEffect/tree/v1.4.3) (2018-01-15) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.2...v1.4.3) + +**Fixed bugs:** + +- Bug: Color effect is incorrect. [\#19](https://github.com/mob-sakai/UIEffect/issues/19) + +## [v1.4.2](https://github.com/mob-sakai/UIEffect/tree/v1.4.2) (2018-01-14) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.1...v1.4.2) + +**Implemented enhancements:** + +- Feature: ColorMode `Override` [\#12](https://github.com/mob-sakai/UIEffect/issues/12) + +**Fixed bugs:** + +- Bug: Error has occur OnAfterDeserialize in editor. [\#16](https://github.com/mob-sakai/UIEffect/issues/16) + +## [v1.4.1](https://github.com/mob-sakai/UIEffect/tree/v1.4.1) (2018-01-10) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.0...v1.4.1) + +## [v1.4.0](https://github.com/mob-sakai/UIEffect/tree/v1.4.0) (2018-01-07) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.3.0...v1.4.0) + +**Implemented enhancements:** + +- Feature: Exclude unused shader variants from build. [\#5](https://github.com/mob-sakai/UIEffect/issues/5) + +## [v1.3.0](https://github.com/mob-sakai/UIEffect/tree/v1.3.0) (2018-01-06) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.2.0...v1.3.0) + +## [v1.2.0](https://github.com/mob-sakai/UIEffect/tree/v1.2.0) (2018-01-05) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.1.0...v1.2.0) + +**Implemented enhancements:** + +- Feature: Fast multiple shadow effect. [\#2](https://github.com/mob-sakai/UIEffect/issues/2) + +**Fixed bugs:** + +- Pixelaration shifts to the lower right. [\#4](https://github.com/mob-sakai/UIEffect/issues/4) + +## [v1.1.0](https://github.com/mob-sakai/UIEffect/tree/v1.1.0) (2017-08-17) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.0.0...v1.1.0) + +**Implemented enhancements:** + +- Feature: Pixelization effect [\#1](https://github.com/mob-sakai/UIEffect/issues/1) + +## [v1.0.0](https://github.com/mob-sakai/UIEffect/tree/v1.0.0) (2017-03-01) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/a9c4ec4e72a055ca5e5c24f6a75c6720f0f6fd7f...v1.0.0) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..a26d8fbe --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2017 mob-sakai + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..e8aa8e1a --- /dev/null +++ b/README.md @@ -0,0 +1,222 @@ +UIEffect +=== + +UIEffect provide visual effect components for uGUI element in Unity. + +[![](https://img.shields.io/github/release/mob-sakai/UIEffect.svg?label=latest%20version)](https://github.com/mob-sakai/UIEffect/releases) +[![](https://img.shields.io/github/release-date/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/releases) +![](https://img.shields.io/badge/unity-5.5%2B-green.svg) +[![](https://img.shields.io/github/license/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/blob/master/LICENSE.txt) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](http://makeapullrequest.com) +[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai) + +<< [Description](#Description) | [WebGL Demo](#demo) | [Download](https://github.com/mob-sakai/UIEffect/releases) | [Usage](#usage) | [Example of using](#example-of-using) | [Development Note](#development-note) >> + +### What's new? [See changelog ![](https://img.shields.io/github/release-date/mob-sakai/UIEffect.svg?label=last%20updated)](https://github.com/mob-sakai/UIEffect/blob/develop/CHANGELOG.md) +### Do you want to receive notifications for new releases? [Watch this repo ![](https://img.shields.io/github/watchers/mob-sakai/UIEffect.svg?style=social&label=Watch)](https://github.com/mob-sakai/UIEffect/subscription) +### Support me on Patreon! [![become_a_patron](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/2343451?) + + + +



+## Description + +Let's decorate your UI with effects! +You can control parameters as you like from the script as well as inspector. +AnimationClip is supported as a matter of course! + +![thumbnail](https://user-images.githubusercontent.com/12690315/41398364-155cf5a6-6ff2-11e8-8124-9d16ef6ca267.gif) +![image](https://user-images.githubusercontent.com/12690315/38594668-636dd3ac-3d82-11e8-9951-820964a6a95f.gif) + +

+#### Available effects + +| Component | Features | Screenshot | +|-|-|-| +|**UIEffect**|Combine some visual effects.

**Effect Mode:** Grayscale, Sepia, Nega, Pixelation
**Color Mode:** Multiply, Fill, Additive, Subtract
**Blur Mode:** Fast, Medium, Detail
**Advanced Blur:** Enable more beautiful blurring.|| +|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.
This effect is non-realtime, light-weight, less-camera, but be effective enough.

**Effect Mode:** Grayscale, Sepia, Nega, Pixelation
**Color Mode:** Multiply, Fill, Additive, Subtract
**Blur Mode:** Fast, Medium, Detail
**Quality Mode:** Fast, Medium, Detail, Custom
**Capture On Enable:** When the component is enable, capture screen automatically.
**Blur iterations:** Number of blur iterations.
**Reduction/Downsampling Rate:** None, x1, x2, x4, x8
**Fit size to screen:** Fit RectTransform to the screen on captured.
**Immediate Capturing:**

*NOTE: This component can be used with UIEffect, UITransition etc.*
*NOTE: Immediate capturing does not support LWRP, WebGL and Unity 5.x for iOS/Mac.*|| +|**UIShiny**|Apply shining effect to a graphic.
The effect does not require Mask component or normal map.

**Parameters:** Effect factor, Width, Rotation, Softness, Brightness, Gloss
**Effect Player:** To play shining, enable `Play` in inspector or call `Play()` from script.|| +|**UIDissolve**|Apply dissolve effect to a graphic.

**Color Mode for edge:** Multiply, Fill, Additive, Subtract
**Parameters:** Effect factor, Width, Rotation, Softness, Edge color
**Options:** Effect area, Keep effect aspect ratio
**Effect Player:** To play dissolving, call `Play()` from script.|| +|**UIHsvModifier**|Modify HSV for graphic.

**Target:** Color, Range
**Adjustment:** Hue, Saturation, Value|| +|**UITransition Effect**|Apply transition effect with a single channel texture.

**Effect Mode:** Cutoff, Fade, Dissolve
**Options:** Effect area, Keep effect aspect ratio, transition texture
**Pass Ray On Hidden:** Disable the graphic's raycastTarget on hidden.
**Effect Player:** To show/hide transition, call `Show()/Hide()` from script.|| + +

+##### The following effects can be used with the above components. + +| Component | Features | Screenshot | +|-|-|-| +|**UIShadow**|Add shadow/outline to a graphic.
The performance is better than the default Shadow/Outline component.

**ShadowStyle:** Shadow, Shadow3, Outline, Outline8|| +|**UIGradient**|Change vertex color as gradient with angle and offset.

**Direction:** Horizontal, Vertical, Angle, Diagonal
**Options:** Offset, Color space|| +|**UIFlip**|Flip a graphic.

**Direction:** Horizontal, Vertical, Both|| + + + + +



+## Demo + +[WebGL Demo](http://mob-sakai.github.io/UIEffect) + +* Effect sample +* Transition +* Dialog window with blured background +* Included in unitypackage + + + + +



+## Usage + +1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases). +2. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu. +![](https://user-images.githubusercontent.com/12690315/46570979-edbb5a00-c9a7-11e8-845d-c5ee279effec.png) +3. In Unity5.6+, enable `TexCoord1` channel of canvas. See also [Development Note](##note-unity-56). +![](https://user-images.githubusercontent.com/12690315/46567584-3525f400-c970-11e8-9839-5c9e810b0b80.png) +4. Add any effect component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector or `Component > UI > UIEffect > ...` menu. +![](https://user-images.githubusercontent.com/12690315/46570977-ebf19680-c9a7-11e8-9ffb-174f56107070.png) +6. Adjust the parameters of the effect as you like, in inspector. +![image](https://user-images.githubusercontent.com/12690315/38594668-636dd3ac-3d82-11e8-9951-820964a6a95f.gif) +7. Enjoy! + + +##### Requirement + +* Unity 5.5+ *(included Unity 2018.x)* +* No other SDK are required + + + + +



+## Example of using + +| Case | Description | Screenshot | +|-|-|-| +|Lock/unlock contents|Use UIEffect to apply grayscale.
Indicate to user that the content is unavailable.|![](https://user-images.githubusercontent.com/12690315/46563469-aba8fe80-c93c-11e8-850f-949f6f8da742.png)| +|Silhouette|Use UIEffect for filling color.|![](https://user-images.githubusercontent.com/12690315/46563576-3db10700-c93d-11e8-960e-4336ff3ce481.png)| +|Soft shadow/
Outer glow|Use UIEffect and UIShadow to blur the shadow.
To blur only shadow, set `Blur Factor` in UIEffect to 0.|![](https://user-images.githubusercontent.com/12690315/46566001-452edb00-c952-11e8-9cc4-6098a9eb67f3.png)| +|Colored shadow|Use UIEffect and UIShadow to fill shadow with color.
To fill only shadow, set `Color Factor` in UIEffect to 0.|![](https://user-images.githubusercontent.com/12690315/46566000-452edb00-c952-11e8-8d20-6ccc3fa92ae4.png)| +|Blurred dynamic font|Use UIEffect to blur text.
To blur dynamic font cleanly, enable `Advanced Blur` option.|![](https://user-images.githubusercontent.com/12690315/46566002-45c77180-c952-11e8-87cb-4d915e0614be.png)| +|Text with outline & shadow|Use two UIShadows to add outline and shadow.
There is less overdraw than default Outline/Shadow `(Default: 1 x 5 x 2 = 10 overdraws, UIShadow: 1 + 4 + 1 = 6 overdraws)`.|![](https://user-images.githubusercontent.com/12690315/46566003-45c77180-c952-11e8-9b47-7bf563ffbaa7.png)| +|Shining button|Use UIShiny for shining button.
Shine the button and indicate to user that you can press the button.
Enable `Play` and `Loop` option to shine it without any AnimationClip.|![](https://user-images.githubusercontent.com/12690315/46563539-fb87c580-c93c-11e8-8c08-0f21872c47d4.gif)| +|Blurring the background of a menu|Use UIEffectCapturedImage to blur the background of a menu.
UIEffectCapturedImage applies an effect to the screen of the previous frame, without adding a camera or layer.
It's not a real-time post effect, so it's good performance and works well on mobile.|![](https://user-images.githubusercontent.com/12690315/46565712-735dec00-c94d-11e8-81b4-4e848d8fdb2e.png)| +|Screen transition|Use UITransitionEffect to add screen transition.
You can change transition texture (single channel texture).
Enable `Pass Ray On Hidden` option and use `Show()/Hide()` method to play transition without AnimationClip.|![](https://user-images.githubusercontent.com/12690315/46565182-dfd5ec80-c947-11e8-834f-a2ef67ad0d95.gif)| + + + + +



+## Development Note + +#### How does UIEffectCapturedImage work? + +![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif) + +`UIEffectCapturedImage` is similar to post effect, but uses `CommandBuffer` to give effect only on the rendering result (= captured image) of a specific frame. +This effect is non-realtime, light-weight, less-camera, blit only once, but be effective enough. + +* Camera for processing effect is unnecessary. +* Process effect only once after `UIEffectCapturedImage.Capture`. +* Using reduction buffer, keep using memory size small and keep the rendering load are small. +* When GameObjects with motion are on the screen, a result texture may be stirred. +* You can overlay and display like as: +`[Screen] | [UIEffectCapturedImage] | [Dialog A] | [UIEffectCapturedImage] | [Dialog B]`. +See also [Demo](#demo). + + +#### Why is UIEffect lightweight? + +* UIEffect pre-generates material from a combination of effects. This has the following benefits. + * Draw call batching If possible, draw calls will decrease. + * Since only the required material and shader variants are included in the build, the build size will be smaller. + + +#### How to control effect parameters for uGUI element WITHOUT MaterialPropertyBlock? + +* In general, you can use [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) for renderers to control minor changes in the material without different batches. +* However, changing the [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) of the uGUI element from the script will cause different batches and draw calls to increase. +* So UIEffect encodes multiple effect parameters to UV1 channel with [IMeshModifier](https://docs.unity3d.com/ScriptReference/UI.IMeshModifier.html). + * Pack four 6-bit [0-1] (64 steps) parameters into one float value. + * The parameters are lower precision, but sufficient. + +| uv1 | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] | +|-|-|-|-|-| +| x(32bit float) | Tone level | *Empty* | Blur level | *Empty* | +| y(32bit float) | Red channel | Green channel | Blue channel | Alpha channel | + +* In v3.0.0+, UIEffect uploads the parameter value to a shared texture and the shader refers to it. +This approach has the following advantages: + * More parameters for the effect are available. + * The parameter accuracy is improved from 6 bits to 8 bits. + * ModifyMesh is not called when parameter value is changed. + + +#### Note: Unity 5.6+ + +In Unity 5.6+, Canvas supports **Additional Shader Channels**. +Please enable `TexCoord1` to use UIEffect. +![image](https://user-images.githubusercontent.com/12690315/28405830-f4f261e8-6d68-11e7-9faf-7e5442062f59.png) +![image](https://user-images.githubusercontent.com/12690315/34560894-191b6cda-f18b-11e7-9de2-9a9d13f72ccd.png) + + +#### Note: if you include prefabs / scenes containing UIEffect in AssetBundle. + +Use script define symbol `UIEFFECT_SEPARATE`. +Unused shader variants and materials will be excluded from AssetBundles. + +||Combined mode (default)|Separated mode| +|-|-|-| +|Script define symbol| - |`UIEFFECT_SEPARATE`| +|Included in build|Only used variants|Only used variants| +|Included in AssetBundle|All variants (Heavy!)|Only used variants| +|Look in editor|![comb](https://user-images.githubusercontent.com/12690315/35324040-df4f1684-0132-11e8-9534-f958b93de158.png)|![sep](https://user-images.githubusercontent.com/12690315/35324405-fd5e89a6-0133-11e8-9d23-71ccc424fa21.png)| + + +#### How to improve performance? + +* Use `ShaderVariantCollection` to preload shader. +https://docs.unity3d.com/Manual/OptimizingShaderLoadTime.html +* Set camera's clear flag to "Solid Color". +* Enable multi thread rendering. + + +#### The issue of default Outline component + +Graphic with multiple outline components will generate a lot of overdraw. + +![image](https://user-images.githubusercontent.com/12690315/34552373-600fdab2-f164-11e7-8565-21c15af92a93.png) + +This is an overdraw view of image with three outline components. +Because there are many overdraws, it is very bright! +For each Outline component, increase the mesh by 5 times. (In the case of the Shadow component, it doubles the mesh.) +In the image above, `1 x 5 x 5 x 5 = 125` overdraws are generated. + +UIShadow's 'Addition Shadow' feature solves this issue by adding only the necessary mesh, `1 + 4 + 4 + 4 = 13` overdraws are generated. + + + + +



+## License + +* MIT +* © UTJ/UCL + + + +## Author + +[mob-sakai](https://github.com/mob-sakai) +[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai) +[![become_a_patron](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/2343451?) + + + +## See Also + +* GitHub page : https://github.com/mob-sakai/UIEffect +* Releases : https://github.com/mob-sakai/UIEffect/releases +* Issue tracker : https://github.com/mob-sakai/UIEffect/issues +* Current project : https://github.com/mob-sakai/UIEffect/projects/1 +* Change log : https://github.com/mob-sakai/UIEffect/blob/master/CHANGELOG.md diff --git a/package.json b/package.json new file mode 100644 index 00000000..67159433 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "com.coffee.uieffect", + "displayName": "UIEffect", + "description": " UIEffect is an effect component for uGUI element in Unity.\nLet's decorate your UI with effects!", + "version": "3.0.3", + "unity": "5.5", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/mob-sakai/UIEffect.git" + }, + "src": "Assets/Coffee/UIExtensions/UIEffect", + "author": "mob-sakai (https://github.com/mob-sakai)", + "editorOnly": false, + "upmSupport": false, + "dependencies": { + } +} From ed0095de5567e3edda02117244cf86a53061f39b Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 15 Feb 2019 21:36:38 +0900 Subject: [PATCH 7/7] update documents for v3.0.4 --- Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md | 13 +++++++++++++ Assets/Coffee/UIExtensions/UIEffect/package.json | 2 +- CHANGELOG.md | 13 +++++++++++++ ProjectSettings/ProjectSettings.asset | 4 +++- package.json | 2 +- 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md b/Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md index 69b4175c..a79ec34f 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md +++ b/Assets/Coffee/UIExtensions/UIEffect/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [v3.0.4](https://github.com/mob-sakai/UIEffect/tree/v3.0.4) (2019-02-15) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.3...v3.0.4) + +**Implemented enhancements:** + +- add initial play animation delay option to UIShiny [\#147](https://github.com/mob-sakai/UIEffect/pull/147) ([antpaw](https://github.com/antpaw)) + +**Fixed bugs:** + +- UIEffectCapturedImage.effectColor does not work as expected [\#148](https://github.com/mob-sakai/UIEffect/issues/148) +- fix warnings [\#146](https://github.com/mob-sakai/UIEffect/pull/146) ([antpaw](https://github.com/antpaw)) + ## [v3.0.3](https://github.com/mob-sakai/UIEffect/tree/v3.0.3) (2019-01-21) [Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.2...v3.0.3) diff --git a/Assets/Coffee/UIExtensions/UIEffect/package.json b/Assets/Coffee/UIExtensions/UIEffect/package.json index 67159433..efbf3fc9 100644 --- a/Assets/Coffee/UIExtensions/UIEffect/package.json +++ b/Assets/Coffee/UIExtensions/UIEffect/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.uieffect", "displayName": "UIEffect", "description": " UIEffect is an effect component for uGUI element in Unity.\nLet's decorate your UI with effects!", - "version": "3.0.3", + "version": "3.0.4", "unity": "5.5", "license": "MIT", "repository": { diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b4175c..a79ec34f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [v3.0.4](https://github.com/mob-sakai/UIEffect/tree/v3.0.4) (2019-02-15) + +[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.3...v3.0.4) + +**Implemented enhancements:** + +- add initial play animation delay option to UIShiny [\#147](https://github.com/mob-sakai/UIEffect/pull/147) ([antpaw](https://github.com/antpaw)) + +**Fixed bugs:** + +- UIEffectCapturedImage.effectColor does not work as expected [\#148](https://github.com/mob-sakai/UIEffect/issues/148) +- fix warnings [\#146](https://github.com/mob-sakai/UIEffect/pull/146) ([antpaw](https://github.com/antpaw)) + ## [v3.0.3](https://github.com/mob-sakai/UIEffect/tree/v3.0.3) (2019-01-21) [Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.2...v3.0.3) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c200c662..8df42fca 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -85,6 +85,7 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 0 allowFullscreenSwitch: 1 + graphicsJobMode: 0 macFullscreenMode: 2 d3d9FullscreenMode: 1 d3d11FullscreenMode: 1 @@ -125,6 +126,7 @@ PlayerSettings: m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 protectGraphicsMemory: 0 + useHDRDisplay: 0 AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 9 AndroidPreferredInstallLocation: 1 @@ -431,7 +433,7 @@ PlayerSettings: tizenMicrophonePermissions: 0 tizenDeploymentTarget: tizenDeploymentTargetType: 0 - tizenMinOSVersion: 0 + tizenMinOSVersion: 1 n3dsUseExtSaveData: 0 n3dsCompressStaticMem: 1 n3dsExtSaveDataNumber: 0x12345 diff --git a/package.json b/package.json index 67159433..efbf3fc9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.uieffect", "displayName": "UIEffect", "description": " UIEffect is an effect component for uGUI element in Unity.\nLet's decorate your UI with effects!", - "version": "3.0.3", + "version": "3.0.4", "unity": "5.5", "license": "MIT", "repository": {