Compare commits

...

24 Commits

Author SHA1 Message Date
semantic-release-bot a7e826c4f9 chore(release): 5.6.0 [skip ci]
# [5.6.0](https://github.com/mob-sakai/UIEffect/compare/5.5.3...5.6.0) (2025-03-28)

### Bug Fixes

* fix edge detection ([9462170](https://github.com/mob-sakai/UIEffect/commit/946217069f10714798070481d8576f5470e243db))
* fix project settings icon ([202601c](https://github.com/mob-sakai/UIEffect/commit/202601c96d6fb564ee5d6b8868b0ff0a8dba0ba1))
* the strength of ColorGlow, TransitionColorGlow, and ShadowColorGlow now changes according to intensity ([aa4ec8d](https://github.com/mob-sakai/UIEffect/commit/aa4ec8d9c449bfe361aa277e25cbb389e0daa983)), closes [#316](https://github.com/mob-sakai/UIEffect/issues/316)
* UIEffect with TextMeshPro SubMeshUI appears black in the editor when saving assets ([de91871](https://github.com/mob-sakai/UIEffect/commit/de918718d062979c8e9b4202b6b2ae389ae10bab))

### Features

* `TransitionAutoPlaySpeed`, `TransitionTexSpeed`, and `EdgeShinyAutoPlaySpeed` are previewed only when the object is selected in edit mode ([952a94f](https://github.com/mob-sakai/UIEffect/commit/952a94f50b3ae4279a48b03d019f341e46b2f5b7)), closes [#319](https://github.com/mob-sakai/UIEffect/issues/319)
* add 'Flip' feature ([def49c3](https://github.com/mob-sakai/UIEffect/commit/def49c34f5b963c8b0cce6fb8cace3f7d93b5a1e))
* add `Detail Filter` feature ([3e2c5c1](https://github.com/mob-sakai/UIEffect/commit/3e2c5c1613d9a2c08487d94c4eef28f066f2eb7b))
* add `EdgeColorGlow` option ([53db1e6](https://github.com/mob-sakai/UIEffect/commit/53db1e62546384f04b9c526df2623c4598dd34bf))
* add `onChangeRate` event for UIEffectTweener ([8ad57c8](https://github.com/mob-sakai/UIEffect/commit/8ad57c828ef4f1d7df6dd22c1edb7af3efa04d75)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
* add `TransitionTexSpeed` option ([6b8dc5e](https://github.com/mob-sakai/UIEffect/commit/6b8dc5ec338590d909511eba3bb1b2e0ec6627f3))
* add a tool that automatically fixes shaders when 'TextMeshPro Essential Resources' are located in a non-default path ([8388d59](https://github.com/mob-sakai/UIEffect/commit/8388d590457755cda0699835b37b5bf0673c4386))
* add built-in presets ([3db94e0](https://github.com/mob-sakai/UIEffect/commit/3db94e00f83195ff90d26ee270c7984825fa22b7))
* add shaders for TextMeshPro Overlay/SSD ([51cd6d8](https://github.com/mob-sakai/UIEffect/commit/51cd6d8525a12581c8afd4ab5d16e5968e15c8fe))
* Allow specifying a preset as the target for `UIEffectReplica` ([cb0e8d2](https://github.com/mob-sakai/UIEffect/commit/cb0e8d283bb8f9085d4910051b5ae0b77368db76))
* custom transform for transition and gradation ([045db9c](https://github.com/mob-sakai/UIEffect/commit/045db9c3b79234cd12bdfb4ea52898b7d86240af))
* expose color subfields as float-type public properties ([396d06f](https://github.com/mob-sakai/UIEffect/commit/396d06f774e10adee84d06156a7fc8723d986bbd)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
* load presets partially and append to existing instance ([6542543](https://github.com/mob-sakai/UIEffect/commit/654254342265fc239804e60a64d01b80076e5e8e))
* separate reverse curve for UIEffectTweener ([2540b75](https://github.com/mob-sakai/UIEffect/commit/2540b75349af92f1359433e73ffa3b5400479b02)), closes [#312](https://github.com/mob-sakai/UIEffect/issues/312)
* support `SoftMaskForUGUI ` package with `UIEffect` ([65457e2](https://github.com/mob-sakai/UIEffect/commit/65457e263644c36cd772ad1f42fb9fb3f84ab753)), closes [#270](https://github.com/mob-sakai/UIEffect/issues/270)
* support UIFlip as v4 compatible component ([e965b9e](https://github.com/mob-sakai/UIEffect/commit/e965b9e9ab33dcfab067542abf2f19bc1d5243fc)), closes [#322](https://github.com/mob-sakai/UIEffect/issues/322)
* update demo sample ([abc9a41](https://github.com/mob-sakai/UIEffect/commit/abc9a4184c4aeac85287a882d174f9cdc2c28c04)), closes [#318](https://github.com/mob-sakai/UIEffect/issues/318) [#320](https://github.com/mob-sakai/UIEffect/issues/320)
2025-03-28 09:16:55 +00:00
mob-sakai 78fbc9a330 docs: update readme
close #317
2025-03-19 09:24:06 +09:00
mob-sakai abc9a4184c feat: update demo sample
close #318, close #320
2025-03-19 09:24:05 +09:00
mob-sakai 3e2c5c1613 feat: add Detail Filter feature 2025-03-19 09:24:05 +09:00
mob-sakai cb0e8d283b feat: Allow specifying a preset as the target for UIEffectReplica 2025-03-19 09:24:05 +09:00
mob-sakai def49c34f5 feat: add 'Flip' feature 2025-03-19 09:24:05 +09:00
mob-sakai a0ac27291b chore: add symbolic linker for development 2025-03-19 09:24:05 +09:00
mob-sakai 8388d59045 feat: add a tool that automatically fixes shaders when 'TextMeshPro Essential Resources' are located in a non-default path 2025-03-19 09:24:05 +09:00
mob-sakai 53db1e6254 feat: add EdgeColorGlow option 2025-03-19 09:24:05 +09:00
mob-sakai aa4ec8d9c4 fix: the strength of ColorGlow, TransitionColorGlow, and ShadowColorGlow now changes according to intensity
close #316
2025-03-19 09:24:05 +09:00
mob-sakai e965b9e9ab feat: support UIFlip as v4 compatible component
close #322
2025-03-19 09:24:05 +09:00
mob-sakai 202601c96d fix: fix project settings icon 2025-03-19 09:24:05 +09:00
mob-sakai 396d06f774 feat: expose color subfields as float-type public properties
close #321
2025-03-19 09:24:05 +09:00
mob-sakai 8ad57c828e feat: add onChangeRate event for UIEffectTweener
close #321
2025-03-19 09:24:05 +09:00
mob-sakai 952a94f50b feat: TransitionAutoPlaySpeed, TransitionTexSpeed, and EdgeShinyAutoPlaySpeed are previewed only when the object is selected in edit mode
close #319
2025-03-19 09:24:05 +09:00
mob-sakai 2540b75349 feat: separate reverse curve for UIEffectTweener
close #312
2025-03-19 09:24:05 +09:00
mob-sakai 6b8dc5ec33 feat: add TransitionTexSpeed option 2025-03-19 09:24:05 +09:00
mob-sakai de918718d0 fix: UIEffect with TextMeshPro SubMeshUI appears black in the editor when saving assets 2025-03-19 09:24:05 +09:00
mob-sakai 045db9c3b7 feat: custom transform for transition and gradation 2025-03-19 09:24:05 +09:00
mob-sakai 6542543422 feat: load presets partially and append to existing instance 2025-03-19 09:24:05 +09:00
mob-sakai 3db94e00f8 feat: add built-in presets 2025-03-18 19:43:11 +09:00
mob-sakai 946217069f fix: fix edge detection 2025-03-18 19:43:11 +09:00
mob-sakai 51cd6d8525 feat: add shaders for TextMeshPro Overlay/SSD 2025-03-14 18:05:27 +09:00
mob-sakai 65457e2636 feat: support SoftMaskForUGUI package with UIEffect
This feature allow `UIEffect` component to automatically select shaders like 'UIEffect-SoftMaskable' without any manual configuration.
close #270
2025-03-06 17:50:56 +09:00
289 changed files with 53241 additions and 10449 deletions
@@ -1,74 +0,0 @@
using System;
using System.Linq;
using UnityEngine;
using Coffee.UIEffects;
using UnityEngine.Events;
using UnityEngine.UI;
public class ControlByScript : MonoBehaviour
{
[SerializeField]
private UIEffect m_Effect;
[SerializeField]
private ControlTemplate m_ControlTemplate;
private void Start()
{
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.toneFilter), typeof(ToneFilter),
(int)m_Effect.toneFilter, x => m_Effect.toneFilter = (ToneFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.toneIntensity), m_Effect.toneIntensity, x => m_Effect.toneIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.colorFilter), typeof(ColorFilter),
(int)m_Effect.colorFilter, x => m_Effect.colorFilter = (ColorFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.colorIntensity), m_Effect.colorIntensity, x => m_Effect.colorIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsColorDropDown(nameof(m_Effect.color), m_Effect.color, x => m_Effect.color = x);
m_ControlTemplate.Instantiate()
.InitAsSlider("Hue", m_Effect.color.r, x =>
{
var color = m_Effect.color;
color.r = x;
m_Effect.color = color;
});
m_ControlTemplate.Instantiate()
.InitAsToggle(nameof(m_Effect.colorGlow), m_Effect.colorGlow, x => m_Effect.colorGlow = x);
}
private void AddColor(ColorFilter filter, Action<ColorFilter> filterSetter,
float intensity, Action<float> intensitySetter,
Color color, Action<Color> colorSetter,
bool glow, Action<bool> glowSetter)
{
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.colorFilter), typeof(ColorFilter),
(int)m_Effect.colorFilter, x => m_Effect.colorFilter = (ColorFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.colorIntensity), m_Effect.colorIntensity, x => m_Effect.colorIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsColorDropDown(nameof(m_Effect.color), m_Effect.color, x => m_Effect.color = x);
m_ControlTemplate.Instantiate()
.InitAsSlider("Hue", m_Effect.color.r, x =>
{
var color = m_Effect.color;
color.r = x;
m_Effect.color = color;
});
m_ControlTemplate.Instantiate()
.InitAsToggle(nameof(m_Effect.colorGlow), m_Effect.colorGlow, x => m_Effect.colorGlow = x);
}
}
File diff suppressed because it is too large Load Diff
@@ -1,110 +0,0 @@
using System;
using System.Linq;
using UnityEngine;
using Coffee.UIEffects;
using UnityEngine.Events;
using UnityEngine.Serialization;
using UnityEngine.UI;
public class ControlTemplate : MonoBehaviour
{
[SerializeField]
private Text m_Label;
[SerializeField]
private Dropdown m_Dropdown;
[SerializeField]
private Slider m_Slider;
[SerializeField]
private Toggle m_Toggle;
[SerializeField]
private RawImage m_RawImage;
public ControlTemplate Instantiate()
{
var go = Instantiate(gameObject, transform.parent, false);
return go.GetComponent<ControlTemplate>();
}
public void InitAsDropDown(string label, Type enumType, int value, UnityAction<int> onValueChanged)
{
m_Label.text = label;
m_Dropdown.ClearOptions();
m_Dropdown.AddOptions(Enum.GetNames(enumType).ToList());
m_Dropdown.onValueChanged.RemoveAllListeners();
m_Dropdown.onValueChanged.AddListener(onValueChanged);
m_Dropdown.SetValueWithoutNotify(value);
// m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
private static readonly (string name, Color color)[] s_Colors = new (string, Color)[]
{
("-", Color.clear),
("White", Color.white),
("Red", Color.red),
("Green", Color.green),
("Blue", Color.blue),
("Yellow", Color.yellow),
("Cyan", Color.cyan),
("Magenta", Color.magenta),
("Black", Color.black)
};
public void InitAsColorDropDown(string label, Color value, UnityAction<Color> onValueChanged)
{
m_Label.text = label;
m_Dropdown.ClearOptions();
m_Dropdown.AddOptions(s_Colors.Select(x => x.name).ToList());
m_Dropdown.onValueChanged.RemoveAllListeners();
m_Dropdown.onValueChanged.AddListener(x =>
{
m_RawImage.color = s_Colors[x].color;
onValueChanged(s_Colors[x].color);
});
m_RawImage.color = value;
m_Dropdown.SetValueWithoutNotify(0);
// m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(true);
}
public void InitAsSlider(string label, float value, UnityAction<float> onValueChanged)
{
m_Label.text = label;
m_Slider.onValueChanged.RemoveAllListeners();
m_Slider.onValueChanged.AddListener(onValueChanged);
m_Slider.SetValueWithoutNotify(value);
m_Dropdown.gameObject.SetActive(false);
// m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
public void InitAsToggle(string label, bool value, UnityAction<bool> onValueChanged)
{
m_Label.text = label;
m_Toggle.onValueChanged.RemoveAllListeners();
m_Toggle.onValueChanged.AddListener(onValueChanged);
m_Toggle.SetIsOnWithoutNotify(value);
m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
// m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 KiB

File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fda8f6b673bdc4e84b040385ee78bf83
guid: 2d11887dcfdae4a4faf731ca7777dd28
DefaultImporter:
externalObjects: {}
userData:
@@ -0,0 +1,116 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CarterOne-Regular SDF Overlay Mobile
m_Shader: {fileID: 4800000, guid: a02a7d8c237544f1962732b55a9aebf1, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0.5
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskEdgeSoftness: 0.01
- _MaskInverse: 0
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _MaskWipeControl: 0.5
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5a5cc54c1f12241ff8d794ef8ca1c16e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,108 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CarterOne-Regular SDF Overlay
m_Shader: {fileID: 4800000, guid: dd89cf5b9246416f84610a006f916af7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0.5
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb2000f2042fb4545b8af94316e74dbc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,116 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CarterOne-Regular SSD Mobile
m_Shader: {fileID: 4800000, guid: c8d12adcee749c344b8117cf7c7eb912, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0.5
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskEdgeSoftness: 0.01
- _MaskInverse: 0
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _MaskWipeControl: 0.5
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9426c45abd5c54484b10707936c04ade
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,108 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CarterOne-Regular SSD
m_Shader: {fileID: 4800000, guid: 14eb328de4b8eb245bb7cea29e4ac00b, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0.5
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 06cd8c04a12a94e6084bc44a7e8454f6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,81 +0,0 @@
#if UNITY_EDITOR
using System.Diagnostics;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
internal static class ImportSample
{
[MenuItem("Development/Import TMP Support V1", false, 2001)]
private static void ImportTMPSupportV1()
{
Run("TextMeshPro Support");
}
[MenuItem("Development/Import TMP Support V2", false, 2002)]
private static void ImportTMPSupportV2()
{
Run("TextMeshPro Support (Unity 6)");
}
[InitializeOnLoadMethod]
private static void ImportSampleOnLoad()
{
#if UNITY_2023_2_OR_NEWER
ImportTMPSupportV2();
#else
ImportTMPSupportV1();
#endif
}
private static void Run(string sample)
{
#if UNITY_EDITOR_WIN
var bash = @"C:\Program Files\Git\bin\bash.exe";
if (!File.Exists(bash))
{
bash = @"C:\Program Files (x86)\Git\bin\bash.exe";
}
#else
var bash = "/bin/bash";
#endif
var p = new Process()
{
StartInfo = new ProcessStartInfo()
{
Arguments = $"import-tmp-support.sh '{sample}'",
CreateNoWindow = true,
FileName = bash,
RedirectStandardError = true,
RedirectStandardOutput = true,
WorkingDirectory = $"{Application.dataPath}/..",
UseShellExecute = false
},
EnableRaisingEvents = true
};
p.Exited += (_, __) =>
{
var result = new StringBuilder();
var stdout = p.StandardOutput.ReadToEnd();
result.Append("stdout: ");
result.Append(stdout);
result.AppendLine();
result.Append("stderr: ");
result.Append(p.StandardError.ReadToEnd());
Debug.Log(result);
if (p.ExitCode == 0 && stdout.StartsWith("Imported: "))
{
var path = stdout.Replace("Imported: ", "").Trim();
AssetDatabase.ImportAsset(path, ImportAssetOptions.ImportRecursive);
}
};
p.Start();
}
}
#endif
@@ -0,0 +1,78 @@
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using Debug = UnityEngine.Debug;
internal static class TextMeshProSupport
{
private const string k_Version = "userData: v5.6.0";
private const string k_VersionUnity6 = k_Version + " (Unity 6)";
private static readonly Dictionary<string, string> s_FileGuids = new Dictionary<string, string>()
{
{ "Hidden-TMP_Bitmap-Mobile-UIEffect.shader.meta", "guid: 63a1dba10bff94661a909d63808a9a3b" },
{ "Hidden-TMP_Bitmap-UIEffect.shader.meta", "guid: d1cb940e3804b4adcaf9b22083fadfad" },
{ "Hidden-TMP_SDF Overlay-UIEffect.shader.meta", "guid: 03ea49e29b5ad4fbe8e340af208fe8e7" },
{ "Hidden-TMP_SDF SSD-UIEffect.shader.meta", "guid: 26b66f9b09b8d4ac6a2790c3fa8b21c1" },
{ "Hidden-TMP_SDF-Mobile Overlay-UIEffect.shader.meta", "guid: 16f26337621974eaf998b9857bac39c6" },
{ "Hidden-TMP_SDF-Mobile SSD-UIEffect.shader.meta", "guid: 2c69b4dabb5c24ae99889f581c8b556a" },
{ "Hidden-TMP_SDF-Mobile-UIEffect.shader.meta", "guid: e65241fa80a374114b3f55ed746c04d9" },
{ "Hidden-TMP_SDF-UIEffect.shader.meta", "guid: 935b7be1c88464d2eb87204fdfab5a38" }
};
[MenuItem("Development/TextMeshPro/", false, -40)]
private static void _()
{
}
[MenuItem("Development/TextMeshPro/List GUID, Version for TMP Samples", false)]
private static void ListGuidsAndVersions()
{
var sb = new StringBuilder();
ForEachMeta(x =>
{
var (path, guid, version) = x;
sb.AppendLine($"{guid},\tversion: {version},\t{Path.GetFileName(path)}");
});
Debug.Log(sb);
}
[MenuItem("Development/TextMeshPro/Update GUID, Version for TMP Samples", false)]
private static void UpdateGuidsAndVersions()
{
ForEachMeta(x =>
{
var (path, guid, version) = x;
var fileName = Path.GetFileName(path);
s_FileGuids.TryGetValue(fileName.Replace("-Unity6", ""), out var expectedGuid);
var expectedVersion = path.Contains("-Unity6") ? k_VersionUnity6 : k_Version;
if (expectedGuid != guid || expectedVersion != version)
{
Debug.Log($"Update: {fileName}");
var meta = File.ReadAllText(path);
File.WriteAllText(path, meta.Replace(guid, expectedGuid).Replace(version, expectedVersion));
}
});
}
private static void ForEachMeta(Action<(string path, string guid, string version)> action)
{
foreach (var p in Directory.GetFiles("Packages/src/Samples~", "*.shader.meta", SearchOption.AllDirectories))
{
var fileName = Path.GetFileName(p);
if (!fileName.Contains("TMP_")) continue;
var meta = File.ReadAllText(p);
var guid = Regex.Match(meta, @"(guid: \w+)$", RegexOptions.Multiline).Groups[1].Value;
var version = Regex.Match(meta, @"(userData: .*)$", RegexOptions.Multiline).Groups[1].Value;
action((p, guid, version));
}
}
}
#endif
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 09ae172f2711c4f2cafc2417dac00d34
guid: 8d415f5270a5d45608931175d5835110
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -123,6 +123,43 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &10648190
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 10648191}
m_Layer: 5
m_Name: Overlay Mobile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &10648191
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 10648190}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1104939386}
m_Father: {fileID: 795204878}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &35634202
GameObject:
m_ObjectHideFlags: 0
@@ -485,7 +522,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 114739998}
m_CullTransparentMesh: 1
--- !u!1 &368143712
--- !u!1 &162579139
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -493,34 +530,302 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 368143713}
- component: {fileID: 162579140}
- component: {fileID: 162579143}
- component: {fileID: 162579142}
- component: {fileID: 162579141}
m_Layer: 5
m_Name: Space
m_Name: TITLE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &368143713
--- !u!224 &162579140
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 368143712}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_GameObject: {fileID: 162579139}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 795204878}
m_RootOrder: 4
m_Father: {fileID: 779059310}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.000015258789, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &162579141
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162579139}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcd162ab5f95d4f82a841acc1e950418, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Target: {fileID: 1887047861}
m_UseTargetTransform: 0
m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!114 &162579142
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162579139}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: SSD
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 06cd8c04a12a94e6084bc44a7e8454f6, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 71.4
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &162579143
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162579139}
m_CullTransparentMesh: 1
--- !u!1 &252380787
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 252380788}
- component: {fileID: 252380791}
- component: {fileID: 252380790}
- component: {fileID: 252380789}
m_Layer: 5
m_Name: TITLE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &252380788
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 252380787}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1563788056}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.000015258789, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &252380789
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 252380787}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcd162ab5f95d4f82a841acc1e950418, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Target: {fileID: 1887047861}
m_UseTargetTransform: 0
m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!114 &252380790
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 252380787}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Overlay
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: cb2000f2042fb4545b8af94316e74dbc, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 71.4
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &252380791
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 252380787}
m_CullTransparentMesh: 1
--- !u!21 &509591527
Material:
serializedVersion: 8
@@ -715,6 +1020,43 @@ MonoBehaviour:
m_UseTargetTransform: 0
m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!1 &622625912
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 622625913}
m_Layer: 5
m_Name: SSD Mobile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &622625913
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 622625912}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 790108298}
m_Father: {fileID: 795204878}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &632405357
GameObject:
m_ObjectHideFlags: 0
@@ -842,6 +1184,195 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 632405357}
m_CullTransparentMesh: 1
--- !u!1 &779059309
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 779059310}
m_Layer: 5
m_Name: SSD
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &779059310
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 779059309}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 162579140}
m_Father: {fileID: 795204878}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &790108297
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 790108298}
- component: {fileID: 790108301}
- component: {fileID: 790108300}
- component: {fileID: 790108299}
m_Layer: 5
m_Name: TITLE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &790108298
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 790108297}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 622625913}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &790108299
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 790108297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcd162ab5f95d4f82a841acc1e950418, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Target: {fileID: 1887047861}
m_UseTargetTransform: 0
m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!114 &790108300
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 790108297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: SSD Mobile
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 9426c45abd5c54484b10707936c04ade, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 71.25
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &790108301
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 790108297}
m_CullTransparentMesh: 1
--- !u!1 &795204877
GameObject:
m_ObjectHideFlags: 0
@@ -878,7 +1409,10 @@ RectTransform:
- {fileID: 1489226064}
- {fileID: 1044616015}
- {fileID: 1530152937}
- {fileID: 368143713}
- {fileID: 1563788056}
- {fileID: 10648191}
- {fileID: 779059310}
- {fileID: 622625913}
m_Father: {fileID: 1887047860}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1261,6 +1795,158 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1104939385
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1104939386}
- component: {fileID: 1104939389}
- component: {fileID: 1104939388}
- component: {fileID: 1104939387}
m_Layer: 5
m_Name: TITLE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1104939386
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1104939385}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 10648191}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1104939387
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1104939385}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcd162ab5f95d4f82a841acc1e950418, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Target: {fileID: 1887047861}
m_UseTargetTransform: 0
m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!114 &1104939388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1104939385}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Overlay Mobile
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 5a5cc54c1f12241ff8d794ef8ca1c16e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 52
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1104939389
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1104939385}
m_CullTransparentMesh: 1
--- !u!1 &1339549413
GameObject:
m_ObjectHideFlags: 0
@@ -1447,6 +2133,43 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1563788055
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1563788056}
m_Layer: 5
m_Name: Overlay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1563788056
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1563788055}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 252380788}
m_Father: {fileID: 795204878}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1612340793
GameObject:
m_ObjectHideFlags: 0
@@ -1649,6 +2372,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -1686,6 +2411,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -1723,13 +2449,13 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1887047859}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 0, y: 0}
m_Softness: {x: 500, y: 0}
--- !u!1 &1932217252
GameObject:
m_ObjectHideFlags: 0
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7cf8e0d1fc8d94fb9944cf32a03c4cfa
guid: 14bf4da62b8434d7ca6e6a7e8b63e4ea
folderAsset: yes
DefaultImporter:
externalObjects: {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 43c4f102824e943cf859c0d6c966b9fa
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -8,6 +8,47 @@ ShaderVariantCollection:
m_PrefabAsset: {fileID: 0}
m_Name: UIEffectShaderVariants
m_Shaders:
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
second:
variants:
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
passType: 0
- keywords: COLOR_MULTIPLY GLOW_ON UNDERLAY_ON
passType: 0
- keywords: EDGE_COLOR_REPLACE EDGE_PLAIN GLOW_ON UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SHADOW_COLOR_REPLACE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
passType: 0
- first: {fileID: 4800000, guid: 96246b1ead49a4c5a996fd477bc5a117, type: 3}
second:
variants:
@@ -38,6 +79,18 @@ ShaderVariantCollection:
passType: 0
- keywords: COLOR_SUBTRACTIVE
passType: 0
- keywords: DETAIL_ADDITIVE
passType: 0
- keywords: DETAIL_MASKING
passType: 0
- keywords: DETAIL_MULTIPLY
passType: 0
- keywords: DETAIL_MULTIPLY EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
passType: 0
- keywords: DETAIL_MULTIPLY_ADDITIVE
passType: 0
- keywords: DETAIL_REPLACE
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN SHADOW_COLOR_MULTIPLY_ADDITIVE
@@ -62,14 +115,10 @@ ShaderVariantCollection:
passType: 0
- keywords: SAMPLING_BLUR_FAST
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE TONE_GRAYSCALE
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE TONE_GRAYSCALE
passType: 0
- keywords: SAMPLING_BLUR_MEDIUM
passType: 0
- keywords: SAMPLING_EDGE_ALPHA
@@ -104,6 +153,8 @@ ShaderVariantCollection:
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
@@ -126,80 +177,6 @@ ShaderVariantCollection:
passType: 0
- keywords: TRANSITION_FADE
passType: 0
- first: {fileID: 4800000, guid: e65241fa80a374114b3f55ed746c04d9, type: 3}
second:
variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
second:
variants:
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
passType: 0
- keywords: EDGE_COLOR_REPLACE EDGE_PLAIN GLOW_ON UNDERLAY_ON
passType: 0
- keywords: EDGE_COLOR_REPLACE EDGE_SHINY GLOW_ON UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SHADOW_COLOR_REPLACE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON UNDERLAY_ON
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO
passType: 0
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0
- first: {fileID: 4800000, guid: d1cb940e3804b4adcaf9b22083fadfad, type: 3}
second:
variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0
- first: {fileID: 4800000, guid: 63a1dba10bff94661a909d63808a9a3b, type: 3}
second:
variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -219,7 +196,25 @@ MonoBehaviour:
m_UseHDRColorPicker: 1
m_ShaderVariantCollection: {fileID: -8740588384831342173}
m_ShaderVariantRegistry:
m_OptionalShaders: []
m_OptionalShaders:
- key: Hidden/TextMeshPro/Bitmap (SoftMaskable)
value: Hidden/TextMeshPro/Bitmap (UIEffect)
- key: Hidden/TextMeshPro/Distance Field (SoftMaskable)
value: Hidden/TextMeshPro/Distance Field (UIEffect)
- key: Hidden/TextMeshPro/Distance Field Overlay (SoftMaskable)
value: Hidden/TextMeshPro/Distance Field Overlay (UIEffect)
- key: Hidden/TextMeshPro/Distance Field SSD (SoftMaskable)
value: Hidden/TextMeshPro/Distance Field SSD (UIEffect)
- key: Hidden/TextMeshPro/Mobile/Bitmap (SoftMaskable)
value: Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)
- key: Hidden/TextMeshPro/Mobile/Distance Field (SoftMaskable)
value: Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)
- key: Hidden/TextMeshPro/Mobile/Distance Field Overlay (SoftMaskable)
value: Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)
- key: Hidden/TextMeshPro/Mobile/Distance Field SSD (SoftMaskable)
value: Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)
- key: Hidden/UI/Default (SoftMaskable)
value: Hidden/UI/Default (UIEffect)
m_Asset: {fileID: -8740588384831342173}
m_ErrorOnUnregisteredVariant: 0
m_UnregisteredVariants: []
+1
View File
@@ -3,6 +3,7 @@
"com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
"com.unity.ide.rider": "3.0.34",
"com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.9",
+7
View File
@@ -23,6 +23,13 @@
},
"hash": "2045eaab5b485827cef8bf0bb9e1552dce4f8d6d"
},
"com.coffee.symbolic-linker": {
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "3c280f1a8f4db5038b881ff07f270efd9638fa31"
},
"com.coffee.ui-effect": {
"version": "file:src",
"depth": 0,
+31
View File
@@ -1,3 +1,34 @@
# [5.6.0](https://github.com/mob-sakai/UIEffect/compare/5.5.3...5.6.0) (2025-03-28)
### Bug Fixes
* fix edge detection ([9462170](https://github.com/mob-sakai/UIEffect/commit/946217069f10714798070481d8576f5470e243db))
* fix project settings icon ([202601c](https://github.com/mob-sakai/UIEffect/commit/202601c96d6fb564ee5d6b8868b0ff0a8dba0ba1))
* the strength of ColorGlow, TransitionColorGlow, and ShadowColorGlow now changes according to intensity ([aa4ec8d](https://github.com/mob-sakai/UIEffect/commit/aa4ec8d9c449bfe361aa277e25cbb389e0daa983)), closes [#316](https://github.com/mob-sakai/UIEffect/issues/316)
* UIEffect with TextMeshPro SubMeshUI appears black in the editor when saving assets ([de91871](https://github.com/mob-sakai/UIEffect/commit/de918718d062979c8e9b4202b6b2ae389ae10bab))
### Features
* `TransitionAutoPlaySpeed`, `TransitionTexSpeed`, and `EdgeShinyAutoPlaySpeed` are previewed only when the object is selected in edit mode ([952a94f](https://github.com/mob-sakai/UIEffect/commit/952a94f50b3ae4279a48b03d019f341e46b2f5b7)), closes [#319](https://github.com/mob-sakai/UIEffect/issues/319)
* add 'Flip' feature ([def49c3](https://github.com/mob-sakai/UIEffect/commit/def49c34f5b963c8b0cce6fb8cace3f7d93b5a1e))
* add `Detail Filter` feature ([3e2c5c1](https://github.com/mob-sakai/UIEffect/commit/3e2c5c1613d9a2c08487d94c4eef28f066f2eb7b))
* add `EdgeColorGlow` option ([53db1e6](https://github.com/mob-sakai/UIEffect/commit/53db1e62546384f04b9c526df2623c4598dd34bf))
* add `onChangeRate` event for UIEffectTweener ([8ad57c8](https://github.com/mob-sakai/UIEffect/commit/8ad57c828ef4f1d7df6dd22c1edb7af3efa04d75)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
* add `TransitionTexSpeed` option ([6b8dc5e](https://github.com/mob-sakai/UIEffect/commit/6b8dc5ec338590d909511eba3bb1b2e0ec6627f3))
* add a tool that automatically fixes shaders when 'TextMeshPro Essential Resources' are located in a non-default path ([8388d59](https://github.com/mob-sakai/UIEffect/commit/8388d590457755cda0699835b37b5bf0673c4386))
* add built-in presets ([3db94e0](https://github.com/mob-sakai/UIEffect/commit/3db94e00f83195ff90d26ee270c7984825fa22b7))
* add shaders for TextMeshPro Overlay/SSD ([51cd6d8](https://github.com/mob-sakai/UIEffect/commit/51cd6d8525a12581c8afd4ab5d16e5968e15c8fe))
* Allow specifying a preset as the target for `UIEffectReplica` ([cb0e8d2](https://github.com/mob-sakai/UIEffect/commit/cb0e8d283bb8f9085d4910051b5ae0b77368db76))
* custom transform for transition and gradation ([045db9c](https://github.com/mob-sakai/UIEffect/commit/045db9c3b79234cd12bdfb4ea52898b7d86240af))
* expose color subfields as float-type public properties ([396d06f](https://github.com/mob-sakai/UIEffect/commit/396d06f774e10adee84d06156a7fc8723d986bbd)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
* load presets partially and append to existing instance ([6542543](https://github.com/mob-sakai/UIEffect/commit/654254342265fc239804e60a64d01b80076e5e8e))
* separate reverse curve for UIEffectTweener ([2540b75](https://github.com/mob-sakai/UIEffect/commit/2540b75349af92f1359433e73ffa3b5400479b02)), closes [#312](https://github.com/mob-sakai/UIEffect/issues/312)
* support `SoftMaskForUGUI ` package with `UIEffect` ([65457e2](https://github.com/mob-sakai/UIEffect/commit/65457e263644c36cd772ad1f42fb9fb3f84ab753)), closes [#270](https://github.com/mob-sakai/UIEffect/issues/270)
* support UIFlip as v4 compatible component ([e965b9e](https://github.com/mob-sakai/UIEffect/commit/e965b9e9ab33dcfab067542abf2f19bc1d5243fc)), closes [#322](https://github.com/mob-sakai/UIEffect/issues/322)
* update demo sample ([abc9a41](https://github.com/mob-sakai/UIEffect/commit/abc9a4184c4aeac85287a882d174f9cdc2c28c04)), closes [#318](https://github.com/mob-sakai/UIEffect/issues/318) [#320](https://github.com/mob-sakai/UIEffect/issues/320)
## [5.5.3](https://github.com/mob-sakai/UIEffect/compare/5.5.2...5.5.3) (2025-03-06)
@@ -0,0 +1,35 @@
using System.Collections.Generic;
using UnityEditor.Build;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
namespace Coffee.UIEffects.Editors
{
internal class RemoveSoftMaskableVariantsIfNeeded : IPreprocessShaders
{
public int callbackOrder => 1;
// Remove the 'SOFTMASKABLE' variants if 'SoftMaskForUGUI' package is not installed.
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
{
// If the shader is not for UIEffect: skip.
if (!shader.name.EndsWith(" (UIEffect)")) return;
// If the 'SoftMaskForUGUI' package is installed: skip.
if (PackageInfo.FindForAssetPath("Packages/com.coffee.softmask-for-ugui/package.json") != null) return;
// Remove the 'SOFTMASKABLE' variants.
var softMaskable = new ShaderKeyword(shader, "SOFTMASKABLE");
for (var i = data.Count - 1; i >= 0; i--)
{
var d = data[i];
if (d.shaderKeywordSet.IsEnabled(softMaskable))
{
data.RemoveAt(i);
}
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e42595bbbad4941a686a82e328aa266b
timeCreated: 1487152293
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+140 -17
View File
@@ -12,8 +12,13 @@ namespace Coffee.UIEffects.Editors
/// </summary>
[CustomEditor(typeof(UIEffect), true)]
[CanEditMultipleObjects]
public class UIEffect2Editor : Editor
public class UIEffectEditor : Editor
{
private class UIEffectEditorSettings : ScriptableSingleton<UIEffectEditorSettings>
{
public bool m_ExpandOthers = true;
}
private static readonly PropertyInfo s_PiGradient = typeof(SerializedProperty)
.GetProperty("gradientValue", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
@@ -43,6 +48,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _transitionTex;
private SerializedProperty _transitionTexScale;
private SerializedProperty _transitionTexOffset;
private SerializedProperty _transitionTexSpeed;
private SerializedProperty _transitionReverse;
private SerializedProperty _transitionRotation;
private SerializedProperty _transitionKeepAspectRatio;
@@ -90,13 +96,29 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _edgeWidth;
private SerializedProperty _edgeColorFilter;
private SerializedProperty _edgeColor;
private SerializedProperty _edgeColorGlow;
private SerializedProperty _edgeShinyRate;
private SerializedProperty _edgeShinyWidth;
private SerializedProperty _edgeShinyAutoPlaySpeed;
private SerializedProperty _patternArea;
private bool _expandOthers = true;
private SerializedProperty _detailFilter;
private SerializedProperty _detailIntensity;
private SerializedProperty _detailThreshold;
private SerializedProperty _detailTex;
private SerializedProperty _detailTexScale;
private SerializedProperty _detailTexOffset;
private SerializedProperty _detailTexSpeed;
private SerializedProperty _allowToModifyMeshShape;
private SerializedProperty _customRoot;
private SerializedProperty _flip;
private static bool expandOthers
{
set => UIEffectEditorSettings.instance.m_ExpandOthers = value;
get => UIEffectEditorSettings.instance.m_ExpandOthers;
}
private void OnEnable()
{
@@ -120,6 +142,7 @@ namespace Coffee.UIEffects.Editors
_transitionTex = serializedObject.FindProperty("m_TransitionTex");
_transitionTexScale = serializedObject.FindProperty("m_TransitionTexScale");
_transitionTexOffset = serializedObject.FindProperty("m_TransitionTexOffset");
_transitionTexSpeed = serializedObject.FindProperty("m_TransitionTexSpeed");
_transitionReverse = serializedObject.FindProperty("m_TransitionReverse");
_transitionRotation = serializedObject.FindProperty("m_TransitionRotation");
_transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio");
@@ -157,6 +180,7 @@ namespace Coffee.UIEffects.Editors
_edgeWidth = serializedObject.FindProperty("m_EdgeWidth");
_edgeColorFilter = serializedObject.FindProperty("m_EdgeColorFilter");
_edgeColor = serializedObject.FindProperty("m_EdgeColor");
_edgeColorGlow = serializedObject.FindProperty("m_EdgeColorGlow");
_edgeShinyRate = serializedObject.FindProperty("m_EdgeShinyRate");
_edgeShinyWidth = serializedObject.FindProperty("m_EdgeShinyWidth");
_edgeShinyAutoPlaySpeed = serializedObject.FindProperty("m_EdgeShinyAutoPlaySpeed");
@@ -172,7 +196,17 @@ namespace Coffee.UIEffects.Editors
_gradationScale = serializedObject.FindProperty("m_GradationScale");
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
_detailThreshold = serializedObject.FindProperty("m_DetailThreshold");
_detailTex = serializedObject.FindProperty("m_DetailTex");
_detailTexScale = serializedObject.FindProperty("m_DetailTexScale");
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
_customRoot = serializedObject.FindProperty("m_CustomRoot");
_flip = serializedObject.FindProperty("m_Flip");
}
public override void OnInspectorGUI()
@@ -235,6 +269,12 @@ namespace Coffee.UIEffects.Editors
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_transitionTexScale, EditorGUIUtility.TrTempContent("Scale"));
EditorGUILayout.PropertyField(_transitionTexOffset, EditorGUIUtility.TrTempContent("Offset"));
EditorGUILayout.PropertyField(_transitionTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
if (_transitionTexSpeed.vector2Value != Vector2.zero)
{
EditorApplication.QueuePlayerLoopUpdate();
}
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
@@ -377,7 +417,7 @@ namespace Coffee.UIEffects.Editors
if (DrawHeaderPopup(_edgeMode))
{
EditorGUILayout.PropertyField(_edgeWidth);
DrawColor(_edgeColorFilter, _edgeColor, null);
DrawColor(_edgeColorFilter, _edgeColor, _edgeColorGlow);
if ((EdgeMode)_edgeMode.intValue == EdgeMode.Shiny)
{
@@ -397,12 +437,45 @@ namespace Coffee.UIEffects.Editors
}
}
// Detail filter
DrawSeparator();
_expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others");
if (_expandOthers)
if (DrawHeaderPopup(_detailFilter))
{
EditorGUI.indentLevel++;
if ((DetailFilter)_detailFilter.intValue == DetailFilter.Masking)
{
EditorGUILayout.PropertyField(_detailThreshold);
}
else
{
EditorGUILayout.PropertyField(_detailIntensity);
}
EditorGUILayout.PropertyField(_detailTex);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_detailTexScale, EditorGUIUtility.TrTempContent("Scale"));
EditorGUILayout.PropertyField(_detailTexOffset, EditorGUIUtility.TrTempContent("Offset"));
EditorGUILayout.PropertyField(_detailTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
if (_detailTexSpeed.vector2Value != Vector2.zero)
{
EditorApplication.QueuePlayerLoopUpdate();
}
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
EditorGUI.indentLevel--;
EditorGUI.indentLevel--;
}
DrawSeparator();
expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(expandOthers, "Others");
if (expandOthers)
{
EditorGUILayout.PropertyField(_samplingScale);
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
EditorGUILayout.PropertyField(_customRoot);
EditorGUILayout.PropertyField(_flip);
}
}
@@ -544,26 +617,38 @@ namespace Coffee.UIEffects.Editors
private static void DrawPresetMenu(Object[] targets)
{
var r = EditorGUILayout.GetControlRect();
r.width /= 2;
r.width = (r.width - 185) / 2;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Load"), "MiniPopup"))
{
var menu = new GenericMenu();
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
DropDownPreset(r, null, p =>
{
var path = UIEffectProjectSettings.GetPresetPath(preset);
menu.AddItem(new GUIContent(path), false, () =>
Undo.RecordObjects(targets, "Load UIEffect Preset");
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
{
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
{
t.LoadPreset(preset);
});
t.LoadPreset(p, false);
});
}
menu.DropDown(r);
});
}
r.x += r.width;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Append"), "MiniPopup"))
{
DropDownPreset(r, null, p =>
{
Undo.RecordObjects(targets, "Append UIEffect Preset");
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
{
t.LoadPreset(p, true);
});
});
}
r.x += r.width;
r.width = 15;
GUI.Label(r, GUIContent.none, "BreadcrumbsSeparator");
r.x += r.width;
r.width = 100;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Save As New"), "MiniButton"))
{
EditorApplication.delayCall += () =>
@@ -571,6 +656,44 @@ namespace Coffee.UIEffects.Editors
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
};
}
r.x += r.width;
r.width = 15;
GUI.Label(r, GUIContent.none, "BreadcrumbsSeparator");
r.x += r.width;
r.width = 55;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
{
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
}
}
public static void DropDownPreset(Rect r, Predicate<(string path, bool builtin, UIEffect preset)> valid,
Action<UIEffect> callback)
{
var menu = new GenericMenu();
var separatorAdded = false;
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
{
var (path, builtin) = UIEffectProjectSettings.GetPresetPath(preset);
if (valid != null && valid.Invoke((path, builtin, preset)) == false) continue;
if (builtin)
{
if (!separatorAdded)
{
separatorAdded = true;
menu.AddSeparator(string.Empty);
}
path = path.Substring(6).Replace(" - ", "/");
}
menu.AddItem(new GUIContent(path), false, x => callback(x as UIEffect), preset);
}
menu.DropDown(r);
}
}
}
@@ -36,19 +36,9 @@ namespace Coffee.UIEffects.Editors
};
_reorderableList.onAddDropdownCallback = (rect, list) =>
{
var menu = new GenericMenu();
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
{
if (UIEffectProjectSettings.instance.m_RuntimePresets.Contains(preset)) continue;
var path = UIEffectProjectSettings.GetPresetPath(preset);
menu.AddItem(new GUIContent(path), false, x =>
{
UIEffectProjectSettings.RegisterRuntimePreset(x as UIEffect);
}, preset);
}
menu.DropDown(rect);
UIEffectEditor.DropDownPreset(rect,
x => !x.builtin && !UIEffectProjectSettings.instance.m_RuntimePresets.Contains(x.preset),
UIEffectProjectSettings.RegisterRuntimePreset);
};
_isInitialized = true;
@@ -82,7 +72,12 @@ namespace Coffee.UIEffects.Editors
if (_shaderVariantRegistryEditor == null)
{
var property = serializedObject.FindProperty("m_ShaderVariantRegistry");
_shaderVariantRegistryEditor = new ShaderVariantRegistryEditor(property, "(UIEffect)");
_shaderVariantRegistryEditor = new ShaderVariantRegistryEditor(property, "(UIEffect)",
() =>
{
UIEffectProjectSettings.shaderRegistry
.RegisterOptionalShaders(UIEffectProjectSettings.instance);
});
}
_shaderVariantRegistryEditor.Draw();
+37 -2
View File
@@ -1,4 +1,5 @@
using UnityEditor;
using UnityEngine;
namespace Coffee.UIEffects.Editors
{
@@ -13,6 +14,8 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _useTargetTransform;
private SerializedProperty _samplingScale;
private SerializedProperty _allowToModifyMeshShape;
private SerializedProperty _flip;
private SerializedProperty _customRoot;
private Editor _uiEffectEditor;
private void OnEnable()
@@ -21,22 +24,54 @@ namespace Coffee.UIEffects.Editors
_useTargetTransform = serializedObject.FindProperty("m_UseTargetTransform");
_samplingScale = serializedObject.FindProperty("m_SamplingScale");
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
_flip = serializedObject.FindProperty("m_Flip");
_customRoot = serializedObject.FindProperty("m_CustomRoot");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_target);
var r = EditorGUILayout.GetControlRect();
r.width -= 60;
EditorGUI.PropertyField(r, _target);
// Preset button.
r.x += r.width;
r.width = 60;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Preset"), "MiniPopup"))
{
UIEffectEditor.DropDownPreset(r, x => !x.builtin, p =>
{
_target.objectReferenceValue = p;
_target.serializedObject.ApplyModifiedProperties();
});
}
// Preset mode warning.
if (_target.objectReferenceValue is UIEffect targetEffect && !targetEffect.gameObject.scene.IsValid())
{
r = EditorGUILayout.GetControlRect();
r.width -= EditorGUIUtility.labelWidth;
r.x += EditorGUIUtility.labelWidth;
EditorGUI.HelpBox(r, "The target effect is not in the scene. (Preset mode)", MessageType.Warning);
}
EditorGUILayout.PropertyField(_useTargetTransform);
EditorGUI.BeginDisabledGroup(_useTargetTransform.boolValue);
EditorGUILayout.PropertyField(_customRoot);
EditorGUI.EndDisabledGroup();
EditorGUILayout.PropertyField(_samplingScale);
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
EditorGUILayout.PropertyField(_flip);
if (_target.objectReferenceValue)
{
EditorGUI.BeginDisabledGroup(true);
CreateCachedEditor(_target.objectReferenceValue, null, ref _uiEffectEditor);
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
(_uiEffectEditor as UIEffect2Editor)?.DrawProperties();
(_uiEffectEditor as UIEffectEditor)?.DrawProperties();
EditorGUILayout.EndVertical();
EditorGUI.EndDisabledGroup();
}
@@ -12,6 +12,8 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _cullingMask;
private SerializedProperty _direction;
private SerializedProperty _curve;
private SerializedProperty _separateReverseCurve;
private SerializedProperty _reverseCurve;
private SerializedProperty _delay;
private SerializedProperty _duration;
private SerializedProperty _interval;
@@ -20,6 +22,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _updateMode;
private SerializedProperty _wrapMode;
private SerializedProperty _onComplete;
private SerializedProperty _onChangedRate;
private bool _isPlaying = false;
private double _lastTime;
@@ -28,6 +31,8 @@ namespace Coffee.UIEffects.Editors
_cullingMask = serializedObject.FindProperty("m_CullingMask");
_direction = serializedObject.FindProperty("m_Direction");
_curve = serializedObject.FindProperty("m_Curve");
_separateReverseCurve = serializedObject.FindProperty("m_SeparateReverseCurve");
_reverseCurve = serializedObject.FindProperty("m_ReverseCurve");
_playOnEnable = serializedObject.FindProperty("m_PlayOnEnable");
_resetTimeOnEnable = serializedObject.FindProperty("m_ResetTimeOnEnable");
_delay = serializedObject.FindProperty("m_Delay");
@@ -36,6 +41,7 @@ namespace Coffee.UIEffects.Editors
_wrapMode = serializedObject.FindProperty("m_WrapMode");
_updateMode = serializedObject.FindProperty("m_UpdateMode");
_onComplete = serializedObject.FindProperty("m_OnComplete");
_onChangedRate = serializedObject.FindProperty("m_OnChangedRate");
EditorApplication.update += UpdateTweeners;
}
@@ -50,8 +56,25 @@ namespace Coffee.UIEffects.Editors
Profiler.BeginSample("(UIE)[UIEffectTweener] OnInspectorGUI");
serializedObject.UpdateIfRequiredOrScript();
EditorGUILayout.PropertyField(_cullingMask);
if (0 != (_cullingMask.intValue & (int)UIEffectTweener.CullingMask.Event))
{
EditorGUILayout.PropertyField(_onChangedRate);
}
EditorGUILayout.PropertyField(_direction);
EditorGUILayout.PropertyField(_curve);
var pos = EditorGUILayout.GetControlRect();
var rect = new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth + 20, pos.height);
EditorGUI.PropertyField(rect, _separateReverseCurve);
if (_separateReverseCurve.boolValue)
{
rect.x += rect.width;
rect.width = pos.width - rect.width;
EditorGUI.PropertyField(rect, _reverseCurve, GUIContent.none);
}
EditorGUILayout.PropertyField(_delay);
EditorGUILayout.PropertyField(_duration);
EditorGUILayout.PropertyField(_interval);
+161 -30
View File
@@ -40,6 +40,7 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
- [Component: UIEffectTweener](#component-uieffecttweener)
- [Component: UIEffectReplica](#component-uieffectreplica)
- [Usage with TextMeshPro](#usage-with-textmeshpro)
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
- [Usage with Code](#usage-with-code)
- [Project Settings](#project-settings)
@@ -73,9 +74,10 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
## 🎮 Demo
![](https://github.com/user-attachments/assets/37a46a7e-1f15-4a52-a928-09a2ed857a47)
![](https://github.com/user-attachments/assets/f1fa2485-e635-4923-a53f-6825d7f85873)
![](https://github.com/user-attachments/assets/ed38d668-4963-46c5-a1a1-cff33ab278ed)
![](https://github.com/user-attachments/assets/9cf575ad-88e2-4bcc-9a44-9931a4d5c589)
![](https://github.com/user-attachments/assets/1ed410bf-b782-433b-9429-721278c5ba1e)
![](https://github.com/user-attachments/assets/f9271346-fc4e-4c05-a1a8-88cf36110c05)
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
@@ -95,7 +97,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
```
openupm add com.coffee.ui-effect@5.3.0
openupm add com.coffee.ui-effect@5.6.0
```
### Install via UPM (with Package Manager UI)
@@ -104,7 +106,7 @@ _This package requires **Unity 2020.3 or later**._
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
![](https://github.com/user-attachments/assets/f88f47ad-c606-44bd-9e86-ee3f72eac548)
- To update the package, change suffix `#{version}` to the target version.
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.3.0`
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0`
### Install via UPM (Manually)
@@ -119,7 +121,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, change suffix `#{version}` to the target version.
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.3.0",`
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0",`
### Install as Embedded Package
@@ -152,6 +154,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
// v5
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src",
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#main",
```
2. Import the `v4 Compatible Components` sample from the Package Manager window.
@@ -160,7 +163,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
3. All v4 components are obsolete.
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
- The `effectArea` property in some components are not supported in v5.
- `UIShadow`, `UIGradient`, `UIFlip` components are not supported in v5.
- `UIShadow`, `UIGradient` components are not supported in v5.
- v4 components can be converted to v5 `UIEffect` component by selecting `Convert To UIEffect` from the context menu.
![](https://github.com/user-attachments/assets/4911f06d-4749-4aa8-a72e-deb0fa06bc5d)
@@ -184,32 +187,58 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
### Component: UIEffect
![](https://github.com/user-attachments/assets/a1642385-ebdc-4a66-b167-10c8b15277e1)
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
![](https://github.com/user-attachments/assets/f32f4735-5d49-4f12-a79d-1b05e819868e)
> [!TIP]
> From the top menu, you can load and save the editor presets or clear settings.
> For details, refer to the [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect).
<br>
#### Tone Filter
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
![](https://github.com/user-attachments/assets/152f7bd2-f3d6-4dcc-8c34-58f94b1a1f47)
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
![](https://github.com/user-attachments/assets/e80d9047-f9c9-45b4-90d9-03cd33e2a0ec)
- **Tone Intensity**: 0.0 (no effect) - 1.0 (full effect).
<br>
#### Color Filter
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
![](https://github.com/user-attachments/assets/b2bde449-f45d-4174-917f-bab8ea8bdf12)
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
![](https://github.com/user-attachments/assets/4685581d-ec0a-4ce3-9627-919fb7ffdca6)
- **Color Intensity**: 0.0 (no effect) - 1.0 (full effect).
- **Color Glow**: Set the color to glow.
<br>
#### Sampling Filter
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
![](https://github.com/user-attachments/assets/fb4fa1d2-cf29-43de-9321-96f6355f45e9)
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
![](https://github.com/user-attachments/assets/d2a07673-8fd5-489d-94d4-49907122623f)
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
- **Sampling Width**: The width of the sampling effect.
<br>
#### Transition Filter
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
![](https://github.com/user-attachments/assets/9e75421a-c7cc-4be9-b38e-3a5914c02ef8)
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
![](https://github.com/user-attachments/assets/26942df8-47fa-4961-8949-c3290bd4f442)
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
- **Transition Tex**: The texture used for the transition filter.- **Transition Width**: The width where the transition color is applied.
- **Transition Tex**: The texture used for the transition filter.
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Detail Filter`.
- **Transition Width**: The width where the transition color is applied.
- **Transition Pattern Range**: The range of the pattern.
- **Transition Pattern Reverse**: Reverse the pattern.
@@ -217,23 +246,44 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Transition Color Filter**: Specifies the transition color.
- **Transition Color**: The color of the transition.
- **Transition Color Glow**: Set the transition color to glow.
- **Transition Auto Play Speed**: The speed of the transition animation. You can use this property to loop the `TransitionRate` without tweener or animation.
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
> [!TIP]
> **Transition Tex** applies transitions using its alpha channel.
> If you use `Scale`, `Offset`, or `Speed`, set `Wrap Mode = Repeat` in the texture import settings.
> For details, refer to the textures included in the built-in presets.
> ![](https://github.com/user-attachments/assets/e70ec77d-5417-4ee9-b055-a7f870b06e23)
<br>
#### Target Mode
- **Target Mode**: `None`, `Hue`, `Luminance`
![](https://github.com/user-attachments/assets/19cf9641-42c8-423e-84f7-e6b24243c2f3)
- **Target Mode**: `None`, `Hue`, `Luminance`
![](https://github.com/user-attachments/assets/7493ed9c-f1f5-4532-8266-067a3a316f5d)
- Restricts the effect application area based on hue or luminance.
- **Target Range**: The range of target hue or luminance.
- **Target Softness**: The softness of the target boundary.
<br>
#### Blend Type
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
![](https://github.com/user-attachments/assets/5ffcf33e-4c54-450f-a8e1-db0cf3353dda)
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
![](https://github.com/user-attachments/assets/406e3aa7-0afa-48e5-aac2-73c0f3483c5c)
- `Custom` blend type can be set using the `SrcBlend` and `DstBlend` properties.
<br>
#### Shadow Mode
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
![](https://github.com/user-attachments/assets/f6b78a66-5944-465a-b716-be19cb1aa140)
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
![](https://github.com/user-attachments/assets/fc8d0fb1-63ce-4a6b-b278-353a7a210369)
- **Shadow Distance**: Distance of the shadow or outline.
- **Shadow Iteration**: Number of times the shadow or outline is applied.
- **Shadow Color Filter**: Specifies the shadow color.
@@ -245,15 +295,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Mirror Offset**: Offset for the mirrored image.
- **Mirror Scale**: Scale of the mirrored image.
<br>
#### Gradation Mode
- **Gradation Mode**: `None`, `Plain`, `Shiny`
![](https://github.com/user-attachments/assets/1ce4a90e-90e2-4674-8c2b-9cfda33acb84)
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `RadialFast`, `RadialDetail`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
![](https://github.com/user-attachments/assets/fd2791db-5740-4030-aec0-4bae90fc2b30)
- **Gradation Gradient**: The gradient of the gradation.
- **Gradation Color 1**: The first color of the gradation.
- **Gradation Color 2**: The second color of the gradation.
- **Gradation Offset**: The offset of the gradation range.
- **Gradation Scale**: The scale of the gradation range.
- **Gradation Rotation**: The rotation of the gradation range.
- **Gradation Rotation**: The rotation of the gradation range (`Angle` or `AngleGradient`).
> [!TIP]
> `Horizontal Gradient` and `Vertical Gradient` divide the mesh horizontally or vertically and apply a gradient.
@@ -262,32 +317,72 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
> It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape.
> `Gradation Gradient` has two modes, `Blend` and `Fixed`.
<br>
#### Edge Mode
- **Edge Mode**: `None`, `Plain`, `Shiny`
![](https://github.com/user-attachments/assets/361a650d-18a4-4fc7-966d-4c87b765be54)
- **Edge Mode**: `None`, `Plain`, `Shiny`
![](https://github.com/user-attachments/assets/ec7b0e25-f89a-4b3d-8e97-eca88d26b5e2)
- **Edge Width**: The width of the edge.
- **Edge Color Filter**: Specifies the edge color.
- **Edge Color**: The color of the edge.
- **Edge Color Glow**: Set the shadow color to glow.
- **Edge Shiny Width**: The width of the edge shiny.
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny.
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny (using shader side `_Time`).
<br>
#### Detail Filter
![](https://github.com/user-attachments/assets/295d7d2d-be6e-4104-9ea3-e5208902a3d2)
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Replace`, `MuliplyAdditive`
![](https://github.com/user-attachments/assets/73933788-4179-4d8d-9b07-446d0a998227)
- **Detail Intensity**: 0.0 (no effect) - 1.0 (full effect).
- **Detail Threshold** (`Masking` only): The minimum and maximum alpha values used for masking. The larger the gap
between these values, the stronger the softness effect.
- **Detail Tex**: The texture used for the transition filter.
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**: Additional properties for the texture.
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Transition Filter`.
<br>
#### Others
![](https://github.com/user-attachments/assets/d0394c3b-34a0-4998-987a-192f9a848cdc)
- **Sampling Scale**: The referencing scale during sampling.
- Larger values are suitable for high-resolution textures.
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
- **Custom Root**: Use the custom transform for some effects.
- **Flip**:
- `Nothing`
- `Horizontal`
- `Vertical`
- `Effect`: Flip with the effect.
- `Shadow`: Flip with the shadow.
> [!TIP]
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
> By specifying `Custom Root`, you can refer to the specified transform.
<br><br>
### Component: UIEffectTweener
![](https://github.com/user-attachments/assets/1c731104-4baf-43f8-ba16-611ee9870df2)
![](https://github.com/user-attachments/assets/64ff1e78-d06e-461f-80a5-3b3e9f615496)
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
- **Culling Mask**: `Tone`, `Color`, `Sampling`, `Transition`
- **Culling Mask**: `Tone`, `Color`, `Sampling`, `Transition`, `GradiationOffset`, `GradiationRotation`, `EdgeShiny`, `Event`
- **OnChangeRate** (`Event` only): A event that is triggered when the tweening rate changes.
- **Direction**: `Forward (0.0 -> 1.0)`, `Reverse (1.0 -> 0.0)`
- **Curve**: The curve of the animation.
- **Separate Reverse Curve**: If enabled, `Reverse Curve` will be used for the reverse direction.
- **Reverse Curve**: The curve of the reverse animation.
- **Delay**: The delay time before starting the animation.
- **Duration**: The duration of the animation.
- **Interval**: The interval time between the animation.
@@ -295,7 +390,11 @@ The `UIEffectTweener` component animates the effect, enabling easy control over
- Play the animation automatically when the component is enabled.
- If `None` is selected, the animation will not play automatically. You can play it using the `Play`, `PlayForward` or `PlayReverse` method.
- **Reset Time On Enable**: Reset the tweening time when the component is enabled.
- **Wrap Mode**: `Once`, `Loop`, `PingPongOnce`, `PingPongLoop`
- **Wrap Mode**:
- `Once`: delay -> duration(0-1) -> onComplete
- `Loop`: delay -> duration(0-1) -> interval -> ...
- `PingPongOnce`: delay -> duration(0-1) -> interval -> duration(1-0) -> onComplete
- `PingPongLoop`: delay -> duration(0-1) -> interval -> duration(1-0) -> interval -> ...
- **Update Mode**: `Normal`, `UnscaledTime`, `Manual`
- **On Complete**: A event that is triggered when the animation is completed.
@@ -305,15 +404,24 @@ You can preview the animation using the seek bar and play button.
### Component: UIEffectReplica
![](https://github.com/user-attachments/assets/27558d2e-ee12-4b10-bf13-103474b6c6cc)
![](https://github.com/user-attachments/assets/458ab704-90b1-473d-8bda-80c325e1654e)
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
- **Target**: The target `UIEffect` component to replicate.
- **Use Target Transform**: Use the target's transform for some effects.
> [!TIP]
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
- **Use Target Transform**: Use the target's transform for some effects.
![](https://github.com/user-attachments/assets/127e30fb-15c7-4002-ab65-e8f29e640330)
- **Custom Root**: Use the custom transform for some effects.
- **Sampling Scale**: Override the sampling scale.
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
![](https://github.com/user-attachments/assets/127e30fb-15c7-4002-ab65-e8f29e640330)
- **Flip**:
- `Nothing`
- `Horizontal`
- `Vertical`
- `Effect`: Flip the effect.
- `Shadow`: Flip the shadow.
<br><br>
@@ -343,15 +451,34 @@ Alternatively, you can manually import the resources by following these steps:
> `TextMeshPro Support` may change with updates to the UIEffect package.
> If issues occur, try importing it again.
> [!TIP]
> If you have moved `TMPro_Properties.cginc` and `TMPro.cginc` from their default install path
> (`Assets/TextMesh Pro/Shaders/...`), you will need to manually update the paths in the shaders under
> `TextMeshPro Support` or `TextMeshPro Support (Unity 6)`.
<br><br>
### Usage with SoftMaskForUGUI
![](https://github.com/user-attachments/assets/7701e765-896a-49a8-b1ed-22adb0ecce12)
[SoftMaskForUGUI](https://github.com/mob-sakai/SoftMaskForUGUI) is a package that allows you to create soft masks for UI elements.
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.6.0+)`.
When a shader included in the samples is requested, an import dialog will automatically appear.
Click the `Import` button.
<br><br>
### Runtime/Editor Preset for UIEffect
![](https://github.com/user-attachments/assets/4244d162-a768-463e-8aad-8cafbdf3a5b3)
![](https://github.com/user-attachments/assets/f32f4735-5d49-4f12-a79d-1b05e819868e)
You can create and use presets for `UIEffect` components.
- In the `UIEffect` component inspector, click "Save As" button to save the current settings as an editor preset.
- Click "Load" button to apply an editor preset.
- Click the `Load` button to apply an editor preset.
> Click the `Append` button to load only non-default settings from the editor preset.
- Click the `Save As New` button to save the current settings as an editor preset.
- In the [Project Settings](#project-settings), you can register saved editor presets as runtime presets.
- Runtime presets can be loaded using the `UIEffect.LoadPreset(presetName)` method.
@@ -418,6 +545,10 @@ You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings
- **Error On Unregistered Variant**: If enabled, an error will be displayed when an unregistered shader variant is used.
- The shader variant will be automatically added to the `Unregistered Variants` list.
> [!IMPORTANT]
> - The setting file is usually saved in `Assets/ProjectSettings/UIEffectProjectSettings.asset`. Include this file in your version control system.
> - The setting file is automatically added as a preloaded asset in `ProjectSettings/ProjectSettings.asset`.
<br><br>
### :warning: Limitations
+21 -1
View File
@@ -1,4 +1,5 @@
using UnityEngine.Rendering;
using System;
using UnityEngine.Rendering;
namespace Coffee.UIEffects
{
@@ -107,6 +108,25 @@ namespace Coffee.UIEffects
AngleGradient = 10
}
public enum DetailFilter
{
None = 0,
Masking = 1,
Multiply = 2,
Additive = 3,
Replace = 4,
MultiplyAdditive = 5
}
[Flags]
public enum Flip
{
Horizontal = 1 << 0,
Vertical = 1 << 1,
Effect = 1 << 2,
Shadow = 1 << 3
}
internal static class BlendTypeConverter
{
public static (BlendMode, BlendMode) Convert(this (BlendType type, BlendMode src, BlendMode dst) self)
@@ -0,0 +1,75 @@
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIEffectInternal
{
public class CgincPathSync : AssetPostprocessor
{
private static string[] s_ShaderNames = null;
private static string s_CgincPattern = null;
public static void RegisterShaders(string cgincPattern, string[] shaderNames)
{
s_CgincPattern = cgincPattern;
s_ShaderNames = shaderNames;
UpdateTmpCgincPath();
}
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
{
UpdateTmpCgincPath();
}
private static void UpdateTmpCgincPath()
{
if (s_CgincPattern == null || s_ShaderNames == null || s_ShaderNames.Length == 0) return;
AssetDatabase.StartAssetEditing();
string[] cgincs = null;
foreach (var shaderName in s_ShaderNames)
{
var shader = Shader.Find(shaderName);
if (!shader) continue;
var hasCgincError = ShaderUtil.GetShaderMessages(shader)
.Any(x => Regex.IsMatch(x.message, $"Couldn't open include file.*{s_CgincPattern}"));
if (!hasCgincError) continue;
cgincs = cgincs ?? AssetDatabase.FindAssets("t:ShaderInclude")
.Select(AssetDatabase.GUIDToAssetPath)
.Where(x => Regex.IsMatch(x, s_CgincPattern))
.ToArray();
UpdateTmpCgincPath(shader, cgincs);
}
AssetDatabase.StopAssetEditing();
}
private static void UpdateTmpCgincPath(Shader shader, string[] cgincs)
{
var path = AssetDatabase.GetAssetPath(shader);
var text = File.ReadAllText(path);
var hash = text.GetHashCode();
foreach (var cginc in cgincs)
{
var file = Path.GetFileName(cginc);
text = Regex.Replace(text, $"#include.*\"[^\"]*{file}\"", $"#include \"{cginc}\"",
RegexOptions.Multiline);
}
if (hash == text.GetHashCode()) return;
Debug.Log($"Update Shader: '{path}'");
File.WriteAllText(path, text, Encoding.UTF8);
AssetDatabase.ImportAsset(path);
}
}
}
#endif
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3fbf547b561114807adbec486aa2b977
guid: b39275b24ae5648d5a67a308a9127e81
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -0,0 +1,172 @@
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using System.Linq;
using UnityEditor;
using UnityEditor.PackageManager.UI;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
namespace Coffee.UIEffectInternal
{
internal static class ShaderSampleImporter
{
private static (string shaderName, string sampleName, string version)[] s_Samples;
private static (string guid, string fileName)[] s_DeprecatedShaders;
private static readonly Dictionary<string, string> s_SampleNames = new Dictionary<string, string>();
private static readonly Dictionary<string, string> s_ShaderAliases = new Dictionary<string, string>();
public static void RegisterShaderSamples((string shaderName, string sampleName, string version)[] samples)
{
if (IsBatchOrBuilding()) return;
// Collect sample names.
s_Samples = samples;
foreach (var (shaderName, sampleName, _) in samples)
{
s_SampleNames[shaderName] = sampleName;
}
}
public static void RegisterShaderAliases((string, string)[] aliases)
{
foreach (var (from, to) in aliases)
{
s_ShaderAliases[from] = to;
}
}
public static void RegisterDeprecatedShaders((string, string)[] deprecatedShaders)
{
if (IsBatchOrBuilding()) return;
s_DeprecatedShaders = deprecatedShaders;
}
/// <summary>
/// Import the sample containing the requested shader.
/// If choice 'Import' is selected, the sample is imported.
/// If choice 'Skip in this session' is selected, the sample is skipped in this session.
/// </summary>
public static bool ImportShaderIfSelected(string shaderName)
{
if (IsBatchOrBuilding()) return false;
if (s_ShaderAliases.TryGetValue(shaderName, out var alias))
{
shaderName = alias;
}
// Find sample name.
if (s_SampleNames.TryGetValue(shaderName, out var sampleName))
{
var message = $"Import the sample '{sampleName}' to use the shader '{shaderName}'.";
return ImportSampleIfSelected(sampleName, message);
}
return false;
}
private static bool ImportSampleIfSelected(string sampleName, string message)
{
if (IsBatchOrBuilding()) return false;
if (!s_SampleNames.ContainsValue(sampleName)) return false;
// Find package info.
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderSampleImporter).Assembly);
if (pInfo == null) return false;
// Find sample. If not found (resolvedPath == null), skip.
var sample = Sample.FindByPackage(pInfo.name, pInfo.version)
.FirstOrDefault(x => x.displayName == sampleName);
if (sample.resolvedPath == null) return false;
// Import the sample if selected.
if (!string.IsNullOrEmpty(message))
{
var selected = EditorUtility.DisplayDialog($"Import {sampleName}", message, "Import", "Cancel");
if (!selected) return false;
}
// Remove the imported sample name from the list.
foreach (var shaderName in s_SampleNames.Keys.ToArray())
{
if (s_SampleNames[shaderName] != sampleName) continue;
s_SampleNames.Remove(shaderName);
DeleteShader(shaderName);
}
// Import the sample in the next frame.
EditorApplication.delayCall += () => sample.Import(Sample.ImportOptions.OverridePreviousImports);
return true;
}
private static string GetVersion(string shaderName)
{
if (string.IsNullOrEmpty(shaderName)) return null;
var shader = Shader.Find(shaderName);
if (!shader) return null;
var path = AssetDatabase.GetAssetPath(shader);
if (string.IsNullOrEmpty(path)) return null;
return AssetImporter.GetAtPath(path).userData;
}
private static void DeleteShader(string shaderName)
{
var shader = Shader.Find(shaderName);
if (shader)
{
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(shader));
}
}
private static bool IsBatchOrBuilding()
{
return Application.isBatchMode || BuildPipeline.isBuildingPlayer;
}
public static void Update()
{
if (s_Samples == null || IsBatchOrBuilding()) return;
// Find package info.
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderSampleImporter).Assembly);
if (pInfo == null) return;
// Find sample. If not found (resolvedPath == null), skip.
var sample = Sample.FindByPackage(pInfo.name, pInfo.version).FirstOrDefault();
if (sample.resolvedPath == null) return;
// Update the sample.
foreach (var (shaderName, sampleName, version) in s_Samples)
{
if (string.IsNullOrEmpty(version)) continue;
if (!s_SampleNames.ContainsValue(sampleName)) continue;
// If the shader exist and the version is different, add the sample to the update list.
var currentVersion = GetVersion(shaderName);
if (currentVersion != null && currentVersion != version && ImportSampleIfSelected(sampleName, null))
{
Debug.Log($"Updating '{sampleName}' to use the package '{pInfo.displayName} v{pInfo.version}'.");
}
}
// Remove deprecated shaders.
foreach (var (guid, fileName) in s_DeprecatedShaders)
{
var path = AssetDatabase.GUIDToAssetPath(guid);
if (!string.IsNullOrEmpty(path) && Path.GetFileName(path) == fileName)
{
AssetDatabase.DeleteAsset(path);
}
}
s_Samples = null;
}
}
}
#endif
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3aef1549bb83f4e6babaf8bc9648ee1b
guid: 763d620015bc94d7ab423f3b42aabf1e
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -8,7 +8,6 @@ using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.PackageManager.UI;
using UnityEditorInternal;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
using Object = UnityEngine.Object;
@@ -63,6 +62,7 @@ namespace Coffee.UIEffectInternal
#endif
public ShaderVariantCollection shaderVariantCollection => m_Asset;
public Func<string, bool> onShaderRequested;
public Shader FindOptionalShader(Shader shader,
string requiredName,
@@ -78,16 +78,16 @@ namespace Coffee.UIEffectInternal
return Shader.Find(optionalShaderName);
}
// The shader has
if (shader.name.Contains(requiredName))
// The shader has required name.
var shaderName = shader.name;
if (shaderName.Contains(requiredName))
{
_cachedOptionalShaders[id] = shader.name;
_cachedOptionalShaders[id] = shaderName;
return shader;
}
// Find optional shader.
Shader optionalShader;
var shaderName = shader.name;
foreach (var pair in m_OptionalShaders)
{
if (pair.key != shaderName) continue;
@@ -100,7 +100,7 @@ namespace Coffee.UIEffectInternal
}
// Find optional shader by format.
optionalShaderName = string.Format(format, shader.name);
optionalShaderName = string.Format(format, shaderName);
optionalShader = Shader.Find(optionalShaderName);
if (optionalShader)
{
@@ -109,7 +109,10 @@ namespace Coffee.UIEffectInternal
}
#if UNITY_EDITOR
ImportFromSample(optionalShaderName);
if (onShaderRequested?.Invoke(optionalShaderName) ?? false)
{
return Shader.Find(defaultOptionalShaderName);
}
#endif
// Find default optional shader.
@@ -119,83 +122,67 @@ namespace Coffee.UIEffectInternal
#if UNITY_EDITOR
private readonly HashSet<StringPair> _logVariants = new HashSet<StringPair>();
private readonly Dictionary<string, string> _sampleNames = new Dictionary<string, string>();
/// <summary>
/// Import the sample containing the requested shader.
/// If choice 'Import' is selected, the sample is imported.
/// If choice 'Skip in this session' is selected, the sample is skipped in this session.
/// </summary>
public void ImportFromSample(string shaderName)
{
if (Misc.isBatchOrBuilding) return;
// Find sample name.
if (_sampleNames.TryGetValue(shaderName, out var sampleName))
{
// Find package info.
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderVariantRegistry).Assembly);
if (pInfo == null) return;
// Find sample. If not found (resolvedPath == null), skip.
var sample = Sample.FindByPackage(pInfo.name, pInfo.version)
.FirstOrDefault(x => x.displayName == sampleName);
if (sample.resolvedPath == null) return;
// Import the sample if selected.
var importSelected = EditorUtility.DisplayDialog($"Import {sampleName}",
$"Import '{sampleName}' to use the shader '{shaderName}'", "Import", "Cancel");
if (importSelected)
{
EditorApplication.delayCall += () =>
{
sample.Import();
};
}
}
}
public void ClearCache()
{
_cachedOptionalShaders.Clear();
}
public void RegisterSamples((string shaderName, string sampleName)[] samples)
/// <summary>
/// Register all optional shaders associated with the package.
/// If the shader file has a comment "// [OptionalShader] {packageName}: {shaderName}", it will be registered.
/// </summary>
public void RegisterOptionalShaders(Object owner)
{
foreach (var (shaderName, sampleName) in samples)
var shaderPaths = ShaderUtil.GetAllShaderInfo()
.Select(s => AssetDatabase.GetAssetPath(Shader.Find(s.name)))
.Where(path => !string.IsNullOrEmpty(path) && path.EndsWith(".shader"))
.ToArray();
foreach (var path in shaderPaths)
{
_sampleNames[shaderName] = sampleName;
RegisterOptionalShaders(owner, path);
}
}
public void InitializeIfNeeded(Object owner, string optionalName)
/// <summary>
/// Register optional shaders associated with the package.
/// If the shader file has a comment "// [OptionalShader] {packageName}: {shaderName}", it will be registered.
/// </summary>
private void RegisterOptionalShaders(Object owner, string path)
{
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] InitializeIfNeeded");
if (!File.Exists(path) || !path.EndsWith(".shader")) return;
var packageName = PackageInfo.FindForAssembly(typeof(ShaderVariantRegistry).Assembly)?.name;
if (string.IsNullOrEmpty(packageName)) return;
// Register optional shader names by shader comment.
if (!string.IsNullOrEmpty(optionalName))
var pattern = $"// \\[OptionalShader\\] {packageName}: (.*)$";
var registeredKeys = new HashSet<string>(m_OptionalShaders.Select(x => x.key));
var keys = File.ReadLines(path)
.Take(10)
.Select(line => Regex.Match(line, pattern))
.Where(match => match.Success && registeredKeys.Add(match.Groups[1].Value))
.Select(match => match.Groups[1].Value)
.ToArray();
if (0 < keys.Length)
{
var optionalShaders = ShaderUtil.GetAllShaderInfo()
.Where(s => s.name.Contains(optionalName))
.Select(s => (s.name, path: AssetDatabase.GetAssetPath(Shader.Find(s.name))))
.Where(x => !string.IsNullOrEmpty(x.path))
.SelectMany(x =>
{
return File.ReadLines(x.path)
.Take(10)
.Where(line => line.Contains($"OptionalShader@{optionalName}"))
.Select(line => Regex.Match(line, @":\s*(.*)$"))
.Where(match => match.Success)
.Select(match => new StringPair() { key = match.Groups[1].Value, value = x.name });
})
.Where(pair => m_OptionalShaders.All(x => x.key != pair.key))
.ToArray();
if (0 < optionalShaders.Length)
// Find shader.
var shader = AssetDatabase.LoadAssetAtPath<Shader>(path);
if (!shader) return;
var shaderName = shader.name;
foreach (var key in keys)
{
m_OptionalShaders.AddRange(optionalShaders);
EditorUtility.SetDirty(owner);
m_OptionalShaders.Add(new StringPair() { key = key, value = shaderName });
}
EditorUtility.SetDirty(owner);
}
}
public void InitializeIfNeeded(Object owner)
{
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] InitializeIfNeeded");
if (!m_Asset && AssetDatabase.IsMainAsset(owner))
{
@@ -286,7 +273,7 @@ namespace Coffee.UIEffectInternal
private Editor _editor;
private bool _expand;
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName)
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName, Action onFindOptions)
{
var so = property.serializedObject;
var optionalShaders = property.FindPropertyRelative("m_OptionalShaders");
@@ -302,8 +289,14 @@ namespace Coffee.UIEffectInternal
EditorGUIUtility.TrTextContent($"Optional Shaders {optionName}",
"Specify optional shaders explicitly."));
var rButton = new Rect(rect.x + rect.width - 80, rect.y, 80, rect.height - 4);
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
var rButton1 = new Rect(rect.x + rect.width - 150, rect.y, 90, rect.height - 4);
if (GUI.Button(rButton1, "Find Options", EditorStyles.miniButton))
{
onFindOptions?.Invoke();
}
var rButton2 = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
if (GUI.Button(rButton2, "Clear All", EditorStyles.miniButton))
{
optionalShaders.ClearArray();
}
@@ -346,7 +339,7 @@ namespace Coffee.UIEffectInternal
var rLabel = new Rect(rect.x + 20, rect.y, 200, rect.height);
EditorGUI.LabelField(rLabel, "Unregistered Shader Variants");
var rButton = new Rect(rect.x + rect.width - 80, rect.y, 80, rect.height - 4);
var rButton = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
{
unregisteredVariants.ClearArray();
@@ -438,9 +431,10 @@ namespace Coffee.UIEffectInternal
Editor.CreateCachedEditor(collection, null, ref editor);
editor.serializedObject.Update();
var shaders = editor.serializedObject.FindProperty("m_Shaders");
var drawShaderEntry = s_MiDrawShaderEntry?.CreateDelegate(typeof(Action<int>), editor) as Action<int>;
for (var i = 0; i < shaders.arraySize; i++)
{
s_MiDrawShaderEntry.Invoke(editor, new object[] { i });
drawShaderEntry?.Invoke(i);
}
EditorGUILayout.EndVertical();
+588 -62
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Coffee.UIEffectInternal;
using UnityEngine;
using UnityEngine.Rendering;
@@ -67,6 +68,9 @@ namespace Coffee.UIEffects
[SerializeField]
protected Vector2 m_TransitionTexOffset = new Vector2(0, 0);
[SerializeField]
protected Vector2 m_TransitionTexSpeed = new Vector2(0, 0);
[SerializeField]
[Range(0, 360)]
private float m_TransitionRotation = 0;
@@ -201,6 +205,9 @@ namespace Coffee.UIEffects
[SerializeField]
protected Color m_EdgeColor = Color.white;
[SerializeField]
protected bool m_EdgeColorGlow = false;
[Range(0, 1)]
[SerializeField]
protected float m_EdgeShinyRate = 0.5f;
@@ -216,6 +223,34 @@ namespace Coffee.UIEffects
[SerializeField]
protected PatternArea m_PatternArea = PatternArea.Inner;
[SerializeField]
protected DetailFilter m_DetailFilter = DetailFilter.None;
[Range(0, 1)]
[SerializeField]
protected float m_DetailIntensity = 1;
[SerializeField]
protected MinMax01 m_DetailThreshold = new MinMax01(0, 1);
[SerializeField]
protected Texture m_DetailTex;
[SerializeField]
protected Vector2 m_DetailTexScale = new Vector2(1, 1);
[SerializeField]
protected Vector2 m_DetailTexOffset = new Vector2(0, 0);
[SerializeField]
protected Vector2 m_DetailTexSpeed = new Vector2(0, 0);
[SerializeField]
protected RectTransform m_CustomRoot = null;
[SerializeField]
protected Flip m_Flip = 0;
/// <summary>
/// Tone filter for rendering.
/// </summary>
@@ -286,6 +321,72 @@ namespace Coffee.UIEffects
}
}
public float colorHueShift
{
get => color.r;
set
{
var c = color;
c.r = Mathf.Clamp(value, -0.5f, 0.5f);
color = c;
}
}
public float colorSaturationShift
{
get => color.g;
set
{
var c = color;
c.g = Mathf.Clamp(value, -1, 1);
color = c;
}
}
public float colorValueShift
{
get => color.b;
set
{
var c = color;
c.b = Mathf.Clamp(value, -1, 1);
color = c;
}
}
public float colorContrastShift
{
get => color.r;
set
{
var c = color;
c.r = Mathf.Clamp(value, -1, 1);
color = c;
}
}
public float colorBrightnessShift
{
get => color.g;
set
{
var c = color;
c.g = Mathf.Clamp(value, -1, 1);
color = c;
}
}
public float colorAlpha
{
get => color.a;
set
{
var c = color;
c.a = value;
color = c;
}
}
public bool colorGlow
{
get => m_ColorGlow;
@@ -429,6 +530,17 @@ namespace Coffee.UIEffects
}
}
public Vector2 transitionTextureSpeed
{
get => m_TransitionTexSpeed;
set
{
if (m_TransitionTexSpeed == value) return;
context.transitionTexSpeed = m_TransitionTexSpeed = value;
SetMaterialDirty();
}
}
public float transitionRotation
{
get => m_TransitionRotation;
@@ -508,6 +620,72 @@ namespace Coffee.UIEffects
}
}
public float transitionColorHueShift
{
get => transitionColor.r;
set
{
var c = transitionColor;
c.r = Mathf.Clamp(value, -0.5f, 0.5f);
transitionColor = c;
}
}
public float transitionColorSaturationShift
{
get => transitionColor.g;
set
{
var c = transitionColor;
c.g = Mathf.Clamp(value, -1, 1);
transitionColor = c;
}
}
public float transitionColorValueShift
{
get => transitionColor.b;
set
{
var c = transitionColor;
c.b = Mathf.Clamp(value, -1, 1);
transitionColor = c;
}
}
public float transitionColorContrastShift
{
get => transitionColor.r;
set
{
var c = transitionColor;
c.r = Mathf.Clamp(value, -1, 1);
transitionColor = c;
}
}
public float transitionColorBrightnessShift
{
get => transitionColor.g;
set
{
var c = transitionColor;
c.g = Mathf.Clamp(value, -1, 1);
transitionColor = c;
}
}
public float transitionColorAlpha
{
get => transitionColor.a;
set
{
var c = transitionColor;
c.a = value;
transitionColor = c;
}
}
public bool transitionColorGlow
{
get => m_TransitionColorGlow;
@@ -725,6 +903,72 @@ namespace Coffee.UIEffects
}
}
public float shadowColorHueShift
{
get => shadowColor.r;
set
{
var c = shadowColor;
c.r = Mathf.Clamp(value, -0.5f, 0.5f);
shadowColor = c;
}
}
public float shadowColorSaturationShift
{
get => shadowColor.g;
set
{
var c = shadowColor;
c.g = Mathf.Clamp(value, -1, 1);
shadowColor = c;
}
}
public float shadowColorValueShift
{
get => shadowColor.b;
set
{
var c = shadowColor;
c.b = Mathf.Clamp(value, -1, 1);
shadowColor = c;
}
}
public float shadowColorContrastShift
{
get => shadowColor.r;
set
{
var c = shadowColor;
c.r = Mathf.Clamp(value, -1, 1);
shadowColor = c;
}
}
public float shadowColorBrightnessShift
{
get => shadowColor.g;
set
{
var c = shadowColor;
c.g = Mathf.Clamp(value, -1, 1);
shadowColor = c;
}
}
public float shadowColorAlpha
{
get => shadowColor.a;
set
{
var c = shadowColor;
c.a = value;
shadowColor = c;
}
}
public bool shadowGlow
{
get => m_ShadowColorGlow;
@@ -793,6 +1037,83 @@ namespace Coffee.UIEffects
}
}
public float edgeColorHueShift
{
get => edgeColor.r;
set
{
var c = edgeColor;
c.r = Mathf.Clamp(value, -0.5f, 0.5f);
edgeColor = c;
}
}
public float edgeColorSaturationShift
{
get => edgeColor.g;
set
{
var c = edgeColor;
c.g = Mathf.Clamp(value, -1, 1);
edgeColor = c;
}
}
public float edgeColorValueShift
{
get => edgeColor.b;
set
{
var c = edgeColor;
c.b = Mathf.Clamp(value, -1, 1);
edgeColor = c;
}
}
public float edgeColorContrastShift
{
get => edgeColor.r;
set
{
var c = edgeColor;
c.r = Mathf.Clamp(value, -1, 1);
edgeColor = c;
}
}
public float edgeColorBrightnessShift
{
get => edgeColor.g;
set
{
var c = edgeColor;
c.g = Mathf.Clamp(value, -1, 1);
edgeColor = c;
}
}
public float edgeColorAlpha
{
get => edgeColor.a;
set
{
var c = edgeColor;
c.a = value;
edgeColor = c;
}
}
public bool edgeColorGlow
{
get => m_EdgeColorGlow;
set
{
if (m_EdgeColorGlow == value) return;
context.edgeColorGlow = m_EdgeColorGlow = value;
SetMaterialDirty();
}
}
public float edgeShinyWidth
{
get => m_EdgeShinyWidth;
@@ -917,6 +1238,84 @@ namespace Coffee.UIEffects
}
}
public DetailFilter detailFilter
{
get => m_DetailFilter;
set
{
if (m_DetailFilter == value) return;
context.detailFilter = m_DetailFilter = value;
SetMaterialDirty();
}
}
public float detailIntensity
{
get => m_DetailIntensity;
set
{
value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_DetailIntensity, value)) return;
context.detailIntensity = m_DetailIntensity = value;
SetMaterialDirty();
}
}
public MinMax01 detailThreshold
{
get => m_DetailThreshold;
set
{
if (m_DetailThreshold.Approximately(value)) return;
context.detailThreshold = m_DetailThreshold = value;
SetMaterialDirty();
}
}
public Texture detailTexture
{
get => m_DetailTex;
set
{
if (m_DetailTex == value) return;
context.detailTex = m_DetailTex = value;
SetMaterialDirty();
}
}
public Vector2 detailTextureScale
{
get => m_DetailTexScale;
set
{
if (m_DetailTexScale == value) return;
context.detailTexScale = m_DetailTexScale = value;
SetMaterialDirty();
}
}
public Vector2 detailTextureOffset
{
get => m_DetailTexOffset;
set
{
if (m_DetailTexOffset == value) return;
context.detailTexOffset = m_DetailTexOffset = value;
SetMaterialDirty();
}
}
public Vector2 detailTextureSpeed
{
get => m_DetailTexSpeed;
set
{
if (m_DetailTexSpeed == value) return;
context.detailTexSpeed = m_DetailTexSpeed = value;
SetMaterialDirty();
}
}
public bool allowToModifyMeshShape
{
get => m_AllowToModifyMeshShape;
@@ -928,6 +1327,32 @@ namespace Coffee.UIEffects
}
}
public RectTransform customRoot
{
get => m_CustomRoot;
set
{
if (m_CustomRoot == value) return;
m_CustomRoot = value;
SetVerticesDirty();
}
}
public override Flip flip
{
get => m_Flip;
set
{
if (m_Flip == value) return;
m_Flip = value;
SetVerticesDirty();
}
}
public override RectTransform transitionRoot => m_CustomRoot
? m_CustomRoot
: transform as RectTransform;
public List<UIEffectReplica> replicas => _replicas ??= InternalListPool<UIEffectReplica>.Rent();
private List<UIEffectReplica> _replicas;
@@ -956,8 +1381,31 @@ namespace Coffee.UIEffects
context?.SetGradationDirty();
base.OnValidate();
}
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
{
var selected = 0 < selection.Length
&& (selection.Contains(gameObject)
|| replicas.Any(x => x && selection.Contains(x.gameObject)));
context.SetEnablePreview(selected, effectMaterial);
foreach (var r in replicas)
{
if (!r || !r.isActiveAndEnabled || r.context == null) continue;
r.context.SetEnablePreview(selected, r.effectMaterial);
}
}
#endif
protected override void OnBeforeCanvasRebuild()
{
base.OnBeforeCanvasRebuild();
if (CheckTransformChangedWith(customRoot))
{
SetVerticesDirty();
}
}
public override void SetVerticesDirty()
{
base.SetVerticesDirty();
@@ -991,7 +1439,7 @@ namespace Coffee.UIEffects
SetVerticesDirty();
}
protected override void UpdateContext(UIEffectContext c)
internal override void UpdateContext(UIEffectContext c)
{
c.toneFilter = m_ToneFilter;
c.toneIntensity = m_ToneIntensity;
@@ -1012,6 +1460,7 @@ namespace Coffee.UIEffects
c.transitionTex = m_TransitionTex;
c.transitionTexScale = m_TransitionTexScale;
c.transitionTexOffset = m_TransitionTexOffset;
c.transitionTexSpeed = m_TransitionTexSpeed;
c.transitionRotation = m_TransitionRotation;
c.transitionKeepAspectRatio = m_TransitionKeepAspectRatio;
c.transitionWidth = m_TransitionWidth;
@@ -1046,6 +1495,7 @@ namespace Coffee.UIEffects
c.edgeWidth = m_EdgeWidth;
c.edgeColorFilter = m_EdgeColorFilter;
c.edgeColor = m_EdgeColor;
c.edgeColorGlow = m_EdgeColorGlow;
c.edgeShinyWidth = m_EdgeShinyWidth;
c.edgeShinyAutoPlaySpeed = m_EdgeShinyAutoPlaySpeed;
c.patternArea = m_PatternArea;
@@ -1059,6 +1509,14 @@ namespace Coffee.UIEffects
c.gradationOffset = m_GradationOffset;
c.gradationScale = m_GradationScale;
c.gradationRotation = m_GradationRotation;
c.detailFilter = m_DetailFilter;
c.detailIntensity = m_DetailIntensity;
c.detailThreshold = m_DetailThreshold;
c.detailTex = m_DetailTex;
c.detailTexScale = m_DetailTexScale;
c.detailTexOffset = m_DetailTexOffset;
c.detailTexSpeed = m_DetailTexSpeed;
}
public override void ApplyContextToMaterial(Material material)
@@ -1129,84 +1587,142 @@ namespace Coffee.UIEffects
/// </summary>
public void LoadPreset(string presetName)
{
LoadPreset(UIEffectProjectSettings.LoadRuntimePreset(presetName));
LoadPreset(presetName, false);
}
/// <summary>
/// Load preset settings.
/// </summary>
public void LoadPreset(string presetName, bool append)
{
LoadPreset(UIEffectProjectSettings.LoadRuntimePreset(presetName), append);
}
/// <summary>
/// Load preset settings.
/// </summary>
public void LoadPreset(UIEffect preset)
{
LoadPreset(preset, false);
}
/// <summary>
/// Load preset settings.
/// </summary>
public void LoadPreset(UIEffect preset, bool append)
{
if (!preset) return;
m_ToneFilter = preset.m_ToneFilter;
m_ToneIntensity = preset.m_ToneIntensity;
m_ToneParams = preset.m_ToneParams;
if (!append || preset.m_ToneFilter != ToneFilter.None)
{
m_ToneFilter = preset.m_ToneFilter;
m_ToneIntensity = preset.m_ToneIntensity;
m_ToneParams = preset.m_ToneParams;
}
m_ColorFilter = preset.m_ColorFilter;
m_Color = preset.m_Color;
m_ColorIntensity = preset.m_ColorIntensity;
m_ColorGlow = preset.m_ColorGlow;
if (!append || preset.m_ColorFilter != ColorFilter.None)
{
m_ColorFilter = preset.m_ColorFilter;
m_Color = preset.m_Color;
m_ColorIntensity = preset.m_ColorIntensity;
m_ColorGlow = preset.m_ColorGlow;
}
m_SamplingFilter = preset.m_SamplingFilter;
m_SamplingIntensity = preset.m_SamplingIntensity;
m_SamplingWidth = preset.m_SamplingWidth;
if (!append || preset.m_SamplingFilter != SamplingFilter.None)
{
m_SamplingFilter = preset.m_SamplingFilter;
m_SamplingIntensity = preset.m_SamplingIntensity;
m_SamplingWidth = preset.m_SamplingWidth;
}
m_TransitionFilter = preset.m_TransitionFilter;
m_TransitionRate = preset.m_TransitionRate;
m_TransitionReverse = preset.m_TransitionReverse;
m_TransitionTex = preset.m_TransitionTex;
m_TransitionTexScale = preset.m_TransitionTexScale;
m_TransitionTexOffset = preset.m_TransitionTexOffset;
m_TransitionRotation = preset.m_TransitionRotation;
m_TransitionKeepAspectRatio = preset.m_TransitionKeepAspectRatio;
m_TransitionWidth = preset.m_TransitionWidth;
m_TransitionSoftness = preset.m_TransitionSoftness;
m_TransitionRange = preset.m_TransitionRange;
m_TransitionColorFilter = preset.m_TransitionColorFilter;
m_TransitionColor = preset.m_TransitionColor;
m_TransitionColorGlow = preset.m_TransitionColorGlow;
m_TransitionPatternReverse = preset.m_TransitionPatternReverse;
m_TransitionAutoPlaySpeed = preset.m_TransitionAutoPlaySpeed;
if (!append || preset.m_TransitionFilter != TransitionFilter.None)
{
m_TransitionFilter = preset.m_TransitionFilter;
m_TransitionRate = preset.m_TransitionRate;
m_TransitionReverse = preset.m_TransitionReverse;
m_TransitionTex = preset.m_TransitionTex;
m_TransitionTexScale = preset.m_TransitionTexScale;
m_TransitionTexOffset = preset.m_TransitionTexOffset;
m_TransitionTexSpeed = preset.m_TransitionTexSpeed;
m_TransitionRotation = preset.m_TransitionRotation;
m_TransitionKeepAspectRatio = preset.m_TransitionKeepAspectRatio;
m_TransitionWidth = preset.m_TransitionWidth;
m_TransitionSoftness = preset.m_TransitionSoftness;
m_TransitionRange = preset.m_TransitionRange;
m_TransitionColorFilter = preset.m_TransitionColorFilter;
m_TransitionColor = preset.m_TransitionColor;
m_TransitionColorGlow = preset.m_TransitionColorGlow;
m_TransitionPatternReverse = preset.m_TransitionPatternReverse;
m_TransitionAutoPlaySpeed = preset.m_TransitionAutoPlaySpeed;
}
m_TargetMode = preset.m_TargetMode;
m_TargetColor = preset.m_TargetColor;
m_TargetRange = preset.m_TargetRange;
m_TargetSoftness = preset.m_TargetSoftness;
if (!append || preset.m_TargetMode != TargetMode.None)
{
m_TargetMode = preset.m_TargetMode;
m_TargetColor = preset.m_TargetColor;
m_TargetRange = preset.m_TargetRange;
m_TargetSoftness = preset.m_TargetSoftness;
}
m_BlendType = preset.m_BlendType;
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, preset.m_SrcBlendMode, preset.m_DstBlendMode).Convert();
m_ShadowMode = preset.m_ShadowMode;
m_ShadowDistance = preset.m_ShadowDistance;
m_ShadowIteration = preset.m_ShadowIteration;
m_ShadowFade = preset.m_ShadowFade;
m_ShadowMirrorScale = preset.m_ShadowMirrorScale;
m_ShadowBlurIntensity = preset.m_ShadowBlurIntensity;
m_ShadowColorFilter = preset.m_ShadowColorFilter;
m_ShadowColor = preset.m_ShadowColor;
m_ShadowColorGlow = preset.m_ShadowColorGlow;
if (!append || preset.m_BlendType != BlendType.AlphaBlend)
{
m_BlendType = preset.m_BlendType;
(m_SrcBlendMode, m_DstBlendMode) =
(m_BlendType, preset.m_SrcBlendMode, preset.m_DstBlendMode).Convert();
}
m_EdgeMode = preset.m_EdgeMode;
m_EdgeShinyRate = preset.m_EdgeShinyRate;
m_EdgeWidth = preset.m_EdgeWidth;
m_EdgeColorFilter = preset.m_EdgeColorFilter;
m_EdgeColor = preset.m_EdgeColor;
m_EdgeShinyWidth = preset.m_EdgeShinyWidth;
m_EdgeShinyAutoPlaySpeed = preset.m_EdgeShinyAutoPlaySpeed;
m_PatternArea = preset.m_PatternArea;
if (!append || preset.m_ShadowMode != ShadowMode.None)
{
m_ShadowMode = preset.m_ShadowMode;
m_ShadowDistance = preset.m_ShadowDistance;
m_ShadowIteration = preset.m_ShadowIteration;
m_ShadowFade = preset.m_ShadowFade;
m_ShadowMirrorScale = preset.m_ShadowMirrorScale;
m_ShadowBlurIntensity = preset.m_ShadowBlurIntensity;
m_ShadowColorFilter = preset.m_ShadowColorFilter;
m_ShadowColor = preset.m_ShadowColor;
m_ShadowColorGlow = preset.m_ShadowColorGlow;
}
m_GradationMode = preset.m_GradationMode;
m_GradationColor1 = preset.m_GradationColor1;
m_GradationColor2 = preset.m_GradationColor2;
m_GradationColor3 = preset.m_GradationColor3;
m_GradationColor4 = preset.m_GradationColor4;
m_GradationGradient = new Gradient();
m_GradationGradient.SetKeys(preset.m_GradationGradient.colorKeys, preset.m_GradationGradient.alphaKeys);
m_GradationGradient.mode = preset.m_GradationGradient.mode;
m_GradationOffset = preset.m_GradationOffset;
m_GradationScale = preset.m_GradationScale;
m_GradationRotation = preset.m_GradationRotation;
if (!append || preset.m_EdgeMode != EdgeMode.None)
{
m_EdgeMode = preset.m_EdgeMode;
m_EdgeShinyRate = preset.m_EdgeShinyRate;
m_EdgeWidth = preset.m_EdgeWidth;
m_EdgeColorFilter = preset.m_EdgeColorFilter;
m_EdgeColor = preset.m_EdgeColor;
m_EdgeColorGlow = preset.m_EdgeColorGlow;
m_EdgeShinyWidth = preset.m_EdgeShinyWidth;
m_EdgeShinyAutoPlaySpeed = preset.m_EdgeShinyAutoPlaySpeed;
m_PatternArea = preset.m_PatternArea;
}
if (!append || preset.m_GradationMode != GradationMode.None)
{
m_GradationMode = preset.m_GradationMode;
m_GradationColor1 = preset.m_GradationColor1;
m_GradationColor2 = preset.m_GradationColor2;
m_GradationColor3 = preset.m_GradationColor3;
m_GradationColor4 = preset.m_GradationColor4;
m_GradationGradient = new Gradient();
m_GradationGradient.SetKeys(preset.m_GradationGradient.colorKeys, preset.m_GradationGradient.alphaKeys);
m_GradationGradient.mode = preset.m_GradationGradient.mode;
m_GradationOffset = preset.m_GradationOffset;
m_GradationScale = preset.m_GradationScale;
m_GradationRotation = preset.m_GradationRotation;
}
if (!append || preset.m_DetailFilter != DetailFilter.None)
{
m_DetailFilter = preset.m_DetailFilter;
m_DetailIntensity = preset.m_DetailIntensity;
m_DetailThreshold = preset.m_DetailThreshold;
m_DetailTex = preset.m_DetailTex;
m_DetailTexScale = preset.m_DetailTexScale;
m_DetailTexOffset = preset.m_DetailTexOffset;
m_DetailTexSpeed = preset.m_DetailTexSpeed;
}
UpdateContext(context);
SetVerticesDirty();
@@ -1234,6 +1750,7 @@ namespace Coffee.UIEffects
m_TransitionTex = c.transitionTex;
m_TransitionTexScale = c.transitionTexScale;
m_TransitionTexOffset = c.transitionTexOffset;
m_TransitionTexSpeed = c.transitionTexSpeed;
m_TransitionRotation = c.transitionRotation;
m_TransitionKeepAspectRatio = c.transitionKeepAspectRatio;
m_TransitionWidth = c.transitionWidth;
@@ -1269,6 +1786,7 @@ namespace Coffee.UIEffects
m_EdgeWidth = c.edgeWidth;
m_EdgeColorFilter = c.edgeColorFilter;
m_EdgeColor = c.edgeColor;
m_EdgeColorGlow = c.edgeColorGlow;
m_EdgeShinyWidth = c.edgeShinyWidth;
m_EdgeShinyAutoPlaySpeed = c.edgeShinyAutoPlaySpeed;
m_PatternArea = c.patternArea;
@@ -1285,6 +1803,14 @@ namespace Coffee.UIEffects
m_GradationScale = c.gradationScale;
m_GradationRotation = c.gradationRotation;
m_DetailFilter = c.detailFilter;
m_DetailIntensity = c.detailIntensity;
m_DetailThreshold = c.detailThreshold;
m_DetailTex = c.detailTex;
m_DetailTexScale = c.detailTexScale;
m_DetailTexOffset = c.detailTexOffset;
m_DetailTexSpeed = c.detailTexSpeed;
UpdateContext(context);
SetVerticesDirty();
SetMaterialDirty();
+54 -30
View File
@@ -22,8 +22,11 @@ namespace Coffee.UIEffects
private Graphic _graphic;
private Material _material;
private UIEffectContext _context;
private Action _setVerticesDirtyIfVisible;
private Action _onBeforeCanvasRebuild;
private bool _canModifyMesh;
private Matrix4x4 _prevTransformHash;
public Material effectMaterial => _material;
public Graphic graphic => _graphic ? _graphic : _graphic = GetComponent<Graphic>();
public virtual uint effectId => (uint)GetInstanceID();
public virtual float actualSamplingScale => 1;
@@ -45,8 +48,16 @@ namespace Coffee.UIEffects
public virtual RectTransform transitionRoot => transform as RectTransform;
public virtual Flip flip
{
get => 0;
set { }
}
protected override void OnEnable()
{
_onBeforeCanvasRebuild ??= OnBeforeCanvasRebuild;
UIExtraCallbacks.onBeforeCanvasRebuild += _onBeforeCanvasRebuild;
UpdateContext(context);
SetMaterialDirty();
SetVerticesDirty();
@@ -54,9 +65,9 @@ namespace Coffee.UIEffects
protected override void OnDisable()
{
if (_setVerticesDirtyIfVisible != null)
if (_onBeforeCanvasRebuild != null)
{
UIExtraCallbacks.onBeforeCanvasRebuild -= _setVerticesDirtyIfVisible;
UIExtraCallbacks.onBeforeCanvasRebuild -= _onBeforeCanvasRebuild;
}
MaterialRepository.Release(ref _material);
@@ -66,11 +77,19 @@ namespace Coffee.UIEffects
protected override void OnDestroy()
{
_setVerticesDirtyIfVisible = null;
_onBeforeCanvasRebuild = null;
_graphic = null;
s_ContextPool.Return(ref _context);
}
protected virtual void OnBeforeCanvasRebuild()
{
if (!_canModifyMesh && CanModifyMesh())
{
SetVerticesDirty();
}
}
public void ModifyMesh(Mesh mesh)
{
}
@@ -79,14 +98,10 @@ namespace Coffee.UIEffects
{
if (!isActiveAndEnabled || context == null) return;
if (CanModifyMesh())
_canModifyMesh = CanModifyMesh();
if (_canModifyMesh)
{
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
}
// If you can't modify the mesh, retry next frame.
else
{
UIExtraCallbacks.onBeforeCanvasRebuild += _setVerticesDirtyIfVisible ??= SetVerticesDirtyIfVisible;
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape, flip);
}
}
@@ -127,6 +142,7 @@ namespace Coffee.UIEffects
Profiler.EndSample();
}
_material.CopyPropertiesFromMaterial(baseMaterial);
ApplyContextToMaterial(_material);
Profiler.EndSample();
return _material;
@@ -144,6 +160,10 @@ namespace Coffee.UIEffects
{
OnValidate();
}
internal virtual void SetEnablePreviewIfSelected(GameObject[] selection)
{
}
#endif
protected override void OnRectTransformDimensionsChange()
@@ -165,18 +185,7 @@ namespace Coffee.UIEffects
{
graphic.SetVerticesDirty();
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, enabled);
#if UNITY_EDITOR
EditorApplication.QueuePlayerLoopUpdate();
#endif
}
}
private void SetVerticesDirtyIfVisible()
{
if (CanModifyMesh())
{
UIExtraCallbacks.onBeforeCanvasRebuild -= _setVerticesDirtyIfVisible ??= SetVerticesDirtyIfVisible;
SetVerticesDirty();
Misc.QueuePlayerLoopUpdate();
}
}
@@ -185,13 +194,24 @@ namespace Coffee.UIEffects
if (graphic)
{
graphic.SetMaterialDirty();
#if UNITY_EDITOR
EditorApplication.QueuePlayerLoopUpdate();
#endif
Misc.QueuePlayerLoopUpdate();
}
}
protected abstract void UpdateContext(UIEffectContext c);
protected bool CheckTransformChangedWith(Transform root)
{
var sensitivity = UIEffectProjectSettings.transformSensitivity;
return root
&& root != transform
&& transform.HasChanged(root, ref _prevTransformHash, sensitivity);
}
internal void ReleaseMaterial()
{
MaterialRepository.Release(ref _material);
}
internal abstract void UpdateContext(UIEffectContext c);
public virtual void ApplyContextToMaterial(Material material)
{
@@ -200,11 +220,15 @@ namespace Coffee.UIEffects
context.ApplyToMaterial(material, actualSamplingScale);
#if UNITY_EDITOR
UIEffectProjectSettings.shaderRegistry.RegisterVariant(material, "UI > UIEffect");
if (!EditorApplication.isPlaying)
Profiler.BeginSample("(Editor/UIE)[UIEffect] ApplyContextToMaterial Post Process");
if (!Application.isPlaying)
{
EditorApplication.QueuePlayerLoopUpdate();
SetEnablePreviewIfSelected(Selection.gameObjects);
Misc.QueuePlayerLoopUpdate();
}
UIEffectProjectSettings.shaderRegistry.RegisterVariant(material, "UI > UIEffect");
Profiler.EndSample();
#endif
}
+119 -13
View File
@@ -26,6 +26,7 @@ namespace Coffee.UIEffects
private static readonly int s_TransitionReverse = Shader.PropertyToID("_TransitionReverse");
private static readonly int s_TransitionTex = Shader.PropertyToID("_TransitionTex");
private static readonly int s_TransitionTex_ST = Shader.PropertyToID("_TransitionTex_ST");
private static readonly int s_TransitionTex_Speed = Shader.PropertyToID("_TransitionTex_Speed");
private static readonly int s_TransitionWidth = Shader.PropertyToID("_TransitionWidth");
private static readonly int s_TransitionSoftness = Shader.PropertyToID("_TransitionSoftness");
private static readonly int s_TransitionRange = Shader.PropertyToID("_TransitionRange");
@@ -42,10 +43,16 @@ namespace Coffee.UIEffects
private static readonly int s_ShadowColorGlow = Shader.PropertyToID("_ShadowColorGlow");
private static readonly int s_EdgeWidth = Shader.PropertyToID("_EdgeWidth");
private static readonly int s_EdgeColor = Shader.PropertyToID("_EdgeColor");
private static readonly int s_EdgeColorGlow = Shader.PropertyToID("_EdgeColorGlow");
private static readonly int s_EdgeShinyAutoPlaySpeed = Shader.PropertyToID("_EdgeShinyAutoPlaySpeed");
private static readonly int s_EdgeShinyRate = Shader.PropertyToID("_EdgeShinyRate");
private static readonly int s_EdgeShinyWidth = Shader.PropertyToID("_EdgeShinyWidth");
private static readonly int s_PatternArea = Shader.PropertyToID("_PatternArea");
private static readonly int s_DetailIntensity = Shader.PropertyToID("_DetailIntensity");
private static readonly int s_DetailThreshold = Shader.PropertyToID("_DetailThreshold");
private static readonly int s_DetailTex = Shader.PropertyToID("_DetailTex");
private static readonly int s_DetailTex_ST = Shader.PropertyToID("_DetailTex_ST");
private static readonly int s_DetailTex_Speed = Shader.PropertyToID("_DetailTex_Speed");
private static readonly string[] s_ToneKeywords =
{
@@ -148,6 +155,16 @@ namespace Coffee.UIEffects
"EDGE_COLOR_CONTRAST"
};
private static readonly string[] s_DetailKeywords =
{
"",
"DETAIL_MASKING",
"DETAIL_MULTIPLY",
"DETAIL_ADDITIVE",
"DETAIL_REPLACE",
"DETAIL_MULTIPLY_ADDITIVE"
};
private static readonly Vector2[][] s_ShadowVectors = new[]
{
Array.Empty<Vector2>(), // None
@@ -181,6 +198,7 @@ namespace Coffee.UIEffects
public Texture transitionTex;
public Vector2 transitionTexScale = new Vector2(1, 1);
public Vector2 transitionTexOffset = new Vector2(0, 0);
public Vector2 transitionTexSpeed = new Vector2(0, 0);
public float transitionRotation = 0;
public bool transitionKeepAspectRatio = true;
public float transitionWidth = 0.2f;
@@ -215,6 +233,7 @@ namespace Coffee.UIEffects
public float edgeWidth;
public ColorFilter edgeColorFilter;
public Color edgeColor;
public bool edgeColorGlow;
public float edgeShinyWidth;
public float edgeShinyAutoPlaySpeed;
public PatternArea patternArea;
@@ -230,14 +249,26 @@ namespace Coffee.UIEffects
public float gradationRotation;
private List<float> _keyTimes;
public bool willModifyMaterial => samplingFilter != SamplingFilter.None
|| transitionFilter != TransitionFilter.None
|| toneFilter != ToneFilter.None
public DetailFilter detailFilter;
public float detailIntensity;
public MinMax01 detailThreshold;
public Texture detailTex;
public Vector2 detailTexScale = new Vector2(1, 1);
public Vector2 detailTexOffset = new Vector2(0, 0);
public Vector2 detailTexSpeed = new Vector2(0, 0);
public bool willModifyMaterial => toneFilter != ToneFilter.None
|| colorFilter != ColorFilter.None
|| samplingFilter != SamplingFilter.None
|| transitionFilter != TransitionFilter.None
|| srcBlendMode != BlendMode.One
|| dstBlendMode != BlendMode.OneMinusSrcAlpha
|| shadowMode != ShadowMode.None
|| edgeMode != EdgeMode.None;
|| edgeMode != EdgeMode.None
|| detailFilter != DetailFilter.None;
public bool willModifyVertex => willModifyMaterial
|| gradationMode != GradationMode.None;
public void Reset()
{
@@ -266,6 +297,7 @@ namespace Coffee.UIEffects
transitionTex = preset.transitionTex;
transitionTexScale = preset.transitionTexScale;
transitionTexOffset = preset.transitionTexOffset;
transitionTexSpeed = preset.transitionTexSpeed;
transitionKeepAspectRatio = preset.transitionKeepAspectRatio;
transitionRotation = preset.transitionRotation;
transitionWidth = preset.transitionWidth;
@@ -300,6 +332,7 @@ namespace Coffee.UIEffects
edgeWidth = preset.edgeWidth;
edgeColorFilter = preset.edgeColorFilter;
edgeColor = preset.edgeColor;
edgeColorGlow = preset.edgeColorGlow;
edgeShinyAutoPlaySpeed = preset.edgeShinyAutoPlaySpeed;
edgeShinyWidth = preset.edgeShinyWidth;
patternArea = preset.patternArea;
@@ -313,6 +346,14 @@ namespace Coffee.UIEffects
gradationOffset = preset.gradationOffset;
gradationScale = preset.gradationScale;
gradationRotation = preset.gradationRotation;
detailFilter = preset.detailFilter;
detailIntensity = preset.detailIntensity;
detailThreshold = preset.detailThreshold;
detailTex = preset.detailTex;
detailTexScale = preset.detailTexScale;
detailTexOffset = preset.detailTexOffset;
detailTexSpeed = preset.detailTexSpeed;
}
public void SetGradationDirty()
@@ -342,10 +383,11 @@ namespace Coffee.UIEffects
material.SetFloat(s_TransitionRate, Mathf.Clamp01(transitionRate));
material.SetInt(s_TransitionReverse, transitionReverse ? 1 : 0);
material.SetTexture(s_TransitionTex, transitionTex);
material.SetTexture(s_TransitionTex, transitionFilter != 0 ? transitionTex : null);
material.SetVector(s_TransitionTex_ST,
new Vector4(transitionTexScale.x, transitionTexScale.y,
transitionTexOffset.x, transitionTexOffset.y));
material.SetVector(s_TransitionTex_Speed, transitionTexSpeed);
material.SetFloat(s_TransitionWidth, Mathf.Clamp01(transitionWidth));
material.SetFloat(s_TransitionSoftness, Mathf.Clamp01(transitionSoftness));
material.SetVector(s_TransitionRange, new Vector2(transitionRange.min, transitionRange.max));
@@ -376,11 +418,20 @@ namespace Coffee.UIEffects
material.SetFloat(s_EdgeWidth, Mathf.Clamp01(edgeWidth));
material.SetColor(s_EdgeColor, edgeColor);
material.SetInt(s_EdgeColorGlow, edgeColorGlow ? 1 : 0);
material.SetFloat(s_EdgeShinyRate, Mathf.Clamp01(edgeShinyRate));
material.SetFloat(s_EdgeShinyWidth, Mathf.Clamp01(edgeShinyWidth));
material.SetFloat(s_EdgeShinyAutoPlaySpeed, edgeShinyAutoPlaySpeed);
material.SetInt(s_PatternArea, edgeMode != EdgeMode.None ? (int)patternArea : 0);
material.SetFloat(s_DetailIntensity, Mathf.Clamp01(detailIntensity));
material.SetVector(s_DetailThreshold, new Vector2(detailThreshold.min, detailThreshold.max));
material.SetTexture(s_DetailTex, detailFilter != 0 ? detailTex : null);
material.SetVector(s_DetailTex_ST,
new Vector4(detailTexScale.x, detailTexScale.y,
detailTexOffset.x, detailTexOffset.y));
material.SetVector(s_DetailTex_Speed, detailTexSpeed);
SetKeyword(material, s_ToneKeywords, (int)toneFilter);
SetKeyword(material, s_ColorKeywords, (int)colorFilter);
SetKeyword(material, s_SamplingKeywords, (int)samplingFilter);
@@ -419,12 +470,22 @@ namespace Coffee.UIEffects
break;
}
SetKeyword(material, s_DetailKeywords, (int)detailFilter);
SetKeyword(material, s_TargetKeywords, (int)targetMode);
Profiler.EndSample();
}
public void SetEnablePreview(bool enable, Material material)
{
if (!material) return;
material.SetVector(s_TransitionTex_Speed, enable ? (Vector4)transitionTexSpeed : Vector4.zero);
material.SetVector(s_DetailTex_Speed, enable ? (Vector4)detailTexSpeed : Vector4.zero);
material.SetFloat(s_TransitionAutoPlaySpeed, enable ? transitionAutoPlaySpeed : 0);
material.SetFloat(s_EdgeShinyAutoPlaySpeed, enable ? edgeShinyAutoPlaySpeed : 0);
}
private static void SetKeyword(Material material, string[] keywords, int index)
{
for (var i = 0; i < keywords.Length; i++)
@@ -440,15 +501,21 @@ namespace Coffee.UIEffects
}
}
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh, bool canModifyShape)
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh,
bool canModifyShape, Flip flip)
{
// Apply flip (without effect).
ApplyFlipWithoutEffect(vh, flip);
var count = vh.currentIndexCount;
if (!willModifyVertex || count == 0) return;
var effectProxy = GraphicProxy.Find(graphic);
var isText = effectProxy.IsText(graphic);
effectProxy.OnPreModifyMesh(graphic);
var verts = s_WorkingVertices;
var expandSize = effectProxy.ModifyExpandSize(graphic, GetExpandSize(canModifyShape));
var count = vh.currentIndexCount;
// Get the rectangle to calculate the normalized position.
vh.GetUIVertexStream(verts);
@@ -477,10 +544,15 @@ namespace Coffee.UIEffects
rot *= Matrix4x4.Scale(new Vector3(multiplier, multiplier, 1));
}
if (transitionKeepAspectRatio && transitionTex)
var normalizeTex = transitionTex
? transitionTex
: detailTex
? detailTex
: null;
if (transitionKeepAspectRatio && normalizeTex)
{
var center = rect.center;
var aspectRatio = (float)transitionTex.width / transitionTex.height;
var aspectRatio = (float)normalizeTex.width / normalizeTex.height;
if (rect.width < rect.height)
{
rect.width = rect.height * aspectRatio;
@@ -510,8 +582,11 @@ namespace Coffee.UIEffects
// Apply gradation.
ApplyGradation(verts, transitionRoot.rect, rectMatrix, canModifyShape);
// Apply flip (with effect).
ApplyFlipWithEffect(verts, flip);
// Apply shadow.
ApplyShadow(transitionRoot, verts);
ApplyShadow(verts, transitionRoot, flip);
vh.Clear();
vh.AddUIVertexTriangleStream(verts);
@@ -626,23 +701,54 @@ namespace Coffee.UIEffects
}
}
private void ApplyShadow(RectTransform transitionRoot, List<UIVertex> verts)
private void ApplyShadow(List<UIVertex> verts, RectTransform transitionRoot, Flip flip)
{
var distance = shadowDistance;
if (distance == Vector2.zero) return;
if ((flip & Flip.Shadow) != 0)
{
distance.x = (flip & Flip.Horizontal) != 0 ? -distance.x : distance.x;
distance.y = (flip & Flip.Vertical) != 0 ? -distance.y : distance.y;
}
switch (shadowMode)
{
case ShadowMode.Shadow:
case ShadowMode.Shadow3:
case ShadowMode.Outline:
case ShadowMode.Outline8:
ShadowUtil.DoShadow(verts, s_ShadowVectors[(int)shadowMode], shadowDistance, shadowIteration,
ShadowUtil.DoShadow(verts, s_ShadowVectors[(int)shadowMode], distance, shadowIteration,
shadowFade);
break;
case ShadowMode.Mirror:
ShadowUtil.DoMirror(verts, shadowDistance, shadowMirrorScale, shadowFade, transitionRoot);
ShadowUtil.DoMirror(verts, distance, shadowMirrorScale, shadowFade, transitionRoot);
break;
}
}
private static void ApplyFlipWithoutEffect(VertexHelper vh, Flip flip)
{
if ((flip & Flip.Effect) != 0) return;
var flipHorizontal = 0 != (flip & Flip.Horizontal);
var flipVertical = 0 != (flip & Flip.Vertical);
if (!flipHorizontal && !flipVertical) return;
UIVertexUtil.Flip(vh, flipHorizontal, flipVertical);
}
private static void ApplyFlipWithEffect(List<UIVertex> verts, Flip flip)
{
if ((flip & Flip.Effect) == 0) return;
var flipHorizontal = 0 != (flip & Flip.Horizontal);
var flipVertical = 0 != (flip & Flip.Vertical);
if (!flipHorizontal && !flipVertical) return;
UIVertexUtil.Flip(verts, flipHorizontal, flipVertical);
}
private Vector2 GetExpandSize(bool canModifyShape)
{
if (!canModifyShape) return Vector2.zero;
+129 -46
View File
@@ -8,7 +8,6 @@ using UnityEngine;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
public class UIEffectProjectSettings : PreloadedProjectSettings<UIEffectProjectSettings>
{
[Tooltip(
@@ -73,62 +72,117 @@ namespace Coffee.UIEffects
return null;
}
protected override void OnEnable()
{
base.OnEnable();
#if UNITY_EDITOR
SetupSamplesForShaderVariantRegistry();
m_ShaderVariantRegistry.ClearCache();
#endif
}
#if UNITY_EDITOR
private const string k_PresetDir = "UIEffectPresets";
private const string k_PresetSaveDir = "Assets/ProjectSettings/" + k_PresetDir;
private const string k_PresetPathPattern = "/" + k_PresetDir + "/(.*).prefab$";
[InitializeOnLoadMethod]
private static void InitializeOnLoadMethod()
{
#if UNITY_2023_2_OR_NEWER
const string tmpSupport = "TextMeshPro Support (Unity 6)";
const string version = "v5.6.0 (Unity 6)";
#else
const string tmpSupport = "TextMeshPro Support";
const string version = "v5.6.0";
#endif
ShaderSampleImporter.RegisterShaderSamples(new[]
{
// TextMeshPro Support/TextMeshPro Support (Unity 6)
("Hidden/TextMeshPro/Distance Field SSD (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Distance Field Overlay (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Bitmap (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Distance Field (UIEffect)", tmpSupport, version),
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version)
});
ShaderSampleImporter.RegisterShaderAliases(new[]
{
("Hidden/Hidden/TextMeshPro/Distance Field SSD (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Distance Field SSD (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field SSD (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Distance Field Overlay (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Distance Field Overlay (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field Overlay (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Bitmap (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Bitmap (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Mobile/Bitmap (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Distance Field (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Distance Field (UIEffect)"),
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field (SoftMaskable) (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)")
});
ShaderSampleImporter.RegisterDeprecatedShaders(new[]
{
// Old shaders.
("367310b4ca95c4b00a2215568f1af735", "Hidden-TMP_Bitmap-Mobile-UIEffect-Unity6.shader"),
("490fe6c46146140cca8766a31c9dfc0c", "Hidden-TMP_Bitmap-UIEffect-Unity6.shader"),
("b875fa74fa43a4c48a44634d5f3e6d3d", "Hidden-TMP_SDF-Mobile-UIEffect-Unity6.shader"),
("c67f821adbb6348a3a21573a25b55de0", "Hidden-TMP_SDF-UIEffect-Unity6.shader")
});
EditorApplication.update += ShaderSampleImporter.Update;
CgincPathSync.RegisterShaders("/(TMPro|TMPro_Properties).cginc", new[]
{
"Hidden/TextMeshPro/Distance Field (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)",
"Hidden/TextMeshPro/Distance Field SSD (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)",
"Hidden/TextMeshPro/Distance Field Overlay (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)",
"Hidden/TextMeshPro/Bitmap (UIEffect)",
"Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)",
"Hidden/TextMeshPro/Distance Field (UIEffect)",
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)"
});
Selection.selectionChanged += () =>
{
if (Application.isPlaying || Misc.isBatchOrBuilding) return;
var selection = Selection.gameObjects;
foreach (var c in FindAll())
{
if (!c || !c.isActiveAndEnabled) continue;
c.SetEnablePreviewIfSelected(selection);
}
};
}
private static IEnumerable<UIEffectBase> FindAll()
{
return Misc.FindObjectsOfType<UIEffectBase>()
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>());
}
protected override void OnEnable()
{
base.OnEnable();
m_ShaderVariantRegistry.onShaderRequested = ShaderSampleImporter.ImportShaderIfSelected;
m_ShaderVariantRegistry.ClearCache();
}
protected override void OnCreateAsset()
{
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
m_ShaderVariantRegistry.InitializeIfNeeded(this);
m_ShaderVariantRegistry.RegisterOptionalShaders(this);
}
protected override void OnInitialize()
{
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
m_ShaderVariantRegistry.InitializeIfNeeded(this);
}
private void Reset()
{
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
}
private void SetupSamplesForShaderVariantRegistry()
{
#if UNITY_2023_2_OR_NEWER
const string tmpSupport = "TextMeshPro Support (Unity 6)";
#else
const string tmpSupport = "TextMeshPro Support";
#endif
m_ShaderVariantRegistry.RegisterSamples(new[]
{
("Hidden/TextMeshPro/Bitmap (UIEffect)", tmpSupport),
("Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)", tmpSupport),
("Hidden/TextMeshPro/Distance Field (UIEffect)", tmpSupport),
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport)
});
}
private void Refresh()
{
m_ShaderVariantRegistry.ClearCache();
MaterialRepository.Clear();
foreach (var c in Misc.FindObjectsOfType<UIEffectBase>()
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>()))
{
c.SetMaterialDirty();
}
EditorApplication.QueuePlayerLoopUpdate();
m_ShaderVariantRegistry.InitializeIfNeeded(this);
m_ShaderVariantRegistry.RegisterOptionalShaders(this);
}
internal static UIEffect[] LoadEditorPresets()
@@ -136,6 +190,7 @@ namespace Coffee.UIEffects
var dirs = AssetDatabase.FindAssets(k_PresetDir + " t:folder")
.Select(AssetDatabase.GUIDToAssetPath)
.Where(x => Path.GetFileName(x) == k_PresetDir)
.OrderBy(x => x.StartsWith("Packages/com.coffee.ui-effect/"))
.ToArray();
return AssetDatabase.FindAssets("t:prefab", dirs)
.Select(AssetDatabase.GUIDToAssetPath)
@@ -171,20 +226,48 @@ namespace Coffee.UIEffects
return new PreloadedProjectSettingsProvider("Project/UI/UI Effect");
}
internal static string GetPresetPath(UIEffect preset)
internal static (string path, bool builtin) GetPresetPath(UIEffect preset)
{
var assetPath = AssetDatabase.GetAssetPath(preset);
var builtin = assetPath.StartsWith("Packages/com.coffee.ui-effect/");
var m = Regex.Match(assetPath, k_PresetPathPattern);
return m.Success ? m.Groups[1].Value : Path.GetFileNameWithoutExtension(assetPath);
return (m.Success ? m.Groups[1].Value : Path.GetFileNameWithoutExtension(assetPath), builtin);
}
private class Postprocessor : AssetPostprocessor
{
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
private static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] ___, string[] ____)
{
if (Misc.isBatchOrBuilding) return;
instance.Refresh();
// Register optional shaders when shaders are imported.
if (imported.Concat(deleted).Any(path => path.EndsWith(".shader")))
{
MaterialRepository.Clear();
// Refresh
if (hasInstance)
{
shaderRegistry.ClearCache();
shaderRegistry.RegisterOptionalShaders(instance);
}
// Refresh all UIEffect instances.
foreach (var c in FindAll())
{
c.ReleaseMaterial();
}
}
// Refresh all UIEffect instances.
EditorApplication.delayCall += () =>
{
foreach (var c in FindAll())
{
c.SetMaterialDirty();
c.SetVerticesDirty();
}
};
}
}
#endif
@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
userData:
assetBundleName:
assetBundleVariant:
+97 -28
View File
@@ -16,8 +16,13 @@ namespace Coffee.UIEffects
[SerializeField]
protected bool m_AllowToModifyMeshShape = true;
[SerializeField]
protected RectTransform m_CustomRoot = null;
[SerializeField]
protected Flip m_Flip = 0;
private UIEffect _currentTarget;
private Matrix4x4 _prevTransformHash;
public UIEffect target
{
@@ -43,6 +48,17 @@ namespace Coffee.UIEffects
}
}
public RectTransform customRoot
{
get => m_CustomRoot;
set
{
if (m_CustomRoot == value) return;
m_CustomRoot = value;
SetVerticesDirty();
}
}
public float samplingScale
{
get => m_SamplingScale;
@@ -55,38 +71,83 @@ namespace Coffee.UIEffects
}
}
public bool allowToModifyMeshShape
{
get => m_AllowToModifyMeshShape;
set
{
if (m_AllowToModifyMeshShape == value) return;
m_AllowToModifyMeshShape = value;
SetVerticesDirty();
}
}
public override Flip flip
{
get => m_Flip;
set
{
if (m_Flip == value) return;
m_Flip = value;
SetVerticesDirty();
}
}
public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
public override bool canModifyShape => m_AllowToModifyMeshShape;
public override uint effectId => target ? target.effectId : 0;
public override UIEffectContext context => target && target.isActiveAndEnabled ? target.context : null;
public override RectTransform transitionRoot => useTargetTransform && target
public override UIEffectContext context
{
get
{
if (!target) return null;
if (!isTargetInScene) return base.context;
return target.isActiveAndEnabled ? target.context : null;
}
}
public override RectTransform transitionRoot => useTargetTransform && isTargetInScene
? target.transitionRoot
: transform as RectTransform;
: m_CustomRoot
? m_CustomRoot
: transform as RectTransform;
private bool isTargetInScene => target && target.gameObject.scene.IsValid();
protected override void OnEnable()
{
RefreshTarget(target);
UIExtraCallbacks.onBeforeCanvasRebuild += SetVerticesDirtyIfTransformChanged;
CheckTransform();
base.OnEnable();
}
protected override void OnDisable()
{
RefreshTarget(null);
UIExtraCallbacks.onBeforeCanvasRebuild -= SetVerticesDirtyIfTransformChanged;
base.OnDisable();
}
protected override void OnDestroy()
{
_currentTarget = null;
base.OnDestroy();
}
#if UNITY_EDITOR
protected override void OnValidate()
{
RefreshTarget(target);
base.OnValidate();
}
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
{
if (!isTargetInScene) return;
target.SetEnablePreviewIfSelected(selection);
}
#endif
private void RefreshTarget(UIEffect newTarget)
@@ -97,20 +158,42 @@ namespace Coffee.UIEffects
_currentTarget.replicas.Remove(this);
}
_currentTarget = newTarget;
if (_currentTarget)
if (newTarget)
{
_currentTarget.replicas.Add(this);
_currentTarget = newTarget;
if (isTargetInScene)
{
_currentTarget.replicas.Add(this);
}
}
else
{
_currentTarget = null;
}
}
protected override void UpdateContext(UIEffectContext c)
protected override void OnBeforeCanvasRebuild()
{
base.OnBeforeCanvasRebuild();
if (useTargetTransform && isTargetInScene && CheckTransformChangedWith(target.transform))
{
SetVerticesDirty();
}
}
internal override void UpdateContext(UIEffectContext c)
{
if (target && !isTargetInScene)
{
target.UpdateContext(c);
}
}
public override void ApplyContextToMaterial(Material material)
{
if (!isActiveAndEnabled || !target || !target.isActiveAndEnabled) return;
if (!isActiveAndEnabled || !target) return;
if (isTargetInScene && !target.isActiveAndEnabled) return;
base.ApplyContextToMaterial(material);
}
@@ -121,23 +204,9 @@ namespace Coffee.UIEffects
public override bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
{
return !target || target.IsRaycastLocationValid(sp, eventCamera);
}
if (!isActiveAndEnabled || !isTargetInScene) return true;
private bool CheckTransform()
{
return useTargetTransform
&& target
&& transform.HasChanged(target.transform, ref _prevTransformHash,
UIEffectProjectSettings.transformSensitivity);
}
private void SetVerticesDirtyIfTransformChanged()
{
if (CheckTransform())
{
SetVerticesDirty();
}
return target.IsRaycastLocationValid(sp, eventCamera);
}
}
}
+69 -3
View File
@@ -11,6 +11,11 @@ namespace Coffee.UIEffects
[RequireComponent(typeof(UIEffectBase))]
public class UIEffectTweener : MonoBehaviour
{
[Serializable]
public class TweenerEvent : UnityEvent<float>
{
}
[Flags]
public enum CullingMask
{
@@ -20,7 +25,8 @@ namespace Coffee.UIEffects
Transition = 1 << 3,
GradiationOffset = 1 << 5,
GradiationRotation = 1 << 6,
EdgeShiny = 1 << 8
EdgeShiny = 1 << 8,
Event = 1 << 31
}
public enum UpdateMode
@@ -54,7 +60,9 @@ namespace Coffee.UIEffects
[Tooltip("The culling mask of the tween.")]
[SerializeField]
private CullingMask m_CullingMask = (CullingMask)(-1);
private CullingMask m_CullingMask = CullingMask.Tone | CullingMask.Color | CullingMask.Sampling |
CullingMask.Transition | CullingMask.GradiationOffset |
CullingMask.GradiationRotation | CullingMask.EdgeShiny;
[Tooltip("The direction of the tween.")]
[SerializeField]
@@ -64,6 +72,13 @@ namespace Coffee.UIEffects
[SerializeField]
private AnimationCurve m_Curve = AnimationCurve.Linear(0, 0, 1, 1);
[SerializeField]
private bool m_SeparateReverseCurve;
[Tooltip("The curve to tween the properties.")]
[SerializeField]
private AnimationCurve m_ReverseCurve = AnimationCurve.Linear(0, 0, 1, 1);
[Tooltip("The delay in seconds before the tween starts.")]
[SerializeField]
[Range(0f, 10)]
@@ -107,6 +122,10 @@ namespace Coffee.UIEffects
[SerializeField]
private UnityEvent m_OnComplete = new UnityEvent();
[Tooltip("Event to invoke when the rate was changed.")]
[SerializeField]
private TweenerEvent m_OnChangedRate = new TweenerEvent();
private bool _isPaused;
private float _rate = -1;
private float _time;
@@ -149,8 +168,38 @@ namespace Coffee.UIEffects
_rate = value;
if (!target || cullingMask == 0) return;
var evaluatedRate = m_Curve.Evaluate(_rate);
var currentCurve = curve;
if (separateReverseCurve)
{
switch (wrapMode)
{
case WrapMode.Once:
case WrapMode.Loop:
if (direction == Direction.Reverse)
{
currentCurve = reverseCurve;
}
break;
case WrapMode.PingPongOnce:
case WrapMode.PingPongLoop:
if (delay + duration + interval <= _time)
{
currentCurve = reverseCurve;
}
break;
}
}
var evaluatedRate = currentCurve.Evaluate(_rate);
target.SetRate(evaluatedRate, cullingMask);
if (0 != (cullingMask & CullingMask.Event))
{
onChangedRate.Invoke(evaluatedRate);
}
}
}
@@ -270,11 +319,28 @@ namespace Coffee.UIEffects
set => m_Curve = value;
}
public bool separateReverseCurve
{
get => m_SeparateReverseCurve;
set => m_SeparateReverseCurve = value;
}
public AnimationCurve reverseCurve
{
get => m_ReverseCurve;
set => m_ReverseCurve = value;
}
/// <summary>
/// Event to invoke when the tween has completed.
/// </summary>
public UnityEvent onComplete => m_OnComplete;
/// <summary>
/// Event to invoke when the rate was changed.
/// </summary>
public TweenerEvent onChangedRate => m_OnChangedRate;
/// <summary>
/// Is the tween playing?
/// </summary>
+40 -18
View File
@@ -128,7 +128,7 @@ namespace Coffee.UIEffects
// When the text is changed, add it to the changed list
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
{
if (obj is TextMeshProUGUI textMeshProUGUI)
if (obj is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
{
s_ChangedInstances.Add(textMeshProUGUI);
}
@@ -189,11 +189,14 @@ namespace Coffee.UIEffects
foreach (var textMeshProUGUI in s_RegisteredInstances)
{
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
if (textMeshProUGUI.TryGetComponent<UIEffect>(out var effect) && effect.isActiveAndEnabled)
if (textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect) && effect.isActiveAndEnabled)
{
effect.ReleaseMaterial();
effect.SetMaterialDirty();
}
}
Misc.QueuePlayerLoopUpdate();
};
#endif
}
@@ -208,25 +211,20 @@ namespace Coffee.UIEffects
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
{
if (!textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect)) return;
if (!effect || !effect.isActiveAndEnabled) return;
s_RegisteredInstances.Add(textMeshProUGUI);
if (!s_Mesh)
{
s_Mesh = new Mesh();
s_Mesh.MarkDynamic();
}
var target = effect is UIEffect uiEffect
? uiEffect
: effect is UIEffectReplica parentReplica
? parentReplica.target
: null;
s_RegisteredInstances.Add(textMeshProUGUI);
var effect = textMeshProUGUI.GetComponent<UIEffectBase>();
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
var modifiers = InternalListPool<IMeshModifier>.Rent();
var subModifiers = InternalListPool<IMeshModifier>.Rent();
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
textMeshProUGUI.GetComponents(modifiers);
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
{
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
@@ -234,7 +232,6 @@ namespace Coffee.UIEffects
meshInfo.mesh.CopyTo(s_VertexHelper, meshInfo.vertexCount, meshInfo.vertexCount * 6 / 4);
if (i == 0)
{
textMeshProUGUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
{
modifier.ModifyMesh(s_VertexHelper);
@@ -245,14 +242,38 @@ namespace Coffee.UIEffects
}
else if (i - 1 < subMeshes.Count)
{
foreach (var modifier in modifiers)
{
if (modifier is UIEffectBase) continue;
modifier.ModifyMesh(s_VertexHelper);
}
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
if (!target || !subMeshUI) break;
if (!subMeshUI) break;
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
replica.target = target;
if (effect is UIEffect pEffect && pEffect.isActiveAndEnabled)
{
replica.target = pEffect;
replica.useTargetTransform = true;
replica.customRoot = null;
replica.flip = pEffect.flip;
}
else if (effect is UIEffectReplica pReplica && pReplica.isActiveAndEnabled)
{
replica.target = pReplica.target;
replica.useTargetTransform = pReplica.useTargetTransform;
replica.customRoot = pReplica.customRoot;
replica.flip = pReplica.flip;
}
else
{
replica.target = null;
replica.customRoot = null;
}
subMeshUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
subMeshUI.GetComponents(subModifiers);
foreach (var modifier in subModifiers)
{
modifier.ModifyMesh(s_VertexHelper);
}
@@ -266,8 +287,9 @@ namespace Coffee.UIEffects
}
}
InternalListPool<IMeshModifier>.Return(ref modifiers);
InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
InternalListPool<IMeshModifier>.Return(ref modifiers);
InternalListPool<IMeshModifier>.Return(ref subModifiers);
s_Mesh.Clear(false);
}
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using Coffee.UIEffectInternal;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIEffects
{
@@ -9,6 +10,31 @@ namespace Coffee.UIEffects
{
public static Func<UIVertex, UIVertex, UIVertex, float, UIVertex> onLerpVertex;
public static void Flip(List<UIVertex> verts, bool horizontal, bool vertical)
{
var count = verts.Count;
for (var i = 0; i < count; i++)
{
var vt = verts[i];
var pos = vt.position;
vt.position = new Vector3(horizontal ? -pos.x : pos.x, vertical ? -pos.y : pos.y);
verts[i] = vt;
}
}
public static void Flip(VertexHelper vh, bool horizontal, bool vertical)
{
var count = vh.currentVertCount;
var vt = default(UIVertex);
for (var i = 0; i < count; i++)
{
vh.PopulateUIVertex(ref vt, i);
var pos = vt.position;
vt.position = new Vector3(horizontal ? -pos.x : pos.x, vertical ? -pos.y : pos.y);
vh.SetUIVertex(vt, i);
}
}
public static void ExpandCapacity(List<UIVertex> verts, int multiplier)
{
var capacity = Mathf.NextPowerOfTwo(verts.Count * multiplier);
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b679dead51ca64e93a87fbd98e1dbaf5
guid: c679ad076c9fb4c5193ee414faf2a60e
folderAsset: yes
DefaultImporter:
externalObjects: {}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9379b7b2236ab4c0e9f8d9f7db9936a8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: dee1cb6c2ee294c6087ea9d89d368417
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: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 31, y: 31, z: 31, w: 31}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
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: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 2775f4bfe28684615aa97cccf30fd220
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bb16138913ad1451aa438c3edd486c67
guid: 689e34b70ff3a41529576dfcd61ce296
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,7 +1,7 @@
using Coffee.UIEffects;
using UnityEngine;
public class PatternAndEdge : MonoBehaviour
public class UIEffect_PatternAndEdge : MonoBehaviour
{
private UIEffect[] _effects;
@@ -3,7 +3,7 @@ using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(UIEffectTweener))]
public class UIEffectTweenerControl : MonoBehaviour
public class UIEffect_TweenerControler : MonoBehaviour
{
[SerializeField]
private Text m_Info;
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 38bc56dae9c524546aba0a50b4e970af
guid: 4cf1917f21f7940b3973d424c9049152
folderAsset: yes
DefaultImporter:
externalObjects: {}
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -6,7 +6,7 @@ SpriteAtlas:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PatternAndEdge
m_Name: UIEffect_Demo
m_EditorData:
serializedVersion: 2
textureSettings:
@@ -44,21 +44,27 @@ SpriteAtlas:
secondaryTextureSettings: {}
variantMultiplier: 1
packables:
- {fileID: 102900000, guid: bb16138913ad1451aa438c3edd486c67, type: 3}
- {fileID: 102900000, guid: 4cf1917f21f7940b3973d424c9049152, type: 3}
bindAsDefault: 1
isAtlasV2: 0
cachedData: {fileID: 0}
m_MasterAtlas: {fileID: 0}
m_PackedSprites:
- {fileID: 21300000, guid: 2ee815c0807434e9091770d1c6cdc70b, type: 3}
- {fileID: 21300000, guid: 098475820cf634867a339bb9af940722, type: 3}
- {fileID: 21300000, guid: 03b5a015427324a419a5ddbd5d5a6551, type: 3}
- {fileID: 21300000, guid: e822d767ed19641dcaf9831e1c8a742a, type: 3}
- {fileID: 21300000, guid: 9617fea85692e4f5fb65fb2ddd4496ce, type: 3}
- {fileID: 21300000, guid: 1851730bef7524e58b285a364983e21e, type: 3}
- {fileID: 21300000, guid: be1fa55f69843fb4aaf4d0ff56004fba, type: 3}
m_PackedSpriteNamesToIndex:
- Badge_Checked
- Badge_Police
- Badge_Level
- FlatCornered_64
- UIEffect_I_am_Unity-Chan-256
- UIEffect_Badge_Checked
- UIEffect_Showcase_Art
- UIEffect_I_am_Unity-Chan-512
- UIEffect_Badge_Police
- UIEffect_Badge_Level
- UIEffect_FlatCornered_64
m_RenderDataMap: {}
m_Tag: PatternAndEdge
m_Tag: UIEffect_Demo
m_IsVariant: 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

@@ -24,6 +24,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -149,6 +150,7 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

@@ -24,6 +24,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -66,7 +67,7 @@ TextureImporter:
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
@@ -149,6 +150,7 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

@@ -38,7 +38,6 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.37311918, g: 0.3807396, b: 0.35872662, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -104,7 +103,7 @@ NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
@@ -117,7 +116,7 @@ NavMeshSettings:
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
@@ -154,9 +153,17 @@ Camera:
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -190,12 +197,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 134336676}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &347411368
GameObject:
@@ -226,9 +234,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1567169362}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -255,7 +263,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 2ee815c0807434e9091770d1c6cdc70b, type: 3}
m_Sprite: {fileID: 21300000, guid: e822d767ed19641dcaf9831e1c8a742a, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
@@ -291,20 +299,30 @@ MonoBehaviour:
m_ColorFilter: 0
m_ColorIntensity: 0.344
m_Color: {r: 0, g: 1.7098039, b: 4, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 6
m_SamplingIntensity: 1
m_SamplingWidth: 1
m_SamplingScale: 1
m_TransitionFilter: 5
m_TransitionRate: 0.538
m_TransitionRate: 0.52
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: 944c3fa29663042a1bdc35546c2eda58, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionTexSpeed: {x: 0, y: 0}
m_TransitionRotation: 135
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.25
m_TransitionSoftness: 0.5
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6
m_TransitionColor: {r: 1.4980392, g: 0.13333334, b: 0, a: 1}
m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
@@ -316,8 +334,59 @@ MonoBehaviour:
m_ShadowDistance: {x: 0, y: 0}
m_ShadowIteration: 1
m_ShadowFade: 1
m_ShadowEffectOnOrigin: 0
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
m_CustomRoot: {fileID: 0}
--- !u!1 &973375176
GameObject:
m_ObjectHideFlags: 0
@@ -348,6 +417,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
@@ -377,12 +447,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 973375176}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &986199151
GameObject:
@@ -420,7 +491,9 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 27
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -456,7 +529,7 @@ MonoBehaviour:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1280, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
@@ -474,10 +547,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1567169362}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -513,9 +586,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1567169362}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -540,20 +613,30 @@ MonoBehaviour:
m_ColorFilter: 0
m_ColorIntensity: 1
m_Color: {r: 0.7454045, g: 0.18447503, b: 0.000303527, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.5
m_SamplingWidth: 1
m_SamplingScale: 1
m_TransitionFilter: 7
m_TransitionRate: 0.4
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: 3a87e98e830a24617ab95c19122cb1e0, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionRate: 0.25
m_TransitionReverse: 1
m_TransitionTex: {fileID: 2800000, guid: 54e40a17ecd6a4b5a8a73a28042cdaa0, type: 3}
m_TransitionTexScale: {x: 1.46, y: 2.46}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionTexSpeed: {x: 0.02, y: 0}
m_TransitionRotation: 0
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 1
m_TransitionSoftness: 0.595
m_TransitionWidth: 0.709
m_TransitionSoftness: 0.39
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6
m_TransitionColor: {r: 6.6415095, g: 1.6342982, b: 0, a: 1}
m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
@@ -562,11 +645,62 @@ MonoBehaviour:
m_SrcBlendMode: 1
m_DstBlendMode: 10
m_ShadowMode: 5
m_ShadowDistance: {x: 1, y: 46.28}
m_ShadowDistance: {x: 1, y: 45}
m_ShadowIteration: 1
m_ShadowFade: 1
m_ShadowEffectOnOrigin: 1
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
m_CustomRoot: {fileID: 0}
--- !u!114 &1421004029
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -693,12 +827,12 @@ RectTransform:
m_GameObject: {fileID: 1567169361}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 347411369}
- {fileID: 1421004027}
m_Father: {fileID: 986199155}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -718,25 +852,35 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_ToneFilter: 1
m_ToneIntensity: 0.875
m_ToneIntensity: 0.75
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
m_ColorFilter: 6
m_ColorIntensity: 0.7
m_ColorIntensity: 0.6
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 1
m_SamplingIntensity: 0.622
m_SamplingIntensity: 0.75
m_SamplingWidth: 1
m_SamplingScale: 1
m_TransitionFilter: 3
m_TransitionRate: 0.408
m_TransitionReverse: 1
m_TransitionTex: {fileID: 2800000, guid: 5a9e7b253d8344331a9ef15185eaa629, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionTexSpeed: {x: 0, y: 0}
m_TransitionRotation: 0
m_TransitionKeepAspectRatio: 0
m_TransitionWidth: 0.127
m_TransitionSoftness: 0.75
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
@@ -748,8 +892,59 @@ MonoBehaviour:
m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1
m_ShadowFade: 0.9
m_ShadowEffectOnOrigin: 0
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
m_CustomRoot: {fileID: 0}
--- !u!114 &1567169364
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -788,3 +983,10 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1567169361}
m_CullTransparentMesh: 1
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 134336679}
- {fileID: 973375179}
- {fileID: 986199155}
@@ -38,7 +38,6 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481676, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -123,100 +122,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &14369288
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 14369290}
- component: {fileID: 14369289}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &14369289
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 14369288}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &14369290
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 14369288}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &62321280
GameObject:
m_ObjectHideFlags: 0
@@ -449,7 +354,6 @@ GameObject:
m_Component:
- component: {fileID: 233980239}
- component: {fileID: 233980238}
- component: {fileID: 233980237}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -457,14 +361,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &233980237
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 233980236}
m_Enabled: 1
--- !u!20 &233980238
Camera:
m_ObjectHideFlags: 0
@@ -474,7 +370,7 @@ Camera:
m_GameObject: {fileID: 233980236}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
@@ -1121,7 +1017,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &340416652
GameObject:
@@ -4062,9 +3958,10 @@ GameObject:
- component: {fileID: 1272959863}
- component: {fileID: 1272959862}
- component: {fileID: 1272959861}
- component: {fileID: 1272959864}
- component: {fileID: 1272959860}
m_Layer: 5
m_Name: TITLE
m_Name: HEADER
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -4083,7 +3980,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1463958372}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -4167,6 +4064,21 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1272959858}
m_CullTransparentMesh: 0
--- !u!114 &1272959864
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1272959858}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1
--- !u!1 &1305810386
GameObject:
m_ObjectHideFlags: 0
@@ -4541,7 +4453,7 @@ MonoBehaviour:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1280, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
@@ -4566,6 +4478,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 1
m_SortingLayerID: 0
m_SortingOrder: 0
@@ -4582,8 +4495,8 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1907633122}
- {fileID: 1272959859}
- {fileID: 1907633122}
- {fileID: 2119265467}
m_Father: {fileID: 0}
m_RootOrder: 2
@@ -5523,6 +5436,7 @@ MonoBehaviour:
m_Duration: 1
m_Interval: 0.5
m_PlayOnEnable: 1
m_ResetTimeOnEnable: 1
m_WrapMode: 1
m_UpdateMode: 0
m_OnComplete:
@@ -5549,6 +5463,7 @@ MonoBehaviour:
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.5
m_SamplingWidth: 1
m_SamplingScale: 1
m_TransitionFilter: 3
m_TransitionRate: 0
@@ -5560,9 +5475,14 @@ MonoBehaviour:
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.2
m_TransitionSoftness: 0.5
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
@@ -5582,6 +5502,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -5615,6 +5537,14 @@ MonoBehaviour:
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
--- !u!114 &1907633120
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -5666,7 +5596,7 @@ RectTransform:
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 1463958372}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}

Some files were not shown because too many files have changed in this diff Show More