Compare commits

..

83 Commits

Author SHA1 Message Date
mob-sakai 321a47b4d3 release 2018-06-07 21:28:27 +09:00
mob-sakai a03b6fdf2c update change log 2018-06-07 21:28:26 +09:00
mob-sakai 7e04e08bb3 Update readme 2018-06-07 21:26:36 +09:00
mob-sakai 844d6b2d71 fix #85; When UIEFFECT_SEPARATE symbol is defined, UIDissolve does not work well 2018-06-07 21:26:02 +09:00
Takashi Sakai e7ce12353b Update README.md 2018-06-06 00:21:27 +09:00
mob-sakai 4a5557185d Update readme 2018-06-01 10:59:02 +09:00
mob-sakai 7f42441d76 release 2018-05-31 20:04:13 +09:00
mob-sakai 58c668769c update change log 2018-05-31 20:04:13 +09:00
mob-sakai d35167fc96 Fix #82; Fix demo 2018-05-31 20:02:42 +09:00
mob-sakai 949bfbf7ab Fix scene path 2018-05-31 18:53:41 +09:00
mob-sakai 95182bf539 Fix readme link 2018-05-31 18:21:21 +09:00
mob-sakai 9934287b2f update release script 2018-05-31 18:17:40 +09:00
mob-sakai 0967940528 release 2018-05-31 18:13:17 +09:00
mob-sakai e502cb48b1 update change log 2018-05-31 18:13:17 +09:00
mob-sakai 0442702395 update release script 2018-05-31 18:11:48 +09:00
mob-sakai cda11cc638 Update demo 2018-05-31 18:04:11 +09:00
mob-sakai 813b0f4454 close #81; UIDissolve: Play effect from script/inspector 2018-05-31 18:01:51 +09:00
mob-sakai b1588400d5 close #80; UIShiny: Play effect from script/inspector 2018-05-31 18:01:51 +09:00
mob-sakai b383492d79 Add material bundle generator for export package 2018-05-31 15:42:23 +09:00
mob-sakai 156049cc07 Update readme 2018-05-31 15:29:22 +09:00
mob-sakai bdd455ba56 close #56; Change directory structure 2018-05-31 14:28:28 +09:00
mob-sakai 81d64e414d Clean up demo 2018-05-31 14:14:21 +09:00
mob-sakai 9b727a9542 Update readme 2018-05-31 13:14:28 +09:00
mob-sakai eec29bb7e3 Update demo 2018-05-30 16:41:45 +09:00
mob-sakai 538fe5de67 fix #79; UIDissolve: When width=1 and location=0, image is lacked 2018-05-30 16:13:32 +09:00
mob-sakai 578b93af95 Fixed: color effect is not applied on shadow 2018-05-30 13:04:04 +09:00
mob-sakai 1a251ecada Update demo 2018-05-30 09:06:58 +09:00
mob-sakai 882e19aea0 close #60; Add Custom effect as other component 2018-05-30 09:06:58 +09:00
mob-sakai 65e36cfe80 close #74; UIEffect inherit UIEffectBase 2018-05-30 09:06:57 +09:00
mob-sakai caccf19e00 close #73; During play mode, you can change the effect type, color type, and blur type (in Editor) 2018-05-29 23:34:43 +09:00
mob-sakai caff7bd005 update release script 2018-05-29 22:59:24 +09:00
mob-sakai 9073d31634 close #72: Add shadow effect component 2018-05-29 22:57:58 +09:00
mob-sakai 7b3314ff57 Update demo 2018-05-29 22:39:00 +09:00
mob-sakai 1d0e92c8e7 close #68: UIShiny : Visual update 2018-05-29 22:38:15 +09:00
mob-sakai 23b4bac85b update project files 2018-05-29 19:17:56 +09:00
mob-sakai ef89675c6b release 2018-05-29 18:32:32 +09:00
mob-sakai ee7c799ea6 update change log 2018-05-29 18:32:32 +09:00
mob-sakai 0570c22385 update release script 2018-05-29 18:31:12 +09:00
mob-sakai 7112636409 fix #69 : UIEffectCapturedImage: The result image is flipped vertically 2018-05-29 18:31:12 +09:00
Takashi Sakai db8839f3e0 release v2.4.0 2018-05-21 16:45:32 +09:00
Takashi Sakai 3aa186aeaf update change log 2018-05-21 16:45:32 +09:00
Takashi Sakai 237dab7639 Update readme 2018-05-21 16:02:21 +09:00
Takashi Sakai 45520d98c5 Update demo for v.2.4.0 2018-05-21 16:02:21 +09:00
Takashi Sakai 9e830f61f0 Remove shader keyword in material 2018-05-21 16:02:21 +09:00
Takashi Sakai ed9a68c1fa Resolved #64 : UIDissolve: Add color mode option. 2018-05-21 15:23:05 +09:00
Takashi Sakai 772297abd0 release v2.3.2 2018-05-21 15:13:20 +09:00
Takashi Sakai b4cb57e097 update change log 2018-05-21 15:13:19 +09:00
Takashi Sakai 923f74d047 Update release script (use 5.5.0p4 to export package) 2018-05-21 15:09:56 +09:00
Takashi Sakai be90296be7 Add UNITY_STANDALONE_WIN symbol 2018-05-19 13:48:31 +09:00
Takashi Sakai e6027fbec2 Fixed #65 : UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (other method) 2018-05-19 13:23:29 +09:00
Takashi Sakai 72e2149f70 Revert "Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (on Windows) #62"
This reverts commit 9d911eb581.
2018-05-19 12:12:43 +09:00
Takashi Sakai 8490d11762 Update README.md 2018-05-11 20:39:13 +09:00
Takashi Sakai ed3fce5fa5 release v2.3.1 2018-05-10 12:44:18 +09:00
Takashi Sakai 4bbe569248 update change log 2018-05-10 12:44:18 +09:00
Takashi Sakai 9d911eb581 Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (on Windows) #62 2018-05-10 12:34:39 +09:00
Takashi Sakai bc87c42cdd Remove docs dir 2018-05-08 21:19:12 +09:00
Takashi Sakai 972235ec44 Update readme 2018-05-08 21:10:44 +09:00
Takashi Sakai e4fa6aff30 release v2.3.0 2018-05-08 20:45:21 +09:00
Takashi Sakai b80ff1498e update change log 2018-05-08 20:45:20 +09:00
Takashi Sakai ea83602102 Update release script 2018-05-08 20:43:54 +09:00
Takashi Sakai df5f723e11 Upload demo to github pages 2018-05-07 14:31:54 +09:00
Takashi Sakai 32293858bf Update demo 2018-05-07 14:31:53 +09:00
Takashi Sakai e7bec9849b Update readme 2018-05-07 14:31:52 +09:00
Takashi Sakai 8ae051b7b2 Feature: Flip horizontal/vertical #47 2018-05-07 14:31:52 +09:00
Takashi Sakai bb300bef59 update release script 2018-04-24 13:14:34 +09:00
Takashi Sakai 30884fd349 [WIP]Feature: Dissolve 2018-04-23 21:45:08 +09:00
Takashi Sakai f477f1174a Feature: Shining effect #9 2018-04-20 19:58:42 +09:00
Takashi Sakai aaf79b76a9 release v2.2.0 2018-04-12 09:13:00 +09:00
Takashi Sakai 2c8b994aa0 update change log 2018-04-12 09:12:59 +09:00
Takashi Sakai 49c3855c49 Change: Reduce the pixelation effect when tone level = 1. #57 2018-04-12 09:01:02 +09:00
Takashi Sakai 537784c0f3 Update release script 2018-04-12 08:25:46 +09:00
Takashi Sakai bf8b4833fd Update README 2018-04-12 08:25:46 +09:00
Takashi Sakai c78bc86cf1 Refactor: Add shader struct 2018-04-12 08:25:46 +09:00
Takashi Sakai 0ad6bd7693 Fixed: Color effect on shadow is incorrect. #55 2018-04-12 08:25:46 +09:00
Takashi Sakai 3fda891b35 Feature: Customize shader/material. #46 2018-04-12 08:25:45 +09:00
Takashi Sakai efefad1a73 Feature: UIEffectCapturedImage supports keep canvas size. #54 2018-04-12 08:25:45 +09:00
Takashi Sakai 1e9cea00cb Feature: UIEffectCapturedImage supports Quality Type to easy setup. #53 2018-04-12 08:25:45 +09:00
Takashi Sakai f17183d1b0 release v2.1.0 2018-04-04 21:05:27 +09:00
Takashi Sakai 7d699f08db update change log 2018-04-04 21:05:27 +09:00
Takashi Sakai db98e1f0ce Add release script for Github 2018-04-04 21:04:21 +09:00
Takashi Sakai eaa78e2bb4 Feature: UIEffectCapturedImage support iterative operation. 2018-04-04 20:49:35 +09:00
Takashi Sakai 068783767a Change to symbolic 2018-04-03 18:53:30 +09:00
Takashi Sakai fe18d0f82f Delete files 2018-04-03 18:51:10 +09:00
111 changed files with 31083 additions and 8194 deletions
+3
View File
@@ -0,0 +1,3 @@
issues-wo-labels=false
pr-wo-labels=false
exclude_labels=duplicate,question,invalid,wontfix,Duplicate,Question,Invalid,Wontfix,Meta: Exclude From Changelog
+4
View File
@@ -30,3 +30,7 @@ sysinfo.txt
# Builds
*.apk
# Packages
*.unitypackage
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b3793e133930146e397ceaa2825b0e59
folderAsset: yes
timeCreated: 1527743850
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ec120f87945eb495c9eaed9dddf97997
folderAsset: yes
timeCreated: 1527743870
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+1
View File
@@ -0,0 +1 @@
./../../../../CHANGELOG.md
@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: c5d9ba160f4f94fc7b37041671ac013d
timeCreated: 1488199687
guid: 1fe75f65a37454bf5aa2dab183b4305a
timeCreated: 1522651812
licenseType: Pro
NativeFormatImporter:
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,44 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
public class UIEffect_Demo : MonoBehaviour
{
[SerializeField] RectMask2D mask;
// Use this for initialization
void Start()
{
if (mask)
{
mask.enabled = true;
}
}
public void SetTimeScale(float scale)
{
Time.timeScale = scale;
}
public void Open(Animator anim)
{
anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
anim.gameObject.SetActive(true);
anim.SetTrigger("Open");
}
public void Close(Animator anim)
{
anim.SetTrigger("Close");
}
public void Capture(Animator anim)
{
anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
anim.SetTrigger("Capture");
}
}
}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 89691001b43234d4db48a9fab0f1260a
timeCreated: 1502937469
guid: e94f1a0bc56a14944aadc5064f5f485a
timeCreated: 1525599611
licenseType: Pro
MonoImporter:
serializedVersion: 2
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 67e572a00c48842ae88b291d09d41b72
timeCreated: 1488188288
timeCreated: 1527674400
licenseType: Pro
DefaultImporter:
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@@ -0,0 +1,100 @@
fileFormatVersion: 2
guid: 660f666739adc442dacb957af200c2f1
timeCreated: 1527673509
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: iPhone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
@@ -19,16 +19,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 2
outSlope: 2
tangentMode: 10
- time: 0.5
tangentMode: 34
- serializedVersion: 2
time: 0.5
value: 1
inSlope: 2
outSlope: 2
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -39,16 +41,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 0.5
tangentMode: 103
- serializedVersion: 2
time: 0.5
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -101,16 +105,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 2
outSlope: 2
tangentMode: 10
- time: 0.5
tangentMode: 34
- serializedVersion: 2
time: 0.5
value: 1
inSlope: 2
outSlope: 2
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -121,16 +127,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 0.5
tangentMode: 103
- serializedVersion: 2
time: 0.5
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -142,14 +150,8 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events:
- time: 0
functionName: CaptureBackground
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
m_IsEmpty: 0
m_Events: []
--- !u!1102 &-1537770706
AnimatorState:
serializedVersion: 5
@@ -192,16 +194,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: -2
outSlope: -2
tangentMode: 10
- time: 0.5
tangentMode: 34
- serializedVersion: 2
time: 0.5
value: 0
inSlope: -2
outSlope: -2
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -248,16 +252,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: -2
outSlope: -2
tangentMode: 10
- time: 0.5
tangentMode: 34
- serializedVersion: 2
time: 0.5
value: 0
inSlope: -2
outSlope: -2
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -269,6 +275,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!74 &7450624
AnimationClip:
@@ -289,22 +296,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -355,22 +366,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -386,6 +401,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!74 &7451788
AnimationClip:
@@ -451,6 +467,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!74 &7487404
AnimationClip:
@@ -471,11 +488,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -486,11 +504,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -543,11 +562,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -558,11 +578,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -574,20 +595,14 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events:
- time: 0
functionName: Closed
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
m_IsEmpty: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Dialog
m_Name: UIEffect_Demo_Dialog
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Open
@@ -0,0 +1,966 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-1353081132
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0.41666666
tangentMode: 69
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: Infinity
tangentMode: 97
- serializedVersion: 2
time: 1.3
value: 0
inSlope: Infinity
outSlope: 0
tangentMode: 7
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0.4545454
outSlope: 0
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: f19b7e2285c104f6ca47d583f3e5444f, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0.41666666
tangentMode: 69
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: Infinity
tangentMode: 97
- serializedVersion: 2
time: 1.3
value: 0
inSlope: Infinity
outSlope: 0
tangentMode: 7
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0.4545454
outSlope: 0
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 1.2
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 2.4
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Veritical
path:
classID: 114
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: -180
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 180
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Rotation
path:
classID: 114
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Blur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path: Mask
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 2
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.x
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 2
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.y
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.4
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.4
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.9
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.9
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path: Pixel
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 0.6
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 1.8
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Horizontal
path:
classID: 114
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
m_PPtrCurves: []
m_SampleRate: 10
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 2830261733
script: {fileID: 11500000, guid: f19b7e2285c104f6ca47d583f3e5444f, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 2830261733
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 1301824207
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3746581727
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 595122796
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 1760254681
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 2148837408
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 3747441678
attribute: 2148837408
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 3309110367
attribute: 929876405
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 3309110367
attribute: 1080817955
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 3309110367
attribute: 1760254681
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 3195210534
attribute: 2148837408
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3652906371
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2.4
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0.41666666
tangentMode: 69
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: Infinity
tangentMode: 97
- serializedVersion: 2
time: 1.3
value: 0
inSlope: Infinity
outSlope: 0
tangentMode: 7
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0.4545454
outSlope: 0
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: f19b7e2285c104f6ca47d583f3e5444f, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0.41666666
tangentMode: 69
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: Infinity
tangentMode: 97
- serializedVersion: 2
time: 1.3
value: 0
inSlope: Infinity
outSlope: 0
tangentMode: 7
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0.4545454
outSlope: 0
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 1.2
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 2.4
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Veritical
path:
classID: 114
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: -180
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 180
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Rotation
path:
classID: 114
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Blur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path: Mask
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 2
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.x
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 2
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 6
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.y
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.4
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.4
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path: image
classID: 114
script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.9
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1.2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2.4
value: 0.9
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path: Pixel
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 0.6
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
- serializedVersion: 2
time: 1.8
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Horizontal
path:
classID: 114
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UIEffect_Demo_For Thumbnail
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110250372
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: -1353081132}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110250372}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110250372}
--- !u!1102 &558841200
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8dc667e117bb14b63a71d5ab6b83a2b5
guid: 6407849c9ce4141a9b34a33fbfef3d78
timeCreated: 1502936794
licenseType: Pro
NativeFormatImporter:

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

@@ -19,22 +19,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -49,16 +53,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: -180
inSlope: 0
outSlope: 180
tangentMode: 21
- time: 2
tangentMode: 69
- serializedVersion: 2
time: 2
value: 180
inSlope: 180
outSlope: 0
tangentMode: 21
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -69,16 +75,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
tangentMode: 103
- serializedVersion: 2
time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -86,6 +94,40 @@ AnimationClip:
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 3
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
@@ -112,6 +154,12 @@ AnimationClip:
classID: 114
customType: 24
isPPtrCurve: 0
- path: 0
attribute: 2830261733
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@@ -137,22 +185,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -167,16 +219,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: -180
inSlope: 0
outSlope: 180
tangentMode: 21
- time: 2
tangentMode: 69
- serializedVersion: 2
time: 2
value: 180
inSlope: 180
outSlope: 0
tangentMode: 21
tangentMode: 69
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -187,16 +241,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
tangentMode: 103
- serializedVersion: 2
time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -204,10 +260,45 @@ AnimationClip:
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
- serializedVersion: 2
time: 3
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Location
path:
classID: 114
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!1102 &-1537770706
AnimatorState:
@@ -251,22 +342,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -281,16 +376,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
tangentMode: 103
- serializedVersion: 2
time: 3
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -343,22 +440,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -373,16 +474,18 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
tangentMode: 103
- serializedVersion: 2
time: 3
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -394,6 +497,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events:
- time: 0
functionName: Capture
@@ -421,11 +525,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -472,11 +577,12 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
tangentMode: 103
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
@@ -488,6 +594,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!74 &7450624
AnimationClip:
@@ -508,22 +615,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -574,22 +685,26 @@ AnimationClip:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
- serializedVersion: 2
time: 3
value: 0
inSlope: 0
outSlope: 0
@@ -605,6 +720,7 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!74 &7451788
AnimationClip:
@@ -670,13 +786,14 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_IsEmpty: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Transition
m_Name: UIEffect_Demo_Transition
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Capture
@@ -684,13 +801,13 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Transition
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@@ -0,0 +1,100 @@
fileFormatVersion: 2
guid: 6789beb7377034038b701aa05106933d
timeCreated: 1523277470
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: iPhone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag: Demo_ShinyEffectForUGUI
userData:
assetBundleName:
assetBundleVariant:
+1
View File
@@ -0,0 +1 @@
./../../../../LICENSE.txt
@@ -0,0 +1,214 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21162286589123374
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Set
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: UI_COLOR_SET
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21841578701121694
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Sub
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: UI_COLOR_SUB
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21939717441729078
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Add
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: UI_COLOR_ADD
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: bc01d71324cc548bf958c751cbb0d693
timeCreated: 1488199687
licenseType: Pro
guid: 17b17d6effbe14075a3bbdf1fda1f6e1
timeCreated: 1526828325
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
@@ -0,0 +1,49 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Shiny
m_Shader: {fileID: 4800000, guid: 20ffe76c2439c403aabdd25bd94bf011, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 151a521e1127048568ae9c062c53bd05
timeCreated: 1488199687
guid: 9dc7e810a87b444ab96919f3215c2fe5
timeCreated: 1523859834
licenseType: Pro
NativeFormatImporter:
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,100 @@
fileFormatVersion: 2
guid: 3e04c247fb2604af186173fce0bc62de
timeCreated: 1524468976
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: 1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 10
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 256
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 256
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: iPhone
maxTextureSize: 256
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 256
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 256
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
+1
View File
@@ -0,0 +1 @@
./../../../../README.md
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a75d49073646347b1955a9f9df36cc45
folderAsset: yes
timeCreated: 1527743733
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,81 @@
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffect editor.
/// </summary>
[CustomEditor(typeof(UICustomEffect))]
[CanEditMultipleObjects]
public class UICustomEffectEditor : Editor
{
//################################
// Private Members.
//################################
SerializedProperty spCustomFactor1X;
SerializedProperty spCustomFactor1Y;
SerializedProperty spCustomFactor1Z;
SerializedProperty spCustomFactor1W;
SerializedProperty spCustomFactor2X;
SerializedProperty spCustomFactor2Y;
SerializedProperty spCustomFactor2Z;
SerializedProperty spCustomFactor2W;
SerializedProperty _spEffectMaterial;
void OnEnable()
{
var spCustomFactor1 = serializedObject.FindProperty("m_CustomFactor1");
spCustomFactor1X = spCustomFactor1.FindPropertyRelative("x");
spCustomFactor1Y = spCustomFactor1.FindPropertyRelative("y");
spCustomFactor1Z = spCustomFactor1.FindPropertyRelative("z");
spCustomFactor1W = spCustomFactor1.FindPropertyRelative("w");
var spCustomFactor2 = serializedObject.FindProperty("m_CustomFactor2");
spCustomFactor2X = spCustomFactor2.FindPropertyRelative("x");
spCustomFactor2Y = spCustomFactor2.FindPropertyRelative("y");
spCustomFactor2Z = spCustomFactor2.FindPropertyRelative("z");
spCustomFactor2W = spCustomFactor2.FindPropertyRelative("w");
_spEffectMaterial = serializedObject.FindProperty("m_EffectMaterial");
}
/// <summary>
/// Implement this function to make a custom inspector.
/// </summary>
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_spEffectMaterial);
EditorGUILayout.Slider(spCustomFactor1X, 0, 1, "CustomFactor1.X");
EditorGUILayout.Slider(spCustomFactor1Y, 0, 1, "CustomFactor1.Y");
EditorGUILayout.Slider(spCustomFactor1Z, 0, 1, "CustomFactor1.Z");
EditorGUILayout.Slider(spCustomFactor1W, 0, 1, "CustomFactor1.W");
EditorGUILayout.Slider(spCustomFactor2X, 0, 1, "CustomFactor2.X");
EditorGUILayout.Slider(spCustomFactor2Y, 0, 1, "CustomFactor2.Y");
EditorGUILayout.Slider(spCustomFactor2Z, 0, 1, "CustomFactor2.Z");
EditorGUILayout.Slider(spCustomFactor2W, 0, 1, "CustomFactor2.W");
serializedObject.ApplyModifiedProperties();
#if UNITY_5_6_OR_NEWER
var graphic = (target as UIEffectBase).targetGraphic;
if(graphic)
{
var canvas = graphic.canvas;
if( canvas && 0 == (canvas.additionalShaderChannels & AdditionalCanvasShaderChannels.TexCoord1))
{
using (new GUILayout.HorizontalScope())
{
EditorGUILayout.HelpBox("[Unity5.6+] Enable TexCoord1 of Canvas.additionalShaderChannels to use UICustomEffect.", MessageType.Warning);
if (GUILayout.Button("Fix"))
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
}
}
}
#endif
}
}
}
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: e81974d221f13d246b4d1ae292e3181a
timeCreated: 1515082276
licenseType: Free
guid: a4961e148a8cd4fe0b84dddc2741894a
timeCreated: 1487152293
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
@@ -0,0 +1,184 @@
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
using DesamplingRate = Coffee.UIExtensions.UIEffectCapturedImage.DesamplingRate;
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffectCapturedImage editor.
/// </summary>
[CustomEditor(typeof(UIEffectCapturedImage))]
[CanEditMultipleObjects]
public class UIEffectCapturedImageEditor : RawImageEditor
{
//################################
// Constant or Static Members.
//################################
public enum QualityMode : int
{
Fast = (DesamplingRate.x2 << 0) + (DesamplingRate.x2 << 4) + (FilterMode.Bilinear << 8) + (1 << 10),
Medium = (DesamplingRate.x1 << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (1 << 10),
Detail = (DesamplingRate.None << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (1 << 10),
Custom = -1,
}
//################################
// Public/Protected Members.
//################################
/// <summary>
/// This function is called when the object becomes enabled and active.
/// </summary>
protected override void OnEnable()
{
base.OnEnable();
_spTexture = serializedObject.FindProperty("m_Texture");
_spColor = serializedObject.FindProperty("m_Color");
_spRaycastTarget = serializedObject.FindProperty("m_RaycastTarget");
_spDesamplingRate = serializedObject.FindProperty("m_DesamplingRate");
_spReductionRate = serializedObject.FindProperty("m_ReductionRate");
_spFilterMode = serializedObject.FindProperty("m_FilterMode");
_spIterations = serializedObject.FindProperty("m_Iterations");
_spKeepSizeToRootCanvas = serializedObject.FindProperty("m_KeepCanvasSize");
_customAdvancedOption = (qualityMode == QualityMode.Custom);
}
/// <summary>
/// Implement this function to make a custom inspector.
/// </summary>
public override void OnInspectorGUI()
{
serializedObject.Update();
//================
// Basic properties.
//================
EditorGUILayout.PropertyField(_spTexture);
EditorGUILayout.PropertyField(_spColor);
EditorGUILayout.PropertyField(_spRaycastTarget);
//================
// Capture effect.
//================
GUILayout.Space(10);
EditorGUILayout.LabelField("Capture Effect", EditorStyles.boldLabel);
UIEffectEditor.DrawEffectProperties(UIEffectCapturedImage.shaderName, serializedObject);
//================
// Advanced option.
//================
GUILayout.Space(10);
EditorGUILayout.LabelField("Advanced Option", EditorStyles.boldLabel);
EditorGUI.BeginChangeCheck();
QualityMode quality = qualityMode;
quality = (QualityMode)EditorGUILayout.EnumPopup("Quality Mode", quality);
if(EditorGUI.EndChangeCheck())
{
_customAdvancedOption = (quality == QualityMode.Custom);
qualityMode = quality;
}
// When qualityMode is `Custom`, show advanced option.
if (_customAdvancedOption)
{
DrawDesamplingRate(_spDesamplingRate);// Desampling rate.
DrawDesamplingRate(_spReductionRate);// Reduction rate.
EditorGUILayout.PropertyField(_spFilterMode);// Filter Mode.
EditorGUILayout.PropertyField(_spIterations);// Iterations.
}
EditorGUILayout.PropertyField(_spKeepSizeToRootCanvas);// Iterations.
serializedObject.ApplyModifiedProperties();
// Debug.
using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox))
{
GUILayout.Label("Debug");
if (GUILayout.Button("Capture", "ButtonLeft"))
UpdateTexture(true);
EditorGUI.BeginDisabledGroup(!(target as UIEffectCapturedImage).capturedTexture);
if (GUILayout.Button("Release", "ButtonRight"))
UpdateTexture(false);
EditorGUI.EndDisabledGroup();
}
}
//################################
// Private Members.
//################################
const int Bits4 = (1 << 4) - 1;
const int Bits2 = (1 << 2) - 1;
bool _customAdvancedOption = false;
SerializedProperty _spTexture;
SerializedProperty _spColor;
SerializedProperty _spRaycastTarget;
SerializedProperty _spDesamplingRate;
SerializedProperty _spReductionRate;
SerializedProperty _spFilterMode;
SerializedProperty _spIterations;
SerializedProperty _spKeepSizeToRootCanvas;
QualityMode qualityMode
{
get
{
if (_customAdvancedOption)
return QualityMode.Custom;
int qualityValue = (_spDesamplingRate.intValue << 0)
+ (_spReductionRate.intValue << 4)
+ (_spFilterMode.intValue << 8)
+ (_spIterations.intValue << 10);
return System.Enum.IsDefined(typeof(QualityMode), qualityValue) ? (QualityMode)qualityValue : QualityMode.Custom;
}
set
{
if (value != QualityMode.Custom)
{
int qualityValue = (int)value;
_spDesamplingRate.intValue = (qualityValue >> 0) & Bits4;
_spReductionRate.intValue = (qualityValue >> 4) & Bits4;
_spFilterMode.intValue = (qualityValue >> 8) & Bits2;
_spIterations.intValue = (qualityValue >> 10) & Bits4;
}
}
}
/// <summary>
/// Draws the desampling rate.
/// </summary>
void DrawDesamplingRate(SerializedProperty sp)
{
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.PropertyField(sp);
int w, h;
(target as UIEffectCapturedImage).GetDesamplingSize((UIEffectCapturedImage.DesamplingRate)sp.intValue, out w, out h);
GUILayout.Label(string.Format("{0}x{1}", w, h), EditorStyles.miniLabel);
}
}
/// <summary>
/// Updates the texture.
/// </summary>
void UpdateTexture(bool capture)
{
var current = target as UIEffectCapturedImage;
bool enable = current.enabled;
current.enabled = false;
current.Release();
if (capture)
current.Capture();
EditorApplication.delayCall += () => current.enabled = enable;
}
}
}
@@ -11,12 +11,11 @@ namespace Coffee.UIExtensions
[CanEditMultipleObjects]
public class UIEffectEditor : Editor
{
ReorderableList roAdditionalShadows;
SerializedProperty spAdditionalShadows;
SerializedProperty spBlurMode;
//################################
// Constant or Static Members.
//################################
/// <summary>
/// Implement this function to make a custom inspector.
/// Draw effect properties.
/// </summary>
public static void DrawEffectProperties(string shaderName, SerializedObject serializedObject)
{
@@ -93,23 +92,46 @@ namespace Coffee.UIExtensions
}
}
//################################
// Private Members.
//################################
ReorderableList _roAdditionalShadows;
SerializedProperty _spAdditionalShadows;
SerializedProperty _spBlurMode;
SerializedProperty _spCustomEffect;
SerializedProperty _spEffectMaterial;
SerializedProperty _spEffectColor;
SerializedProperty _spCustomFactorX;
SerializedProperty _spCustomFactorY;
SerializedProperty _spCustomFactorZ;
SerializedProperty _spCustomFactorW;
void OnEnable()
{
spAdditionalShadows = serializedObject.FindProperty("m_AdditionalShadows");
spBlurMode = serializedObject.FindProperty("m_BlurMode");
_spAdditionalShadows = serializedObject.FindProperty("m_AdditionalShadows");
_spBlurMode = serializedObject.FindProperty("m_BlurMode");
_spEffectColor = serializedObject.FindProperty("m_EffectColor");
roAdditionalShadows = new ReorderableList(serializedObject, spAdditionalShadows, true, true, true, true);
roAdditionalShadows.drawElementCallback = DrawElementCallback;
roAdditionalShadows.drawHeaderCallback = (rect) => EditorGUI.LabelField(rect, "Additional Shadows");
roAdditionalShadows.onAddCallback = OnAddCallback;
roAdditionalShadows.elementHeightCallback = ElementHeightCallback;
_spCustomEffect = serializedObject.FindProperty("m_CustomEffect");
_spEffectMaterial = serializedObject.FindProperty("m_EffectMaterial");
var spFactor = serializedObject.FindProperty("m_CustomFactor");
_spCustomFactorX = spFactor.FindPropertyRelative("x");
_spCustomFactorY = spFactor.FindPropertyRelative("y");
_spCustomFactorZ = spFactor.FindPropertyRelative("z");
_spCustomFactorW = spFactor.FindPropertyRelative("w");
_roAdditionalShadows = new ReorderableList(serializedObject, _spAdditionalShadows, true, true, true, true);
_roAdditionalShadows.drawElementCallback = DrawElementCallback;
_roAdditionalShadows.drawHeaderCallback = (rect) => EditorGUI.LabelField(rect, "Additional Shadows");
_roAdditionalShadows.onAddCallback = OnAddCallback;
_roAdditionalShadows.elementHeightCallback = ElementHeightCallback;
}
void OnAddCallback(ReorderableList ro)
{
spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
var element = spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
_spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
var element = _spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
element.FindPropertyRelative("shadowMode").intValue = (int)UIEffect.ShadowStyle.Shadow;
element.FindPropertyRelative("shadowColor").colorValue = Color.black;
element.FindPropertyRelative("effectDistance").vector2Value = new Vector2(1f, -1f);
@@ -119,11 +141,11 @@ namespace Coffee.UIExtensions
float ElementHeightCallback(int index)
{
var element = spAdditionalShadows.GetArrayElementAtIndex(index);
var element = _spAdditionalShadows.GetArrayElementAtIndex(index);
if (element.FindPropertyRelative("shadowMode").intValue == (int)UIEffect.ShadowStyle.None)
return 16;
return (spBlurMode.intValue == (int)UIEffect.BlurMode.None ? 66 : 84) + (EditorGUIUtility.wideMode ? 0 : 18);
return (_spBlurMode.intValue == (int)UIEffect.BlurMode.None ? 66 : 84) + (EditorGUIUtility.wideMode ? 0 : 18);
}
/// <summary>
@@ -131,7 +153,7 @@ namespace Coffee.UIExtensions
/// </summary>
void DrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
{
var sp = roAdditionalShadows.serializedProperty.GetArrayElementAtIndex(index);
var sp = _roAdditionalShadows.serializedProperty.GetArrayElementAtIndex(index);
Rect r = new Rect(rect);
r.height = EditorGUIUtility.singleLineHeight;
@@ -147,7 +169,7 @@ namespace Coffee.UIExtensions
r.y += EditorGUIUtility.wideMode ? r.height : r.height * 2;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("useGraphicAlpha"));
if (spBlurMode.intValue != (int)UIEffect.BlurMode.None)
if (_spBlurMode.intValue != (int)UIEffect.BlurMode.None)
{
r.y += r.height;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("shadowBlur"));
@@ -160,7 +182,25 @@ namespace Coffee.UIExtensions
public override void OnInspectorGUI()
{
serializedObject.Update();
DrawEffectProperties(UIEffect.shaderName, serializedObject);
// Custom effect.
EditorGUILayout.PropertyField(_spCustomEffect);
if(_spCustomEffect.boolValue)
{
EditorGUILayout.PropertyField(_spEffectMaterial);
EditorGUI.indentLevel++;
EditorGUILayout.Slider(_spCustomFactorX, 0, 1, new GUIContent("Effect Factor X"));
EditorGUILayout.Slider(_spCustomFactorY, 0, 1, new GUIContent("Effect Factor Y"));
EditorGUILayout.Slider(_spCustomFactorZ, 0, 1, new GUIContent("Effect Factor Z"));
EditorGUILayout.Slider(_spCustomFactorW, 0, 1, new GUIContent("Effect Factor W"));
EditorGUILayout.PropertyField(_spEffectColor);
EditorGUI.indentLevel--;
}
else
{
DrawEffectProperties(UIEffect.shaderName, serializedObject);
}
//================
// Shadow setting.
@@ -176,7 +216,7 @@ namespace Coffee.UIExtensions
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowColor"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_UseGraphicAlpha"));
if (spBlurMode.intValue != (int)UIEffect.BlurMode.None)
if (_spBlurMode.intValue != (int)UIEffect.BlurMode.None)
{
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowBlur"));
}
@@ -186,12 +226,12 @@ namespace Coffee.UIExtensions
//================
// Additional shadow setting.
//================
roAdditionalShadows.DoLayoutList();
_roAdditionalShadows.DoLayoutList();
serializedObject.ApplyModifiedProperties();
#if UNITY_5_6_OR_NEWER
var graphic = (target as UIEffect).graphic;
var graphic = (target as UIEffectBase).targetGraphic;
if(graphic)
{
var canvas = graphic.canvas;
@@ -0,0 +1,116 @@
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace Coffee.UIExtensions
{
/// <summary>
/// UIShadow editor.
/// </summary>
[CustomEditor(typeof(UIShadow))]
[CanEditMultipleObjects]
public class UIShadowEditor : Editor
{
ReorderableList roAdditionalShadows;
SerializedProperty spAdditionalShadows;
UIEffect uiEffect;
void OnEnable()
{
uiEffect = (target as UIShadow).GetComponent<UIEffect>();
spAdditionalShadows = serializedObject.FindProperty("m_AdditionalShadows");
roAdditionalShadows = new ReorderableList(serializedObject, spAdditionalShadows, true, true, true, true);
roAdditionalShadows.drawElementCallback = DrawElementCallback;
roAdditionalShadows.drawHeaderCallback = (rect) => EditorGUI.LabelField(rect, "Additional Shadows");
roAdditionalShadows.onAddCallback = OnAddCallback;
roAdditionalShadows.elementHeightCallback = ElementHeightCallback;
}
void OnAddCallback(ReorderableList ro)
{
spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
var element = spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
element.FindPropertyRelative("style").intValue = (int)UIShadow.ShadowStyle.Shadow;
element.FindPropertyRelative("effectColor").colorValue = Color.black;
element.FindPropertyRelative("effectDistance").vector2Value = new Vector2(1f, -1f);
element.FindPropertyRelative("useGraphicAlpha").boolValue = true;
element.FindPropertyRelative("blur").floatValue = 0.25f;
}
float ElementHeightCallback(int index)
{
var element = spAdditionalShadows.GetArrayElementAtIndex(index);
if (element.FindPropertyRelative("style").intValue == (int)UIShadow.ShadowStyle.None)
return 16;
return (uiEffect && uiEffect.blurMode != UIEffect.BlurMode.None ? 84 : 64) + (EditorGUIUtility.wideMode ? 0 : 18);
}
/// <summary>
///
/// </summary>
void DrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
{
var sp = roAdditionalShadows.serializedProperty.GetArrayElementAtIndex(index);
Rect r = new Rect(rect);
r.height = EditorGUIUtility.singleLineHeight;
var spMode = sp.FindPropertyRelative("style");
EditorGUI.PropertyField(r, spMode);
if (spMode.intValue == (int)UIShadow.ShadowStyle.None)
return;
r.y += r.height;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("effectColor"));
r.y += r.height;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("effectDistance"));
r.y += EditorGUIUtility.wideMode ? r.height : r.height * 2;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("useGraphicAlpha"));
if (uiEffect && uiEffect.blurMode != UIEffect.BlurMode.None)
{
r.y += r.height;
EditorGUI.PropertyField(r, sp.FindPropertyRelative("blur"));
}
}
/// <summary>
/// Implement this function to make a custom inspector.
/// </summary>
public override void OnInspectorGUI()
{
serializedObject.Update();
//================
// Shadow setting.
//================
var spShadowMode = serializedObject.FindProperty("m_Style");
EditorGUILayout.PropertyField(spShadowMode);
// When shadow is enable, show parameters.
if (spShadowMode.intValue != (int)UIShadow.ShadowStyle.None)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectDistance"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectColor"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_UseGraphicAlpha"));
if (uiEffect && uiEffect.blurMode != UIEffect.BlurMode.None)
{
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Blur"));
}
EditorGUI.indentLevel--;
}
//================
// Additional shadow setting.
//================
roAdditionalShadows.DoLayoutList();
serializedObject.ApplyModifiedProperties();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 6e76e7f628f09af449321b4776123f13
timeCreated: 1487152293
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
using UnityEngine;
namespace Coffee.UIExtensions
{
/// <summary>
/// Matrix2x3.
/// </summary>
struct Matrix2x3
{
public float m00, m01, m02, m10, m11, m12;
public Matrix2x3(Rect rect, float cos, float sin)
{
const float center = 0.5f;
float dx = -rect.xMin / rect.width - center;
float dy = -rect.yMin / rect.height - center;
m00 = cos / rect.width;
m01 = -sin / rect.height;
m02 = dx * cos - dy * sin + center;
m10 = sin / rect.width;
m11 = cos / rect.height;
m12 = dx * sin + dy * cos + center;
}
public static Vector2 operator*(Matrix2x3 m, Vector2 v)
{
return new Vector2(
(m.m00 * v.x) + (m.m01 * v.y) + m.m02,
(m.m10 * v.x) + (m.m11 * v.y) + m.m12
);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 5a9b962044ca64867b713425f7e5daab
timeCreated: 1527590245
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,51 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class Packer
{
/// <summary>
/// Pack 4 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 64 steps(6 bits).
/// </summary>
public static float ToFloat(float x, float y, float z, float w)
{
const int PRECISION = (1 << 6) - 1;
return (Mathf.FloorToInt(w * PRECISION) << 18)
+ (Mathf.FloorToInt(z * PRECISION) << 12)
+ (Mathf.FloorToInt(y * PRECISION) << 6)
+ Mathf.FloorToInt(x * PRECISION);
}
/// <summary>
/// Pack 4 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 64 steps(6 bits).
/// </summary>
public static float ToFloat(Vector4 factor)
{
return ToFloat(Mathf.Clamp01(factor.x), Mathf.Clamp01(factor.y), Mathf.Clamp01(factor.z), Mathf.Clamp01(factor.w));
}
/// <summary>
/// Pack 3 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 256 steps(8 bits).
/// </summary>
public static float ToFloat(float x, float y, float z)
{
const int PRECISION = (1 << 8) - 1;
return (Mathf.FloorToInt(z * PRECISION) << 16)
+ (Mathf.FloorToInt(y * PRECISION) << 8)
+ Mathf.FloorToInt(x * PRECISION);
}
/// <summary>
/// Pack 2 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 4096 steps(12 bits).
/// </summary>
public static float ToFloat(float x, float y)
{
const int PRECISION = (1 << 12) - 1;
return (Mathf.FloorToInt(y * PRECISION) << 12)
+ Mathf.FloorToInt(x * PRECISION);
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b4970b3a69d3b472b8d66c1d92ec7bad
timeCreated: 1527590285
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using UnityEditor;
#endif
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffect.
/// </summary>
[ExecuteInEditMode]
[RequireComponent(typeof(Graphic))]
[DisallowMultipleComponent]
public class UICustomEffect : UIEffectBase
{
//################################
// Serialize Members.
//################################
[SerializeField] Vector4 m_CustomFactor1 = new Vector4();
[SerializeField] Vector4 m_CustomFactor2 = new Vector4();
//################################
// Public Members.
//################################
/// <summary>
/// Custom effect factor 1.
/// </summary>
public Vector4 customFactor1 { get { return m_CustomFactor1; } set { m_CustomFactor1 = value; SetDirty(); } }
/// <summary>
/// Custom effect factor 2.
/// </summary>
public Vector4 customFactor2 { get { return m_CustomFactor2; } set { m_CustomFactor2 = value; SetDirty(); } }
// protected override void OnValidate()
// {
// base.OnValidate();
// Debug.Log("hog!");
// }
/// <summary>
/// Modifies the mesh.
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!isActiveAndEnabled)
{
return;
}
UIVertex vt;
vh.GetUIVertexStream(tempVerts);
//================================
// Effect modify original vertices.
//================================
{
// Pack some effect factors to 1 float.
Vector2 factor = new Vector2(
Packer.ToFloat(m_CustomFactor1),
Packer.ToFloat(m_CustomFactor2)
);
for (int i = 0; i < tempVerts.Count; i++)
{
vt = tempVerts[i];
// Set prameters to vertex.
vt.uv1 = factor;
tempVerts[i] = vt;
}
}
vh.Clear();
vh.AddUIVertexTriangleStream(tempVerts);
tempVerts.Clear();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 156b57fee6ef941958e66a129ce387e2
timeCreated: 1485321967
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,259 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using UnityEditor;
#endif
namespace Coffee.UIExtensions
{
/// <summary>
/// UIDissolve.
/// </summary>
[ExecuteInEditMode]
[DisallowMultipleComponent]
public class UIDissolve : BaseMeshEffect
#if UNITY_EDITOR
, ISerializationCallbackReceiver
#endif
{
//################################
// Constant or Static Members.
//################################
public const string shaderName = "UI/Hidden/UI-Effect-Dissolve";
//################################
// Serialize Members.
//################################
[SerializeField] [Range(0, 1)] float m_Location = 0.5f;
[SerializeField] [Range(0, 1)] float m_Width = 0.5f;
[SerializeField] [Range(0, 1)] float m_Softness = 0.5f;
[SerializeField] [ColorUsage(false)] Color m_Color = new Color(0.0f, 0.25f, 1.0f);
[SerializeField] UIEffect.ColorMode m_ColorMode = UIEffect.ColorMode.Add;
[SerializeField] Material m_EffectMaterial;
[Space]
[SerializeField] bool m_Play = false;
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
[SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal;
//################################
// Public Members.
//################################
/// <summary>
/// Graphic affected by the UIEffect.
/// </summary>
new public Graphic graphic { get { return base.graphic; } }
/// <summary>
/// Location for effect.
/// </summary>
public float location
{
get { return m_Location; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Location, value))
{
m_Location = value;
_SetDirty();
}
}
}
/// <summary>
/// Edge width.
/// </summary>
public float width
{
get { return m_Width; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Width, value))
{
m_Width = value;
_SetDirty();
}
}
}
/// <summary>
/// Edge softness.
/// </summary>
public float softness
{
get { return m_Softness; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Softness, value))
{
m_Softness = value;
_SetDirty();
}
}
}
/// <summary>
/// Edge color.
/// </summary>
public Color color
{
get { return m_Color; }
set
{
if (m_Color != value)
{
m_Color = value;
_SetDirty();
}
}
}
/// <summary>
/// Color effect mode.
/// </summary>
public UIEffect.ColorMode colorMode { get { return m_ColorMode; } }
/// <summary>
/// Effect material.
/// </summary>
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
/// <summary>
/// Play dissolve on enable.
/// </summary>
public bool play { get { return m_Play; } set { m_Play = value; } }
/// <summary>
/// Dissolve duration.
/// </summary>
public float duration { get { return m_Duration; } set { m_Duration = Mathf.Max(value, 0.1f); } }
/// <summary>
/// Dissolve update mode.
/// </summary>
public AnimatorUpdateMode updateMode { get { return m_UpdateMode; } set { m_UpdateMode = value; } }
/// <summary>
/// This function is called when the object becomes enabled and active.
/// </summary>
protected override void OnEnable()
{
_time = 0;
graphic.material = effectMaterial;
base.OnEnable();
}
/// <summary>
/// This function is called when the behaviour becomes disabled () or inactive.
/// </summary>
protected override void OnDisable()
{
graphic.material = null;
base.OnDisable();
}
#if UNITY_EDITOR
public void OnBeforeSerialize()
{
}
public void OnAfterDeserialize()
{
var obj = this;
EditorApplication.delayCall += () =>
{
if (Application.isPlaying || !obj || !obj.graphic)
return;
var mat = UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName), UIEffect.ToneMode.None, m_ColorMode, UIEffect.BlurMode.None);
if (m_EffectMaterial == mat && graphic.material == mat)
return;
graphic.material = m_EffectMaterial = mat;
EditorUtility.SetDirty(this);
EditorUtility.SetDirty(graphic);
EditorApplication.delayCall += AssetDatabase.SaveAssets;
};
}
#endif
/// <summary>
/// Modifies the mesh.
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!isActiveAndEnabled)
return;
// rect.
Rect rect = graphic.rectTransform.rect;
// Calculate vertex position.
UIVertex vertex = default(UIVertex);
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vertex, i);
var x = Mathf.Clamp01(vertex.position.x / rect.width + 0.5f);
var y = Mathf.Clamp01(vertex.position.y / rect.height + 0.5f);
vertex.uv1 = new Vector2(
Packer.ToFloat(x, y, location, m_Width),
Packer.ToFloat(m_Color.r, m_Color.g, m_Color.b, m_Softness)
);
vh.SetUIVertex(vertex, i);
}
}
/// <summary>
/// Play effect.
/// </summary>
public void Play()
{
_time = 0;
m_Play = true;
}
//################################
// Private Members.
//################################
float _time = 0;
void Update()
{
if (!m_Play || !Application.isPlaying)
{
return;
}
_time += m_UpdateMode == AnimatorUpdateMode.UnscaledTime
? Time.unscaledDeltaTime
: Time.deltaTime;
location = _time / m_Duration;
if (m_Duration <= _time)
{
m_Play = false;
_time = 0;
}
}
/// <summary>
/// Mark the UIEffect as dirty.
/// </summary>
void _SetDirty()
{
if (graphic)
graphic.SetVerticesDirty();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ce76b7a490bd74f34a2f2752641aea24
timeCreated: 1523859834
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -17,10 +17,7 @@ namespace Coffee.UIExtensions
[ExecuteInEditMode]
[RequireComponent(typeof(Graphic))]
[DisallowMultipleComponent]
public class UIEffect : BaseMeshEffect
#if UNITY_EDITOR
, ISerializationCallbackReceiver
#endif
public class UIEffect : UIEffectBase
{
/// <summary>
/// Additional shadow.
@@ -123,37 +120,40 @@ namespace Coffee.UIExtensions
[SerializeField] Vector2 m_EffectDistance = new Vector2(1f, -1f);
[SerializeField] bool m_UseGraphicAlpha = true;
[SerializeField] Color m_EffectColor = Color.white;
[SerializeField] Material m_EffectMaterial;
[SerializeField] List<AdditionalShadow> m_AdditionalShadows = new List<AdditionalShadow>();
[SerializeField] bool m_CustomEffect = false;
[SerializeField] Vector4 m_CustomFactor = new Vector4();
//################################
// Public Members.
//################################
/// <summary>
/// Graphic affected by the UIEffect.
/// </summary>
[System.Obsolete ("Use targetGraphic instead (UnityUpgradable) -> targetGraphic")]
new public Graphic graphic { get { return base.graphic; } }
/// <summary>
/// Tone effect level between 0(no effect) and 1(complete effect).
/// </summary>
public float toneLevel{ get { return m_ToneLevel; } set { m_ToneLevel = Mathf.Clamp(value, 0, 1); _SetDirty(); } }
public float toneLevel{ get { return m_ToneLevel; } set { m_ToneLevel = Mathf.Clamp(value, 0, 1); SetDirty(); } }
/// <summary>
/// How far is the blurring from the graphic.
/// </summary>
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 2); _SetDirty(); } }
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 1); SetDirty(); } }
/// <summary>
/// How far is the blurring shadow from the graphic.
/// </summary>
public float shadowBlur { get { return m_ShadowBlur; } set { m_ShadowBlur = Mathf.Clamp(value, 0, 2); _SetDirty(); } }
public float shadowBlur { get { return m_ShadowBlur; } set { m_ShadowBlur = Mathf.Clamp(value, 0, 1); SetDirty(); } }
/// <summary>
/// Shadow effect mode.
/// </summary>
public ShadowStyle shadowStyle { get { return m_ShadowStyle; } set { m_ShadowStyle = value; _SetDirty(); } }
public ShadowStyle shadowStyle { get { return m_ShadowStyle; } set { m_ShadowStyle = value; SetDirty(); } }
/// <summary>
/// Tone effect mode.
@@ -173,27 +173,22 @@ namespace Coffee.UIExtensions
/// <summary>
/// Color for the shadow effect.
/// </summary>
public Color shadowColor { get { return m_ShadowColor; } set { m_ShadowColor = value; _SetDirty(); } }
public Color shadowColor { get { return m_ShadowColor; } set { m_ShadowColor = value; SetDirty(); } }
/// <summary>
/// How far is the shadow from the graphic.
/// </summary>
public Vector2 effectDistance { get { return m_EffectDistance; } set { m_EffectDistance = value; _SetDirty(); } }
public Vector2 effectDistance { get { return m_EffectDistance; } set { m_EffectDistance = value; SetDirty(); } }
/// <summary>
/// Should the shadow inherit the alpha from the graphic?
/// </summary>
public bool useGraphicAlpha { get { return m_UseGraphicAlpha; } set { m_UseGraphicAlpha = value; _SetDirty(); } }
public bool useGraphicAlpha { get { return m_UseGraphicAlpha; } set { m_UseGraphicAlpha = value; SetDirty(); } }
/// <summary>
/// Color for the color effect.
/// </summary>
public Color effectColor { get { return m_EffectColor; } set { m_EffectColor = value; _SetDirty(); } }
/// <summary>
/// Effect material.
/// </summary>
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
public Color effectColor { get { return m_EffectColor; } set { m_EffectColor = value; SetDirty(); } }
/// <summary>
/// Additional Shadows.
@@ -201,22 +196,9 @@ namespace Coffee.UIExtensions
public List<AdditionalShadow> additionalShadows { get { return m_AdditionalShadows; } }
/// <summary>
/// This function is called when the object becomes enabled and active.
/// Custom effect factor.
/// </summary>
protected override void OnEnable()
{
graphic.material = effectMaterial;
base.OnEnable();
}
/// <summary>
/// This function is called when the behaviour becomes disabled () or inactive.
/// </summary>
protected override void OnDisable()
{
graphic.material = null;
base.OnDisable();
}
public Vector4 customFactor { get { return m_CustomFactor; } set { m_CustomFactor = value; SetDirty(); } }
/// <summary>
/// Modifies the mesh.
@@ -229,7 +211,7 @@ namespace Coffee.UIExtensions
}
UIVertex vt;
vh.GetUIVertexStream(s_Verts);
vh.GetUIVertexStream(tempVerts);
//================================
// Effect modify original vertices.
@@ -237,17 +219,17 @@ namespace Coffee.UIExtensions
{
// Pack some effect factors to 1 float.
Vector2 factor = new Vector2(
_PackToFloat(toneLevel, 0, blur, 0),
_PackToFloat(effectColor.r, effectColor.g, effectColor.b, effectColor.a)
);
m_CustomEffect ? Packer.ToFloat(m_CustomFactor) : Packer.ToFloat(toneLevel, 0, blur, 0),
Packer.ToFloat(effectColor.r, effectColor.g, effectColor.b, effectColor.a)
);
for (int i = 0; i < s_Verts.Count; i++)
for (int i = 0; i < tempVerts.Count; i++)
{
vt = s_Verts[i];
vt = tempVerts[i];
// Set UIEffect prameters to vertex.
vt.uv1 = factor;
s_Verts[i] = vt;
tempVerts[i] = vt;
}
}
@@ -255,7 +237,7 @@ namespace Coffee.UIExtensions
// Append shadow vertices.
//================================
{
var inputVertCount = s_Verts.Count;
var inputVertCount = tempVerts.Count;
var start = 0;
var end = inputVertCount;
@@ -263,56 +245,54 @@ namespace Coffee.UIExtensions
for (int i = additionalShadows.Count - 1; 0 <= i; i--)
{
AdditionalShadow shadow = additionalShadows[i];
_ApplyShadow(s_Verts, ref start, ref end, shadow.shadowMode, toneLevel, shadow.shadowBlur, shadow.effectDistance, shadow.shadowColor, shadow.useGraphicAlpha);
_ApplyShadow(tempVerts, ref start, ref end, shadow.shadowMode, toneLevel, shadow.shadowBlur, shadow.effectDistance, shadow.shadowColor, shadow.useGraphicAlpha);
}
// Shadow.
_ApplyShadow(s_Verts, ref start, ref end, shadowStyle, toneLevel, shadowBlur, effectDistance, shadowColor, useGraphicAlpha);
_ApplyShadow(tempVerts, ref start, ref end, shadowStyle, toneLevel, shadowBlur, effectDistance, shadowColor, useGraphicAlpha);
}
vh.Clear();
vh.AddUIVertexTriangleStream(s_Verts);
vh.AddUIVertexTriangleStream(tempVerts);
s_Verts.Clear();
tempVerts.Clear();
}
#if UNITY_EDITOR
public void OnBeforeSerialize()
protected override void OnValidate ()
{
base.OnValidate ();
EditorApplication.delayCall += () => UpdateMaterial(false);
}
public void OnAfterDeserialize()
public override void OnAfterDeserialize()
{
var obj = this;
EditorApplication.delayCall += () =>
if (!m_CustomEffect)
{
if (Application.isPlaying || !obj)
return;
EditorApplication.delayCall += () => UpdateMaterial (true);
}
}
var mat = (0 == toneMode) && (0 == colorMode) && (0 == blurMode)
? null
: GetOrGenerateMaterialVariant(Shader.Find(shaderName), toneMode, colorMode, blurMode);
void UpdateMaterial(bool onlyEditMode)
{
if(!this || onlyEditMode && Application.isPlaying)
{
return;
}
if(m_EffectMaterial == mat && graphic.material == mat)
return;
graphic.material = m_EffectMaterial = mat;
var mat = (0 == toneMode) && (0 == colorMode) && (0 == blurMode)
? null
: GetOrGenerateMaterialVariant(Shader.Find(shaderName), toneMode, colorMode, blurMode);
if (m_EffectMaterial != mat || targetGraphic.material != mat)
{
targetGraphic.material = m_EffectMaterial = mat;
EditorUtility.SetDirty(this);
EditorUtility.SetDirty(graphic);
EditorApplication.delayCall +=AssetDatabase.SaveAssets;
};
EditorUtility.SetDirty(targetGraphic);
}
}
public static Material GetMaterial(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
{
string variantName = GetVariantName(shader, tone, color, blur);
return AssetDatabase.FindAssets("t:Material " + Path.GetFileName(shader.name))
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
.OfType<Material>()
.FirstOrDefault(x => x.name == variantName);
}
public static Material GetOrGenerateMaterialVariant(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
@@ -360,13 +340,23 @@ namespace Coffee.UIExtensions
return mat;
}
public static Material GetMaterial(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
{
string variantName = GetVariantName(shader, tone, color, blur);
return AssetDatabase.FindAssets("t:Material " + Path.GetFileName(shader.name))
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
.OfType<Material>()
.FirstOrDefault(x => x.name == variantName);
}
public static string GetDefaultMaterialPath(Shader shader)
{
var name = Path.GetFileName (shader.name);
return AssetDatabase.FindAssets("t:Material " + name)
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x) == name)
?? ("Assets/UIEffect/Materials/" + name + ".mat");
?? ("Assets/Coffee/UIExtensions/UIEffect/Materials/" + name + ".mat");
}
public static string GetVariantName(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
@@ -386,50 +376,48 @@ namespace Coffee.UIExtensions
//################################
// Private Members.
//################################
static readonly List<UIVertex> s_Verts = new List<UIVertex>();
/// <summary>
/// Append shadow vertices.
/// * It is similar to Shadow component implementation.
/// </summary>
static void _ApplyShadow(List<UIVertex> verts, ref int start, ref int end, ShadowStyle mode, float toneLevel, float blur, Vector2 effectDistance, Color color, bool useGraphicAlpha)
void _ApplyShadow(List<UIVertex> verts, ref int start, ref int end, ShadowStyle mode, float toneLevel, float blur, Vector2 effectDistance, Color color, bool useGraphicAlpha)
{
if (ShadowStyle.None == mode)
return;
var factor = new Vector2(
_PackToFloat(toneLevel, 0, blur, 0),
_PackToFloat(color.r, color.g, color.b, 1)
);
Packer.ToFloat(toneLevel, 0, blur, 0),
Packer.ToFloat(color.r, color.g, color.b, 1)
);
// Append Shadow.
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
// Append Shadow3.
if (ShadowStyle.Shadow3 == mode)
{
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
}
// Append Outline.
else if (ShadowStyle.Outline == mode)
{
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
}
// Append Outline8.
else if (ShadowStyle.Outline8 == mode)
{
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, 0, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, -effectDistance.y, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
}
}
@@ -437,7 +425,7 @@ namespace Coffee.UIExtensions
/// Append shadow vertices.
/// * It is similar to Shadow component implementation.
/// </summary>
static void _ApplyShadowZeroAlloc(List<UIVertex> verts, ref int start, ref int end, float x, float y, Vector2 factor, Color color, bool useGraphicAlpha)
void _ApplyShadowZeroAlloc(List<UIVertex> verts, ref int start, ref int end, float x, float y, Vector2 factor, Color color, bool useGraphicAlpha)
{
// Check list capacity.
var neededCapacity = verts.Count + end - start;
@@ -456,6 +444,12 @@ namespace Coffee.UIExtensions
vt.position.Set(v.x + x, v.y + y, v.z);
Color vertColor = color;
if(colorMode != ColorMode.None)
{
vertColor.r = vertColor.g = vertColor.b = 1;
}
vertColor.a = useGraphicAlpha ? color.a * vt.color.a / 255 : color.a;
vt.color = vertColor;
@@ -468,27 +462,5 @@ namespace Coffee.UIExtensions
start = end;
end = verts.Count;
}
/// <summary>
/// Mark the UIEffect as dirty.
/// </summary>
void _SetDirty()
{
if(graphic)
graphic.SetVerticesDirty();
}
/// <summary>
/// Pack 4 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 64 steps(6 bits).
/// </summary>
static float _PackToFloat(float x, float y, float z, float w)
{
const int PRECISION = (1 << 6) - 1;
return (Mathf.FloorToInt(w * PRECISION) << 18)
+ (Mathf.FloorToInt(z * PRECISION) << 12)
+ (Mathf.FloorToInt(y * PRECISION) << 6)
+ Mathf.FloorToInt(x * PRECISION);
}
}
}
@@ -0,0 +1,75 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
/// <summary>
/// Abstract effect base for UI.
/// </summary>
[ExecuteInEditMode]
[RequireComponent(typeof(Graphic))]
[DisallowMultipleComponent]
public abstract class UIEffectBase : BaseMeshEffect, ISerializationCallbackReceiver
{
protected static readonly List<UIVertex> tempVerts = new List<UIVertex>();
[SerializeField] protected Material m_EffectMaterial;
/// <summary>
/// Gets target graphic for effect.
/// </summary>
public Graphic targetGraphic { get { return graphic; } }
/// <summary>
/// Gets material for effect.
/// </summary>
public Material effectMaterial { get { return m_EffectMaterial; } }
/// <summary>
/// Raises the before serialize event.
/// </summary>
public virtual void OnBeforeSerialize()
{
}
/// <summary>
/// Raises the after deserialize event.
/// </summary>
public virtual void OnAfterDeserialize()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.delayCall += () => targetGraphic.material = m_EffectMaterial;
#endif
}
/// <summary>
/// This function is called when the object becomes enabled and active.
/// </summary>
protected override void OnEnable()
{
targetGraphic.material = m_EffectMaterial;
base.OnEnable();
}
/// <summary>
/// This function is called when the behaviour becomes disabled () or inactive.
/// </summary>
protected override void OnDisable()
{
targetGraphic.material = null;
base.OnDisable();
}
/// <summary>
/// Mark the UIEffect as dirty.
/// </summary>
protected void SetDirty()
{
if (targetGraphic)
{
targetGraphic.SetVerticesDirty();
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e8b7ed62cf1444b4ebfc5e5338bc6682
timeCreated: 1485321967
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -53,6 +53,8 @@ namespace Coffee.UIExtensions
[SerializeField] DesamplingRate m_ReductionRate;
[SerializeField] FilterMode m_FilterMode = FilterMode.Bilinear;
[SerializeField] Material m_EffectMaterial;
[SerializeField][Range(1, 8)] int m_Iterations = 1;
[SerializeField] bool m_KeepCanvasSize = true;
//################################
@@ -112,6 +114,16 @@ namespace Coffee.UIExtensions
/// Captured texture.
/// </summary>
public RenderTexture capturedTexture { get { return _rt; } }
/// <summary>
/// Iterations.
/// </summary>
public int iterations { get { return m_Iterations; } set { m_Iterations = value; } }
/// <summary>
/// Fits graphic size to the root canvas.
/// </summary>
public bool keepCanvasSize { get { return m_KeepCanvasSize; } set { m_KeepCanvasSize = value; } }
/// <summary>
/// This function is called when the MonoBehaviour will be destroyed.
@@ -187,8 +199,9 @@ namespace Coffee.UIExtensions
// Cache id for RT.
if (s_CopyId == 0)
{
s_CopyId = Shader.PropertyToID("_ScreenCopy");
s_EffectId = Shader.PropertyToID("_Effect");
s_CopyId = Shader.PropertyToID("_UIEffectCapturedImage_ScreenCopyId");
s_EffectId1 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId1");
s_EffectId2 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId2");
}
// If size of generated result RT has changed, relese it.
@@ -228,7 +241,7 @@ namespace Coffee.UIExtensions
_buffer.Blit(BuiltinRenderTextureType.CurrentActive, s_CopyId);
// Set properties.
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur, 0));
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur, 1));
_buffer.SetGlobalVector("_ColorFactor", new Vector4(effectColor.r, effectColor.g, effectColor.b, effectColor.a));
// Blit without effect.
@@ -237,21 +250,32 @@ namespace Coffee.UIExtensions
_buffer.Blit(s_CopyId, rtId);
_buffer.ReleaseTemporaryRT(s_CopyId);
}
// Blit with reduction buffer.
else if (m_DesamplingRate < m_ReductionRate)
{
GetDesamplingSize(m_ReductionRate, out w, out h);
_buffer.GetTemporaryRT(s_EffectId, w, h, 0, m_FilterMode);
_buffer.Blit(s_CopyId, s_EffectId, mat);
_buffer.ReleaseTemporaryRT(s_CopyId);
_buffer.Blit(s_EffectId, rtId);
_buffer.ReleaseTemporaryRT(s_EffectId);
}
// Blit without reduction buffer.
// Blit with effect.
else
{
_buffer.Blit(s_CopyId, rtId, mat);
GetDesamplingSize(m_ReductionRate, out w, out h);
_buffer.GetTemporaryRT(s_EffectId1, w, h, 0, m_FilterMode);
_buffer.Blit(s_CopyId, s_EffectId1, mat); // Apply effect (copied screen -> effect1).
_buffer.ReleaseTemporaryRT(s_CopyId);
// Iterate the operation.
if(1 < m_Iterations)
{
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur, 0));
_buffer.GetTemporaryRT(s_EffectId2, w, h, 0, m_FilterMode);
for (int i = 1; i < m_Iterations; i++)
{
// Apply effect (effect1 -> effect2, or effect2 -> effect1).
_buffer.Blit(i % 2 == 0 ? s_EffectId2 : s_EffectId1, i % 2 == 0 ? s_EffectId1 : s_EffectId2, mat);
}
}
_buffer.Blit(m_Iterations % 2 == 0 ? s_EffectId2 : s_EffectId1, rtId);
_buffer.ReleaseTemporaryRT(s_EffectId1);
if (1 < m_Iterations)
{
_buffer.ReleaseTemporaryRT(s_EffectId2);
}
}
}
@@ -259,11 +283,15 @@ namespace Coffee.UIExtensions
_camera.AddCommandBuffer(kCameraEvent, _buffer);
// StartCoroutine by CanvasScaler.
#if UNITY_5_4_OR_NEWER
canvas.rootCanvas.GetComponent<CanvasScaler>().StartCoroutine(_CoUpdateTextureOnNextFrame());
#else
canvas.GetComponentInParent<CanvasScaler>().StartCoroutine(_CoUpdateTextureOnNextFrame());
#endif
var rootCanvas = canvas.rootCanvas;
var scaler = rootCanvas.GetComponent<CanvasScaler>();
scaler.StartCoroutine(_CoUpdateTextureOnNextFrame());
if (m_KeepCanvasSize)
{
var size = (rootCanvas.transform as RectTransform).rect.size;
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size.x);
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size.y);
}
}
/// <summary>
@@ -286,11 +314,13 @@ namespace Coffee.UIExtensions
CommandBuffer _buffer;
static int s_CopyId;
static int s_EffectId;
static int s_EffectId1;
static int s_EffectId2;
/// <summary>
/// Release genarated objects.
/// </summary>
/// <param name="releaseRT">If set to <c>true</c> release cached RenderTexture.</param>
void _Release(bool releaseRT)
{
if (releaseRT)
@@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
[RequireComponent(typeof(Graphic))]
[DisallowMultipleComponent]
public class UIFlip : BaseMeshEffect
{
//################################
// Serialize Members.
//################################
[SerializeField] private bool m_Horizontal = false;
[SerializeField] private bool m_Veritical = false;
//################################
// Public Members.
//################################
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped horizontally.
/// </summary>
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
public bool horizontal { get { return this.m_Horizontal; } set { this.m_Horizontal = value; } }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped vertically.
/// </summary>
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
public bool vertical { get { return this.m_Veritical; } set { this.m_Veritical = value; } }
/// <summary>
/// Call used to modify mesh.
/// </summary>
/// <param name="vh">VertexHelper.</param>
public override void ModifyMesh(VertexHelper vh)
{
RectTransform rt = graphic.rectTransform;
UIVertex vt = default(UIVertex);
Vector3 pos;
Vector2 center = rt.rect.center;
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vt, i);
pos = vt.position;
vt.position = new Vector3(
m_Horizontal ? -pos.x : pos.x,
m_Veritical ? -pos.y : pos.y
// m_Horizontal ? (pos.x + (center.x - pos.x) * 2) : pos.x,
// m_Veritical ? (pos.y + (center.y - pos.y) * 2) : pos.y
);
vh.SetUIVertex(vt, i);
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 9bb4e59514e90489d985e9a17c838085
timeCreated: 1525607243
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,243 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using UnityEditor;
#endif
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffect.
/// </summary>
[ExecuteInEditMode]
[RequireComponent(typeof(Graphic))]
[DisallowMultipleComponent]
public class UIShadow : Shadow
{
/// <summary>
/// Additional shadow.
/// </summary>
[System.Serializable]
public class AdditionalShadow
{
/// <summary>
/// How far is the blurring shadow from the graphic.
/// </summary>
[Range(0, 1)] public float blur = 0.25f;
/// <summary>
/// Shadow effect mode.
/// </summary>
public ShadowStyle style = ShadowStyle.Shadow;
/// <summary>
/// Color for the shadow effect.
/// </summary>
public Color effectColor = Color.black;
/// <summary>
/// How far is the shadow from the graphic.
/// </summary>
public Vector2 effectDistance = new Vector2(1f, -1f);
/// <summary>
/// Should the shadow inherit the alpha from the graphic?
/// </summary>
public bool useGraphicAlpha = true;
}
//################################
// Constant or Static Members.
//################################
/// <summary>
/// Shadow effect style.
/// </summary>
public enum ShadowStyle
{
None = 0,
Shadow,
Outline,
Outline8,
Shadow3,
}
//################################
// Serialize Members.
//################################
[SerializeField][Range(0, 1)] float m_Blur = 0.25f;
[SerializeField] ShadowStyle m_Style = ShadowStyle.Shadow;
[SerializeField] List<AdditionalShadow> m_AdditionalShadows = new List<AdditionalShadow>();
//################################
// Public Members.
//################################
/// <summary>
/// Graphic affected by the UIEffect.
/// </summary>
new public Graphic graphic { get { return base.graphic; } }
/// <summary>
/// How far is the blurring shadow from the graphic.
/// </summary>
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 2); _SetDirty(); } }
/// <summary>
/// Shadow effect mode.
/// </summary>
public ShadowStyle style { get { return m_Style; } set { m_Style = value; _SetDirty(); } }
/// <summary>
/// Additional Shadows.
/// </summary>
public List<AdditionalShadow> additionalShadows { get { return m_AdditionalShadows; } }
/// <summary>
/// Modifies the mesh.
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!isActiveAndEnabled || vh.currentVertCount <= 0)
{
return;
}
vh.GetUIVertexStream(s_Verts);
//================================
// Append shadow vertices.
//================================
{
_uiEffect = GetComponent<UIEffect>();
var inputVertCount = s_Verts.Count;
var start = 0;
var end = inputVertCount;
var toneLevel = _uiEffect && _uiEffect.isActiveAndEnabled ? _uiEffect.toneLevel : 0;
// Additional Shadows.
for (int i = additionalShadows.Count - 1; 0 <= i; i--)
{
AdditionalShadow shadow = additionalShadows[i];
UpdateFactor(toneLevel, shadow.blur, shadow.effectColor);
_ApplyShadow(s_Verts, shadow.effectColor, ref start, ref end, shadow.effectDistance, shadow.style, shadow.useGraphicAlpha);
}
// Shadow.
UpdateFactor(toneLevel, blur, effectColor);
_ApplyShadow(s_Verts, effectColor, ref start, ref end, effectDistance, style, useGraphicAlpha);
}
vh.Clear();
vh.AddUIVertexTriangleStream(s_Verts);
s_Verts.Clear();
}
UIEffect _uiEffect;
Vector2 _factor;
//################################
// Private Members.
//################################
static readonly List<UIVertex> s_Verts = new List<UIVertex>();
void UpdateFactor(float tone, float blur, Color color)
{
if (_uiEffect && _uiEffect.isActiveAndEnabled)
{
_factor = new Vector2(Packer.ToFloat(tone, 0, blur, 0), Packer.ToFloat(color.r, color.g, color.b, 1));
}
}
/// <summary>
/// Append shadow vertices.
/// * It is similar to Shadow component implementation.
/// </summary>
void _ApplyShadow(List<UIVertex> verts, Color color, ref int start, ref int end, Vector2 effectDistance, ShadowStyle style, bool useGraphicAlpha)
{
if (style == ShadowStyle.None || color.a <= 0)
return;
// Append Shadow.
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, effectDistance.y, useGraphicAlpha);
// Append Shadow3.
if (ShadowStyle.Shadow3 == style)
{
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, 0, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, effectDistance.y, useGraphicAlpha);
}
// Append Outline.
else if (ShadowStyle.Outline == style)
{
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, -effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, -effectDistance.y, useGraphicAlpha);
}
// Append Outline8.
else if (ShadowStyle.Outline8 == style)
{
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, -effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, -effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, 0, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, -effectDistance.y, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, 0, useGraphicAlpha);
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, effectDistance.y, useGraphicAlpha);
}
}
/// <summary>
/// Append shadow vertices.
/// * It is similar to Shadow component implementation.
/// </summary>
void _ApplyShadowZeroAlloc(List<UIVertex> verts, Color color, ref int start, ref int end, float x, float y, bool useGraphicAlpha)
{
// Check list capacity.
var neededCapacity = verts.Count + end - start;
if (verts.Capacity < neededCapacity)
verts.Capacity = neededCapacity;
// Append shadow vertices to the front of list.
// * The original vertex is pushed backward.
UIVertex vt;
for (int i = start; i < end; ++i)
{
vt = verts[i];
verts.Add(vt);
Vector3 v = vt.position;
vt.position.Set(v.x + x, v.y + y, v.z);
Color vertColor = color;
vertColor.a = useGraphicAlpha ? color.a * vt.color.a / 255 : color.a;
vt.color = vertColor;
// Set UIEffect prameters to vertex.
if(_uiEffect)
vt.uv1 = _factor;
verts[i] = vt;
}
// Update next shadow offset.
start = end;
end = verts.Count;
}
/// <summary>
/// Mark the UIEffect as dirty.
/// </summary>
void _SetDirty()
{
if(graphic)
graphic.SetVerticesDirty();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0848bff101191904ead4bb831f7084db
timeCreated: 1485321967
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,342 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
using System.Collections;
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using UnityEditor;
#endif
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffect.
/// </summary>
[ExecuteInEditMode]
[DisallowMultipleComponent]
public class UIShiny : BaseMeshEffect
#if UNITY_EDITOR
, ISerializationCallbackReceiver
#endif
{
//################################
// Constant or Static Members.
//################################
public const string shaderName = "UI/Hidden/UI-Effect-Shiny";
//################################
// Serialize Members.
//################################
[SerializeField] [Range(0, 1)] float m_Location = 0;
[SerializeField] [Range(0, 1)] float m_Width = 0.25f;
[SerializeField] [Range(-180, 180)] float m_Rotation;
[SerializeField][Range(0.01f, 1)] float m_Softness = 1f;
[FormerlySerializedAs("m_Alpha")]
[SerializeField][Range(0, 1)] float m_Brightness = 1f;
[SerializeField][Range(0, 1)] float m_Highlight = 1;
[SerializeField] Material m_EffectMaterial;
[Space]
[SerializeField] bool m_Play = false;
[SerializeField] bool m_Loop = false;
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
[SerializeField][Range(0, 10)] float m_LoopDelay = 1;
[SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal;
//################################
// Public Members.
//################################
/// <summary>
/// Graphic affected by the UIEffect.
/// </summary>
new public Graphic graphic { get { return base.graphic; } }
/// <summary>
/// Location for shiny effect.
/// </summary>
public float location
{
get { return m_Location; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Location, value))
{
m_Location = value;
_SetDirty();
}
}
}
/// <summary>
/// Width for shiny effect.
/// </summary>
public float width
{
get { return m_Width; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Width, value))
{
m_Width = value;
_SetDirty();
}
}
}
/// <summary>
/// Softness for shiny effect.
/// </summary>
public float softness
{
get { return m_Softness; }
set
{
value = Mathf.Clamp(value, 0.01f, 1);
if (!Mathf.Approximately(m_Softness, value))
{
m_Softness = value;
_SetDirty();
}
}
}
/// <summary>
/// Alpha for shiny effect.
/// </summary>
[System.Obsolete("Use brightness instead (UnityUpgradable) -> brightness")]
public float alpha
{
get { return m_Brightness; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Brightness, value))
{
m_Brightness = value;
_SetDirty();
}
}
}
/// <summary>
/// Brightness for shiny effect.
/// </summary>
public float brightness
{
get { return m_Brightness; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Brightness, value))
{
m_Brightness = value;
_SetDirty();
}
}
}
/// <summary>
/// Highlight factor for shiny effect.
/// </summary>
public float highlight
{
get { return m_Highlight; }
set
{
value = Mathf.Clamp(value, 0, 1);
if (!Mathf.Approximately(m_Highlight, value))
{
m_Highlight = value;
_SetDirty();
}
}
}
/// <summary>
/// Rotation for shiny effect.
/// </summary>
public float rotation
{
get { return m_Rotation; }
set
{
if (!Mathf.Approximately(m_Rotation, value))
{
m_Rotation = value;
_SetDirty();
}
}
}
/// <summary>
/// Effect material.
/// </summary>
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
/// <summary>
/// Play shinning on enable.
/// </summary>
public bool play { get { return m_Play; } set { m_Play = value; } }
/// <summary>
/// Play shinning loop.
/// </summary>
public bool loop { get { return m_Loop; } set { m_Loop = value; } }
/// <summary>
/// Shinning duration.
/// </summary>
public float duration { get { return m_Duration; } set { m_Duration = Mathf.Max(value, 0.1f); } }
/// <summary>
/// Delay on loop.
/// </summary>
public float loopDelay { get { return m_LoopDelay; } set { m_LoopDelay = Mathf.Max(value, 0); } }
/// <summary>
/// Shinning update mode.
/// </summary>
public AnimatorUpdateMode updateMode { get { return m_UpdateMode; } set { m_UpdateMode = value; } }
/// <summary>
/// This function is called when the object becomes enabled and active.
/// </summary>
protected override void OnEnable()
{
_time = 0;
graphic.material = effectMaterial;
base.OnEnable();
}
/// <summary>
/// This function is called when the behaviour becomes disabled () or inactive.
/// </summary>
protected override void OnDisable()
{
graphic.material = null;
base.OnDisable();
}
#if UNITY_EDITOR
public void OnBeforeSerialize()
{
}
public void OnAfterDeserialize()
{
var obj = this;
EditorApplication.delayCall += () =>
{
if (Application.isPlaying || !obj)
return;
var mat = GetMaterial(shaderName);
if (m_EffectMaterial == mat && graphic.material == mat)
return;
graphic.material = m_EffectMaterial = mat;
EditorUtility.SetDirty(this);
EditorUtility.SetDirty(graphic);
EditorApplication.delayCall += AssetDatabase.SaveAssets;
};
}
public static Material GetMaterial(string shaderName)
{
string name = Path.GetFileName(shaderName);
return AssetDatabase.FindAssets("t:Material " + name)
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
.OfType<Material>()
.FirstOrDefault(x => x.name == name);
}
#endif
/// <summary>
/// Modifies the mesh.
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!isActiveAndEnabled)
return;
// rect.
Rect rect = graphic.rectTransform.rect;
// rotation.
float rad = rotation * Mathf.Deg2Rad;
Vector2 dir = new Vector2(Mathf.Cos(rad), Mathf.Sin(rad));
dir.x *= rect.height / rect.width;
dir = dir.normalized;
// Calculate vertex position.
UIVertex vertex = default(UIVertex);
Vector2 nomalizedPos;
Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix.
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vertex, i);
// Normalize vertex position by local matrix.
nomalizedPos = localMatrix * vertex.position;
vertex.uv1 = new Vector2(
Packer.ToFloat(Mathf.Clamp01(nomalizedPos.y), softness, width, brightness),
Packer.ToFloat(location, highlight)
);
vh.SetUIVertex(vertex, i);
}
}
/// <summary>
/// Play effect.
/// </summary>
public void Play()
{
_time = 0;
m_Play = true;
}
//################################
// Private Members.
//################################
float _time = 0;
void Update()
{
if (!m_Play || !Application.isPlaying)
{
return;
}
_time += m_UpdateMode == AnimatorUpdateMode.UnscaledTime
? Time.unscaledDeltaTime
: Time.deltaTime;
location = _time / m_Duration;
if (m_Duration <= _time)
{
m_Play = m_Loop;
_time = m_Loop ? -m_LoopDelay : 0;
}
}
/// <summary>
/// Mark the UIEffect as dirty.
/// </summary>
void _SetDirty()
{
if (graphic)
graphic.SetVerticesDirty();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f19b7e2285c104f6ca47d583f3e5444f
timeCreated: 1523859834
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: deded9e09f6e644228da395138e4f232
folderAsset: yes
timeCreated: 1527743712
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,138 @@
Shader "UI/Hidden/UI-Effect-Dissolve"
{
Properties
{
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
[Header(Dissolve)]
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "UI-Effect.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
float2 uv1 : TEXCOORD1;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
fixed4 effectFactor : TEXCOORD2;
fixed4 effectFactor2 : TEXCOORD3;
};
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
sampler2D _MainTex;
sampler2D _NoiseTex;
v2f vert(appdata_t IN)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = IN.vertex;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color * _Color;
//xy: Noize uv, z: Dissolve factor, w: width
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
//xyz: color, w: softness
OUT.effectFactor2 = UnpackToVec4(IN.uv1.y);
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
float cutout = tex2D(_NoiseTex, IN.effectFactor.xy).a;
float location = IN.effectFactor.z;
float width = IN.effectFactor.w/4;
float factor = cutout - location * ( 1 + width ) + width;
#ifdef UNITY_UI_ALPHACLIP
clip (min(color.a - 0.01, factor));
#endif
fixed edgeLerp = step(factor, color.a) * saturate((width - factor)*16/ IN.effectFactor2.w);
color = ApplyColorEffect(color, fixed4(IN.effectFactor2.rgb, edgeLerp));
color.a *= saturate((factor)*32/ IN.effectFactor2.w);
return color;
}
ENDCG
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e1b48dc831eb147e9886c049033213bf
timeCreated: 1523859834
licenseType: Pro
ShaderImporter:
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,163 @@
Shader "UI/Hidden/UI-Effect-Shiny"
{
Properties
{
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
float2 uv1 : TEXCOORD1;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
half4 effectFactor : TEXCOORD2;
half2 effectFactor2 : TEXCOORD3;
};
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
sampler2D _MainTex;
float4 _MainTex_TexelSize;
fixed4 UnpackToVec4(float value)
{
const int PACKER_STEP = 64;
const int PRECISION = PACKER_STEP - 1;
fixed4 color;
color.r = (value % PACKER_STEP) / PRECISION;
value = floor(value / PACKER_STEP);
color.g = (value % PACKER_STEP) / PRECISION;
value = floor(value / PACKER_STEP);
color.b = (value % PACKER_STEP) / PRECISION;
value = floor(value / PACKER_STEP);
color.a = (value % PACKER_STEP) / PRECISION;
return color;
}
half2 UnpackToVec2(float value)
{
const int PACKER_STEP = 4096;
const int PRECISION = PACKER_STEP - 1;
fixed4 color;
color.x = (value % PACKER_STEP) / PRECISION;
value = floor(value / PACKER_STEP);
color.y = (value % PACKER_STEP) / PRECISION;
return color;
}
v2f vert(appdata_t IN)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = IN.vertex;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color * _Color;
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
OUT.effectFactor2 = UnpackToVec2(IN.uv1.y);
OUT.effectFactor2.x = OUT.effectFactor2.x * 2 - 0.5;
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd);
fixed4 originAlpha = color.a;
color *= IN.color;
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
half pos = IN.effectFactor.x - IN.effectFactor2.x;
half normalized = 1 - saturate(abs(pos / IN.effectFactor.z));
half shinePower = smoothstep(0, IN.effectFactor.y*2, normalized);
half3 reflectColor = lerp(1, color.rgb * 10, IN.effectFactor2.y);
color.rgb += originAlpha * (shinePower / 2) * IN.effectFactor.w * reflectColor;
return color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 20ffe76c2439c403aabdd25bd94bf011
timeCreated: 1523859834
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -135,7 +135,7 @@ fixed4 ApplyToneEffect(fixed4 color, fixed factor)
// Color effect
//################################
// Apply color effect.
fixed4 ApplyColorEffect(fixed4 color, fixed4 factor)
half4 ApplyColorEffect(half4 color, half4 factor)
{
#ifdef UI_COLOR_SET // Set
color.rgb = lerp(color.rgb, factor.rgb, factor.a);
@@ -145,6 +145,9 @@ fixed4 ApplyColorEffect(fixed4 color, fixed4 factor)
#elif UI_COLOR_SUB // Sub
color.rgb -= factor.rgb * factor.a;
#else
color.rgb = lerp(color.rgb, color.rgb * factor.rgb, factor.a);
#endif
#if UI_TONE_CUTOFF
@@ -85,7 +85,10 @@ Shader "UI/Hidden/UI-Effect"
#endif
#if defined (UI_TONE) || defined (UI_BLUR)
half3 effectFactor : TEXCOORD2;
half4 effectFactor : TEXCOORD2;
#endif
#if UI_TONE_HUE || UI_TONE_PIXEL
half4 extraFactor : TEXCOORD3;
#endif
};
@@ -112,10 +115,10 @@ Shader "UI/Hidden/UI-Effect"
#endif
#if UI_TONE_HUE
OUT.effectFactor.y = sin(OUT.effectFactor.x*3.14159265359*2);
OUT.effectFactor.x = cos(OUT.effectFactor.x*3.14159265359*2);
OUT.extraFactor.x = cos(OUT.effectFactor.x*3.14159265359 * 2);
OUT.extraFactor.y = sin(OUT.effectFactor.x*3.14159265359 * 2);
#elif UI_TONE_PIXEL
OUT.effectFactor.xy = max(2, (1-OUT.effectFactor.x) * _MainTex_TexelSize.zw);
OUT.extraFactor.xy = max(2, (1-OUT.effectFactor.x*0.98) * _MainTex_TexelSize.zw);
#endif
#if defined (UI_COLOR)
@@ -129,7 +132,7 @@ Shader "UI/Hidden/UI-Effect"
fixed4 frag(v2f IN) : SV_Target
{
#if UI_TONE_PIXEL
IN.texcoord = round(IN.texcoord * IN.effectFactor.xy) / IN.effectFactor.xy;
IN.texcoord = round(IN.texcoord * IN.extraFactor.xy) / IN.extraFactor.xy;
#endif
#if defined (UI_BLUR)
@@ -149,7 +152,7 @@ Shader "UI/Hidden/UI-Effect"
color.rgb = IN.color.rgb;
color.a = color.a * tex2D(_MainTex, IN.texcoord).a + IN.effectFactor.x * 2 - 1;
#elif UI_TONE_HUE
color.rgb = shift_hue(color.rgb, IN.effectFactor.x, IN.effectFactor.y);
color.rgb = shift_hue(color.rgb, IN.extraFactor.x, IN.extraFactor.y);
#elif defined (UI_TONE) & !UI_TONE_CUTOFF
color = ApplyToneEffect(color, IN.effectFactor.x);
#endif
@@ -37,9 +37,7 @@ Shader "UI/Hidden/UI-EffectCapture"
fixed4 colorFactor : COLOR1;
#endif
#if defined (UI_TONE) || defined (UI_BLUR)
half4 effectFactor : TEXCOORD2;
#endif
};
sampler2D _MainTex;
@@ -51,16 +49,9 @@ Shader "UI/Hidden/UI-EffectCapture"
{
v2f OUT;
OUT.vertex = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
OUT.texcoord = half2(v.texcoord.x, 1 - v.texcoord.y);
#else
OUT.texcoord = v.texcoord;
#endif
#if defined (UI_TONE) || defined (UI_BLUR)
OUT.texcoord = v.texcoord;
OUT.effectFactor = _EffectFactor;
#endif
#if UI_TONE_HUE
OUT.effectFactor.y = sin(OUT.effectFactor.x*3.14159265359*2);
@@ -73,6 +64,10 @@ Shader "UI/Hidden/UI-EffectCapture"
OUT.colorFactor = _ColorFactor;
#endif
#if UNITY_UV_STARTS_AT_TOP
OUT.texcoord.y = lerp(OUT.texcoord.y, 1 - OUT.texcoord.y, OUT.effectFactor.w);
#endif
return OUT;
}
+2 -2
View File
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 5b535d57ef51543408dea9bdc2ac90a0
guid: f2381d5cb31034d1fbcdb9c1e70fad2d
folderAsset: yes
timeCreated: 1502937466
timeCreated: 1527748593
licenseType: Pro
DefaultImporter:
userData:
-78
View File
@@ -1,78 +0,0 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
using BlurMode = UIEffect.BlurMode;
using ColorMode = UIEffect.ColorMode;
using ToneMode = UIEffect.ToneMode;
public static class ExportPackage
{
const string kPackageName = "UIEffect.unitypackage";
static readonly string[] kAssetPathes =
{
"Assets/UIEffect",
};
[MenuItem("Export Package/" + kPackageName)]
[InitializeOnLoadMethod]
static void Export()
{
if (EditorApplication.isPlayingOrWillChangePlaymode)
return;
// Export package
AssetDatabase.ExportPackage(kAssetPathes, kPackageName, ExportPackageOptions.Recurse | ExportPackageOptions.Default);
UnityEngine.Debug.Log("Export successfully : " + kPackageName);
// Update readme.
System.IO.File.Copy("Assets/UIEffect/Readme.md", "Readme.md", true);
}
[MenuItem("Export Package/Generate Material Variants")]
static void GenerateMaterialVariants()
{
#if UIEFFECT_SEPARATE
// On "UIEFFECT_SEPARATE" mode, generate effect materials on demand.
return;
#endif
// Export materials.
AssetDatabase.StartAssetEditing();
{
// For UIEffect
GenerateMaterialVariants(Shader.Find(UIEffect.shaderName));
// For UIEffectCapturedImage
GenerateMaterialVariants(Shader.Find(UIEffectCapturedImage.shaderName));
}
AssetDatabase.StopAssetEditing();
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
/// <summary>
/// Generates the material variants.
/// </summary>
static void GenerateMaterialVariants(Shader shader)
{
var combinations = (from tone in (ToneMode[])Enum.GetValues(typeof(ToneMode))
from color in (ColorMode[])Enum.GetValues(typeof(ColorMode))
from blur in (BlurMode[])Enum.GetValues(typeof(BlurMode))
select new { tone, color, blur }).ToArray();
for (int i = 0; i < combinations.Length; i++)
{
var comb = combinations[i];
EditorUtility.DisplayProgressBar("Genarate Effect Material", UIEffect.GetVariantName(shader, comb.tone, comb.color, comb.blur), (float)i / combinations.Length);
UIEffect.GetOrGenerateMaterialVariant(shader, comb.tone, comb.color, comb.blur);
}
EditorUtility.ClearProgressBar();
}
}
}
+61
View File
@@ -0,0 +1,61 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
using BlurMode = UIEffect.BlurMode;
using ColorMode = UIEffect.ColorMode;
using ToneMode = UIEffect.ToneMode;
public static class MaterialBundle
{
[MenuItem("UIEffect/Generate Material Bundle")]
static void Generate()
{
#if UIEFFECT_SEPARATE
// On "UIEFFECT_SEPARATE" mode, generate effect materials on demand.
return;
#endif
// Export materials.
AssetDatabase.StartAssetEditing();
GenerateMaterialVariants(
Shader.Find(UIEffect.shaderName)
, (ToneMode[])Enum.GetValues(typeof(ToneMode))
, (ColorMode[])Enum.GetValues(typeof(ColorMode))
, (BlurMode[])Enum.GetValues(typeof(BlurMode))
);
GenerateMaterialVariants(
Shader.Find(UIEffectCapturedImage.shaderName)
, new[] { ToneMode.None, ToneMode.Grayscale, ToneMode.Sepia, ToneMode.Nega, ToneMode.Pixel, ToneMode.Hue, }
, (ColorMode[])Enum.GetValues(typeof(ColorMode))
, (BlurMode[])Enum.GetValues(typeof(BlurMode))
);
AssetDatabase.StopAssetEditing();
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
static void GenerateMaterialVariants(Shader shader, ToneMode[] tones, ColorMode[] colors, BlurMode[] blurs)
{
var combinations = (from tone in tones
from color in colors
from blur in blurs
select new { tone, color, blur }).ToArray();
for (int i = 0; i < combinations.Length; i++)
{
var comb = combinations[i];
EditorUtility.DisplayProgressBar("Genarate Effect Material Bundle", UIEffect.GetVariantName(shader, comb.tone, comb.color, comb.blur), (float)i / combinations.Length);
UIEffect.GetOrGenerateMaterialVariant(shader, comb.tone, comb.color, comb.blur);
}
EditorUtility.ClearProgressBar();
}
}
}
+12
View File
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7b1ed09bdf5e54042b5cd1fbe69361bf
timeCreated: 1527748594
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-203
View File
@@ -1,203 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-1353081132
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: -1
outSlope: -1
tangentMode: 10
- time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 1
inSlope: 1
outSlope: 1
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 304273561
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: -1
outSlope: -1
tangentMode: 10
- time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 1
inSlope: 1
outSlope: 1
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Alpha
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110250372
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: -1353081132}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110250372}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110250372}
--- !u!1102 &558841200
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
-203
View File
@@ -1,203 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-1671317278
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Blur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 595122796
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Blur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blur
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &49322562
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110239862
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: -1671317278}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110239862}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110239862}
-581
View File
@@ -1,581 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-1353081132
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 4
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 6
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 7
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.r
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1.3333334
value: 1
inSlope: -0.025000036
outSlope: -0.025000036
tangentMode: 10
- time: 2.5833333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3.8333333
value: 1
inSlope: 0.024999976
outSlope: 0.024999976
tangentMode: 10
- time: 5.1666665
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 6.6666665
value: 1
inSlope: -0.041666627
outSlope: -0.041666627
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.g
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 1
inSlope: 0.027777776
outSlope: 0.027777776
tangentMode: 10
- time: 4.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 6.25
value: 1
inSlope: -0.0357143
outSlope: -0.0357143
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.b
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 4.25
value: 1
inSlope: -0.0078431405
outSlope: -0.0078431405
tangentMode: 10
- time: 8
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 2526845255
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 4215373228
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 2334886179
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 304273561
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 9
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 4
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 6
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 7
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.r
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1.3333334
value: 1
inSlope: -0.025000036
outSlope: -0.025000036
tangentMode: 10
- time: 2.5833333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3.8333333
value: 1
inSlope: 0.024999976
outSlope: 0.024999976
tangentMode: 10
- time: 5.1666665
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 6.6666665
value: 1
inSlope: -0.041666627
outSlope: -0.041666627
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.g
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 1
inSlope: 0.027777776
outSlope: 0.027777776
tangentMode: 10
- time: 4.25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 6.25
value: 1
inSlope: -0.0357143
outSlope: -0.0357143
tangentMode: 10
- time: 8
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.b
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 4.25
value: 1
inSlope: -0.0078431405
outSlope: -0.0078431405
tangentMode: 10
- time: 8
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 8.833333
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 9
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectColor.a
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Color
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110247432
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: -1353081132}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110247432}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110247432}
--- !u!1102 &558841200
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
-315
View File
@@ -1,315 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Shadow
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110208594
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 942869422}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110208594}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110208594}
--- !u!74 &942869422
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 5
outSlope: 5
tangentMode: 10
- time: 1
value: 5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -5
outSlope: -5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.x
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 5
outSlope: 5
tangentMode: 10
- time: 1
value: 5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -5
outSlope: -5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.y
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 1.5
outSlope: 1.5
tangentMode: 10
- time: 1
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -1.5
outSlope: -1.5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ShadowBlur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 929876405
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 1080817955
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3733842510
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 5
outSlope: 5
tangentMode: 10
- time: 1
value: 5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -5
outSlope: -5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.x
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 5
outSlope: 5
tangentMode: 10
- time: 1
value: 5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -5
outSlope: -5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_EffectDistance.y
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 1.5
outSlope: 1.5
tangentMode: 10
- time: 1
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: -1.5
outSlope: -1.5
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ShadowBlur
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!1102 &1400026480
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
-203
View File
@@ -1,203 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-1746834952
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 2148837408
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 2
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_ToneLevel
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!1102 &-1537770706
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ToneLevel
serializedVersion: 5
m_AnimatorParameters:
- m_Name: New Bool
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110755890}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110218890
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Animation
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: -1746834952}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110755890
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110218890}
m_Position: {x: 240, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 72, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110218890}
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e129a7bccac914fc0b15dab3c2395cd3
timeCreated: 1488199687
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -1,28 +0,0 @@
using UnityEngine;
namespace Coffee.UIExtensions
{
public class UIEffectDialogDemo : MonoBehaviour
{
public void Open()
{
gameObject.SetActive(true);
GetComponent<Animator>().SetTrigger("Open");
}
public void Close()
{
GetComponent<Animator>().SetTrigger("Close");
}
public void Closed()
{
gameObject.SetActive(false);
}
public void CaptureBackground()
{
GetComponentInChildren<UIEffectCapturedImage>().Capture();
}
}
}
@@ -1,96 +0,0 @@
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
namespace Coffee.UIExtensions
{
/// <summary>
/// UIEffectCapturedImage editor.
/// </summary>
[CustomEditor(typeof(UIEffectCapturedImage))]
[CanEditMultipleObjects]
public class UIEffectCapturedImageEditor : RawImageEditor
{
/// <summary>
/// Implement this function to make a custom inspector.
/// </summary>
public override void OnInspectorGUI()
{
serializedObject.Update();
//================
// Basic properties.
//================
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Texture"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Color"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_RaycastTarget"));
//================
// Capture effect.
//================
GUILayout.Space(10);
EditorGUILayout.LabelField("Capture Effect", EditorStyles.boldLabel);
UIEffectEditor.DrawEffectProperties(UIEffectCapturedImage.shaderName, serializedObject);
//================
// Advanced option.
//================
GUILayout.Space(10);
EditorGUILayout.LabelField("Advanced Option", EditorStyles.boldLabel);
// Desampling rate.
DrawDesamplingRate(serializedObject.FindProperty("m_DesamplingRate"));
// Reduction rate.
DrawDesamplingRate(serializedObject.FindProperty("m_ReductionRate"));
// Filter Mode.
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_FilterMode"));
serializedObject.ApplyModifiedProperties();
// Debug.
using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox))
{
GUILayout.Label("Debug");
if (GUILayout.Button("Capture", "ButtonLeft"))
UpdateTexture(true);
EditorGUI.BeginDisabledGroup(!(target as UIEffectCapturedImage).capturedTexture);
if (GUILayout.Button("Release", "ButtonRight"))
UpdateTexture(false);
EditorGUI.EndDisabledGroup();
}
}
/// <summary>
/// Draws the desampling rate.
/// </summary>
void DrawDesamplingRate(SerializedProperty sp)
{
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.PropertyField(sp);
int w, h;
(target as UIEffectCapturedImage).GetDesamplingSize((UIEffectCapturedImage.DesamplingRate)sp.intValue, out w, out h);
GUILayout.Label(string.Format("{0}x{1}", w, h), EditorStyles.miniLabel);
}
}
/// <summary>
/// Updates the texture.
/// </summary>
void UpdateTexture(bool capture)
{
var current = target as UIEffectCapturedImage;
bool enable = current.enabled;
current.enabled = false;
current.Release();
if (capture)
current.Capture();
EditorApplication.delayCall += () => current.enabled = enable;
}
}
}
-7
View File
@@ -1,7 +0,0 @@
Copyright 2017 mob-sakai
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-327
View File
@@ -1,327 +0,0 @@
UIEffect
===
Easy to use effects for uGUI.
![image](https://user-images.githubusercontent.com/12690315/35077815-5ff8094e-fc42-11e7-92dd-99916c9f9da7.png)
[WebGL Demo](#demo) | [Download](https://github.com/mob-sakai/UIEffect/releases) | [Usage](#usage) | [Release Notes](#release-notes)
### Supports following effects!
* Grayscale
* Sepia tone
* Nega tone
* Pixelation
* Hue shift
* Cutoff (alpha-based)
* Mono (alpha-based)
* Color override
* Color additive
* Color subtract
* Blur fast(3x4)
* Blur medium(6x4)
* Blur detail(6x8)
* Shadow with effect
* Shadow
* Shadow3
* Outline
* Outline8
* Gradient vertex color
* Horizontal
* Vertical
* Angle
* Diagonal
#### And, more features!
* Control effect parameter with Animation
![image](https://user-images.githubusercontent.com/12690315/34617750-cf2c9464-f27f-11e7-8ee9-e6be3b209943.gif)
* Use for screen transition
![image](https://user-images.githubusercontent.com/12690315/34618554-71a32e40-f282-11e7-8b78-6948c50c6b58.gif)
* Multiple shadow effect to reduce rendering vertices
![image](https://user-images.githubusercontent.com/12690315/34552373-600fdab2-f164-11e7-8565-21c15af92a93.png)
* Capture image with effect, like post effect
![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif)
* Dialog with captured image effect
![image](https://user-images.githubusercontent.com/12690315/34619468-97e3c134-f285-11e7-90b2-3a75bde13911.gif)
* Change vertex color as gradient, with rotation, offset, color correction
![image](https://user-images.githubusercontent.com/12690315/34931353-b1824df2-fa11-11e7-9dda-18aba10a8607.gif)
![image](https://user-images.githubusercontent.com/12690315/34930676-000c41d4-fa0e-11e7-825b-d5a1e757fea8.png)
<br><br><br><br>
## Demo
[WebGL Demo](https://developer.cloud.unity3d.com/share/WJTY06hfG7/webgl/)
* Effect sample
* Transition
* Dialog window with blur background
* Included in unitypackage
<br><br><br><br>
## Usage
1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases) and install to your project.
1. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu.
1. Add `UIEffect` component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector.
1. Choose effect type and adjust values in inspector.
![image](https://user-images.githubusercontent.com/12690315/34595809-3838dc54-f21e-11e7-858b-72821dca8b44.png)
1. Enjoy!
##### Requirement
* Unity 5.5+ *(included Unity 2017.x)*
* No other SDK are required
<br><br><br><br>
## Development Note
#### How does UIEffectCapturedImage work?
![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif)
`UIEffectCapturedImage` is similar to post effect, but uses `CommandBuffer` to give effect only on the rendering result (= captured image) of a specific frame.
This effect is non-realtime, light-weight, less-camera, blit only once, but effective.
* Camera for processing effect is unnecessary.
* Process effect only once after `UIEffectCapturedImage.Capture`.
* Using reduction buffer, keep used memory size small and keep rendering load are small.
* When GameObjects with motion are on the screen, a result texture may be stirred.
* You can overlay and display like as: [Screen] | [UIEffectCapturedImage] | [Dialog A] | [UIEffectCapturedImage] | [Dialog B].
See also [Demo](#demo).
#### Why is UIEffect lightweight?
* UIEffect pre-generates material from a combination of effects. This has the following benefits.
* Draw call batching If possible, draw calls will decrease.
* Since only the required material and shader variants are included in the build, the build size will be smaller.
#### How to control effect parameters for uGUI element WITHOUT MaterialPropertyBlock?
* In general, you can use [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) for renderers to control minor changes in the material without different batches.
* However, changing the [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) of the uGUI element from the script will cause different batches and draw calls to increase.
* So UIEffect encodes multiple effect parameters to UV1 channel with [IMeshModifier](https://docs.unity3d.com/ScriptReference/UI.IMeshModifier.html).
* Pack four 6-bit [0-1] (64 steps) parameters into one float value.
* The parameters are low precision, but sufficient.
| uv1 | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] |
|-|-|-|-|-|
| x(32bit float) | Tone level | *Empty* | Blur level | *Empty* |
| y(32bit float) | Red channel | Green channel | Blue channel | Alpha channel |
#### Note: Unity 5.6+
In Unity 5.6+, Canvas supports **Additional Shader Channels**.
Please enable `TexCoord1` to use UIEffect.
![image](https://user-images.githubusercontent.com/12690315/28405830-f4f261e8-6d68-11e7-9faf-7e5442062f59.png)
![image](https://user-images.githubusercontent.com/12690315/34560894-191b6cda-f18b-11e7-9de2-9a9d13f72ccd.png)
#### Note: if you include prefabs / scenes containing UIEffect in AssetBundle.
Use script define symbol `UIEFFECT_SEPARATE`.
Unused shader variants and materials will be excluded from AssetBundles.
||Combined mode (default)|Separated mode|
|-|-|-|
|Script define symbol| - |`UIEFFECT_SEPARATE`|
|Included in build|Only used variants|Only used variants|
|Included in AssetBundle|All variants (Heavy!)|Only used variants|
|Look in editor|![comb](https://user-images.githubusercontent.com/12690315/35324040-df4f1684-0132-11e8-9534-f958b93de158.png)|![sep](https://user-images.githubusercontent.com/12690315/35324405-fd5e89a6-0133-11e8-9d23-71ccc424fa21.png)|
#### How to improve performance?
* Use `ShaderVariantCollection` to preload shader.
https://docs.unity3d.com/Manual/OptimizingShaderLoadTime.html
* Set camera's clear flag to "Solid Color".
* Enable multi thread rendering.
<br><br><br><br>
## Release Notes
### ver.2.0.0
* Feature: Switch separate/combine materials by script symbol "UIEFFECT_SEPARATE".
* Combined mode (default)
* The effect materials are sub-asset, and will be hidden in project view & object picker window.
* Unused shader variants and materials will be excluded from build, but they will be **included in AssetBundle.**
![comb](https://user-images.githubusercontent.com/12690315/35324040-df4f1684-0132-11e8-9534-f958b93de158.png)
* Separated mode
* Use script define symbol `UIEFFECT_SEPARATE`.
* The effect materials are main-asset, and will be displayed in project view & object picker window.
* In Editor, the effect materials are generated as asset, on demand.
* Unused shader variants and materials will be excluded from build and AssetBundle.
* We recommend this mode only if you include prefabs / scenes containing UIEffect in AssetBundle.
![sep](https://user-images.githubusercontent.com/12690315/35324405-fd5e89a6-0133-11e8-9d23-71ccc424fa21.png)
* Changed: Default is "Combined mode".
* Changed: Change namespace to `Coffee.UIExtensions`.
* Changed: Unity 5.3.x & 5.4.x are no longer supported.
### ver.1.6.1
* Fixed: Cannot access protected member `UnityEngine.UI.BaseMeshEffect.graphic` in Unity5.6+.
### ver.1.6.0
* Changed: UIEffect inherit BaseMeshEffect.
* Fixed: Pixelization is incorrect.
* Changed: ShadowMode -> ShadowStyle.
* Changed: Blur level is range [0-1].
### ver.1.5.1
* Fixed: An error occurs when no effect is specified for UICapturedImage. [#36](https://github.com/mob-sakai/UIEffect/issues/36)
### ver.1.5.0
* Feature: Add ToneMode `Hue Shift`.
![image](https://user-images.githubusercontent.com/12690315/34830409-18114e44-f727-11e7-849a-0d61a35f03ea.png)
* Feature: Add ShadowMode `Shadow3`.
![image](https://user-images.githubusercontent.com/12690315/34930812-cb87dc24-fa0e-11e7-90a7-0013e2ba55d1.png)
* Feature: Add `UIGradient` component to change vertex color as gradient.
* Gradient direction
* Horizontal
* Vertical
* Angle
* Diagonal
* Rotation and offset
* Text gradient style
* Rect
* Fit
* Split
* Color space
* Uninitialized
* Gammma
* Linear
* Ignore aspect ratio
![image](https://user-images.githubusercontent.com/12690315/34930676-000c41d4-fa0e-11e7-825b-d5a1e757fea8.png)
### ver.1.4.4
* Fixed: Error has occur on edit prefab. [#27](https://github.com/mob-sakai/UIEffect/issues/27)
### ver.1.4.3
* Fixed: Color effect is incorrect. [#19](https://github.com/mob-sakai/UIEffect/issues/19)
### ver.1.4.2
* Fixed: Error has occur on after deserialize. [#16](https://github.com/mob-sakai/UIEffect/issues/16)
### ver.1.4.1
* Fixed: Demo link in `readme.md` is broken.
### ver.1.4.0
* Changed: ToneMode, ColorMode, BlurMode can be changed only in editor.
* Changed: Cutoff's level is reversed.
* Feature: Exclude unused shader variant from build.
* Add: Add many materials for shader variant, but exclude unused materials from build.
Build report of demo project is as following.
| | ver.1.3.0 | ver.1.4.0 |
|--|-----------|-----------|
| UI-Effect.shader | All 112 variants, 170.7 kb | 21 variants, 31.4 kb |
| UI-EffectCapturedImage.shader | All 80 variants, 49.0 kb | 2 variants, 7.3 kb |
| Materials in build | Instantiate on play, 0 kb | 23 items, about 6.9 kb |
| Total | 219.7 kb | 45.6 kb |
### ver.1.3.0
* Feature: Capture image with effect, like post effect.
* Demo: Add transition blur button & dialog with captured image effect.
![image](https://user-images.githubusercontent.com/12690315/34619468-97e3c134-f285-11e7-90b2-3a75bde13911.gif)
### ver.1.2.0
* Fixed : Pixelaration shifts to the lower right.
* Fixed : Cutoff alpha is incorrect.
* Feature: Supports multiple shadow effect for reduce rendering vertices.
![image](https://user-images.githubusercontent.com/12690315/34552373-600fdab2-f164-11e7-8565-21c15af92a93.png)
* Feature: New blur effect mode : `Medium`.
* Feature: Fix button to enable TexCoord1 of Canvas.additionalShaderChannels to use UIEffect.
![image](https://user-images.githubusercontent.com/12690315/34560894-191b6cda-f18b-11e7-9de2-9a9d13f72ccd.png)
* Changed : UIEffect.color is obsolete, use UIEffect.effectColor instead.
* Changed: Blur range is [0-2].
* Refactoring: Shader refactoring.
* Demo: Add transition button & multiple shadows.
### ver.1.1.0
* Feature: Add Pixelaration effect.
* Feature: Add Cutoff/Mono effect for patterned alpha images. It can be used for masks and transitions!
![image](https://user-images.githubusercontent.com/12690315/34618554-71a32e40-f282-11e7-8b78-6948c50c6b58.gif)
### ver.1.0.0
* Feature: Shader supports pre-processer macros (for example UNITY_VERTEX_OUTPUT_STEREO) for Unity 5.3.x, 5.4.x and 5.5.x.
* Feature: Supports changing value from animation.
* Feature: Supports Tone effect.
* grayscale
* sepia
* nega
* Feature: Supports Color effect.
* set
* add
* sub
* Feature: Supports Blur effect.
* fast
* detail
* Fix: Color effect will not be properly when it was rotated.
* Performance: Shader supports multi-compile for performance.
* Performance: Cache same effect materials to reduce draw calls.
* Improve: Supports mobile devices.
* Improve: Simplify component & inspector.
<br><br><br><br>
## License
* MIT
* © UTJ/UCL
## Author
[mob-sakai](https://github.com/mob-sakai)
## See Also
* GitHub Page : https://github.com/mob-sakai/UIEffect
* Releases : https://github.com/mob-sakai/UIEffect/releases
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
* Current Project : https://github.com/mob-sakai/UIEffect/projects/1

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