Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aeb6d562ed | |||
| 01e5f05118 | |||
| a92aa327b5 | |||
| ea7d98dc5e | |||
| 77ebcf2b7a | |||
| 773f8cf4ae | |||
| c792be9626 | |||
| 1110bf3dad | |||
| 4dfdcd76ab | |||
| 385c082fb4 | |||
| d84d9747bc | |||
| 318fc18597 | |||
| d93a83d577 | |||
| c94b3965af | |||
| 9990f640c7 | |||
| d840a76759 | |||
| 5bf0df0f66 | |||
| 84df2f4cf6 | |||
| 27e8bc8117 | |||
| 362f881f73 | |||
| 7fe79bb11f | |||
| 65166ecdbd | |||
| 9a580b2132 | |||
| 4236fcc0da | |||
| ecad03cb37 | |||
| 61879b86db | |||
| 4c5f01c7f3 | |||
| 3c3d47aede | |||
| ed0a02b8d6 | |||
| 9cdd8558b1 | |||
| b38358f867 | |||
| 71c6b4c314 | |||
| 9c7e068374 | |||
| 9081598259 | |||
| a135c7e23c | |||
| fb3b0a4312 | |||
| 4240974c81 | |||
| beaaef3208 | |||
| f9e6477114 | |||
| fad4c847e6 | |||
| 5fb19badb3 | |||
| 60d0df6171 | |||
| e031e57f23 | |||
| c919449629 | |||
| 6bfc676bee | |||
| 346b1c8ec6 | |||
| be86d169bf | |||
| ee452d6794 | |||
| e0c660773f | |||
| 0369fa1a25 | |||
| cec7f8e995 | |||
| 64a31982f7 | |||
| 84d20aefd4 | |||
| 7a59e35843 | |||
| fcd7f68831 | |||
| 35e2ac5677 | |||
| ec63fd905d | |||
| 481d4e8e63 | |||
| 321a47b4d3 | |||
| a03b6fdf2c | |||
| 7e04e08bb3 | |||
| 844d6b2d71 | |||
| e7ce12353b | |||
| 4a5557185d | |||
| 7f42441d76 | |||
| 58c668769c | |||
| d35167fc96 | |||
| 949bfbf7ab | |||
| 95182bf539 | |||
| 9934287b2f | |||
| 0967940528 | |||
| e502cb48b1 | |||
| 0442702395 | |||
| cda11cc638 | |||
| 813b0f4454 | |||
| b1588400d5 | |||
| b383492d79 | |||
| 156049cc07 | |||
| bdd455ba56 | |||
| 81d64e414d | |||
| 9b727a9542 | |||
| eec29bb7e3 | |||
| 538fe5de67 | |||
| 578b93af95 | |||
| 1a251ecada | |||
| 882e19aea0 | |||
| 65e36cfe80 | |||
| caccf19e00 | |||
| caff7bd005 | |||
| 9073d31634 | |||
| 7b3314ff57 | |||
| 1d0e92c8e7 | |||
| 23b4bac85b |
@@ -33,4 +33,12 @@ sysinfo.txt
|
||||
|
||||
|
||||
# Packages
|
||||
*.unitypackage
|
||||
*.unitypackage
|
||||
build.app
|
||||
unity.log
|
||||
|
||||
.vs/
|
||||
_Android/
|
||||
_iOS/
|
||||
_WebGL/
|
||||
_Standalone/
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3793e133930146e397ceaa2825b0e59
|
||||
folderAsset: yes
|
||||
timeCreated: 1527743850
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec120f87945eb495c9eaed9dddf97997
|
||||
folderAsset: yes
|
||||
timeCreated: 1527743870
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1 @@
|
||||
./../../../../CHANGELOG.md
|
||||
|
After Width: | Height: | Size: 53 KiB |
@@ -0,0 +1,92 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3b45d5175ff30c42aab20cc35e51f4e
|
||||
timeCreated: 1528468261
|
||||
licenseType: Free
|
||||
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: 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: 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:
|
||||
|
After Width: | Height: | Size: 70 KiB |
@@ -0,0 +1,92 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42fa8c34958b97442a6de1f23f479c99
|
||||
timeCreated: 1528469143
|
||||
licenseType: Free
|
||||
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: 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: 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:
|
||||
@@ -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: 67e572a00c48842ae88b291d09d41b72
|
||||
timeCreated: 1488188288
|
||||
timeCreated: 1527674400
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 177 KiB |
@@ -0,0 +1,185 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 975570a90d56c477582e12d440dc9931
|
||||
timeCreated: 1528964000
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
21300000: old_detail
|
||||
21300002: old_fast
|
||||
21300004: old_medium
|
||||
21300006: UIEffect_Demo_Dark_Silhouette
|
||||
21300008: UIEffect_Demo_Pattern
|
||||
21300010: UIEffect_Demo_red
|
||||
21300012: UIEffect_Demo_Unity-chan
|
||||
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: 2
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: old_detail
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 192
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: old_fast
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 125
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: old_medium
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 288
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_Dark_Silhouette
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 0
|
||||
width: 140
|
||||
height: 121
|
||||
alignment: 0
|
||||
pivot: {x: 70, y: 60.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_red
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 355
|
||||
width: 100
|
||||
height: 100
|
||||
alignment: 0
|
||||
pivot: {x: 50, y: 50}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_Unity-chan
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 112
|
||||
height: 188
|
||||
alignment: 0
|
||||
pivot: {x: 56, y: 94}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
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,7 +275,15 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
m_IsEmpty: 0
|
||||
m_Events:
|
||||
- time: 0.5
|
||||
functionName: Closed
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
--- !u!74 &7450624
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 3
|
||||
@@ -289,22 +303,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 +373,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 +408,7 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7451788
|
||||
AnimationClip:
|
||||
@@ -451,6 +474,7 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7487404
|
||||
AnimationClip:
|
||||
@@ -471,11 +495,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 +511,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 +569,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 +585,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,34 +602,22 @@ 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
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Close
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@@ -615,51 +631,6 @@ AnimatorController:
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &110107960
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Open
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110244674}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &110173032
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110201538}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &110180378
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -707,30 +678,6 @@ AnimatorState:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1102 &110201538
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Closed
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 110107960}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 0
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: 7487404}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1102 &110202250
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
@@ -740,8 +687,7 @@ AnimatorState:
|
||||
m_Name: Close
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 110173032}
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
@@ -789,13 +735,10 @@ AnimatorStateMachine:
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110244674}
|
||||
m_Position: {x: 480, y: 48, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110201538}
|
||||
m_Position: {x: 336, y: -12, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110202250}
|
||||
m_Position: {x: 336, y: 120, z: 0}
|
||||
m_Position: {x: 336, y: 60, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
@@ -805,4 +748,4 @@ AnimatorStateMachine:
|
||||
m_EntryPosition: {x: 144, y: -12, z: 0}
|
||||
m_ExitPosition: {x: 144, y: 108, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 110201538}
|
||||
m_DefaultState: {fileID: 110244674}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class UIEffect_Demo_Dialog : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Animator m_Animator;
|
||||
|
||||
public void Open()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
m_Animator.SetTrigger("Close");
|
||||
}
|
||||
|
||||
public void Closed()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f71afccd9f9454a78bef6d9b225066bf
|
||||
timeCreated: 1525599611
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efc039787ac554a5d9ac2068e70d0c44
|
||||
guid: 6407849c9ce4141a9b34a33fbfef3d78
|
||||
timeCreated: 1502936794
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 529a51ce456fc487db93a64ec7937211
|
||||
timeCreated: 1502934796
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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: 1
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 512
|
||||
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: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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,96 @@ 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}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_RaycastTarget
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
@@ -112,6 +210,24 @@ AnimationClip:
|
||||
classID: 114
|
||||
customType: 24
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 2830261733
|
||||
script: {fileID: 11500000, guid: ce76b7a490bd74f34a2f2752641aea24, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 64967491
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 4228073214
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
@@ -137,22 +253,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 +287,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 +309,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 +328,101 @@ 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}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_RaycastTarget
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!1102 &-1537770706
|
||||
AnimatorState:
|
||||
@@ -251,46 +466,18 @@ AnimationClip:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
|
||||
- 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
|
||||
@@ -298,6 +485,40 @@ AnimationClip:
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
@@ -306,18 +527,18 @@ AnimationClip:
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 304273561
|
||||
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 3305885265
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
classID: 114
|
||||
customType: 24
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 1574349066
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
@@ -343,46 +564,18 @@ AnimationClip:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Color.a
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
|
||||
- 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
|
||||
@@ -390,18 +583,46 @@ AnimationClip:
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: Capture
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7437890
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -421,11 +642,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 +694,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 +711,7 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7450624
|
||||
AnimationClip:
|
||||
@@ -508,22 +732,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 +802,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 +837,7 @@ AnimationClip:
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7451788
|
||||
AnimationClip:
|
||||
@@ -670,13 +903,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
|
||||
|
After Width: | Height: | Size: 953 KiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04b808c8e7e2f114aa6bce179817e3b6
|
||||
timeCreated: 1533229821
|
||||
licenseType: Free
|
||||
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: 0
|
||||
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: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 1.9 MiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8f19718cccf14d4b829474ab19e0c7a
|
||||
timeCreated: 1533229825
|
||||
licenseType: Free
|
||||
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: 0
|
||||
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: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 834 KiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87e2a5102f952174eb7505e5cff15bda
|
||||
timeCreated: 1533231485
|
||||
licenseType: Free
|
||||
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: 0
|
||||
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: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 883 KiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24f06a4f5c47b464e9762d2887848f04
|
||||
timeCreated: 1533231480
|
||||
licenseType: Free
|
||||
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: 0
|
||||
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: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 1.2 MiB |
@@ -0,0 +1,92 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5e1e56d8affdfc47858b4e7000f1d60
|
||||
timeCreated: 1533229376
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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: 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: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
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: 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:
|
||||
@@ -0,0 +1 @@
|
||||
./../../../../LICENSE.txt
|
||||
@@ -59,9 +59,9 @@ Material:
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Set
|
||||
m_Name: UI-Effect-Dissolve-Fill
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: UI_COLOR_SET
|
||||
m_ShaderKeywords: FILL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
@@ -112,9 +112,9 @@ Material:
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Sub
|
||||
m_Name: UI-Effect-Dissolve-Subtract
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: UI_COLOR_SUB
|
||||
m_ShaderKeywords: SUBTRACT
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
@@ -167,7 +167,7 @@ Material:
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Add
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: UI_COLOR_ADD
|
||||
m_ShaderKeywords: ADD
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
@@ -6,8 +6,8 @@ Material:
|
||||
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_Name: UI-Effect-HSV
|
||||
m_Shader: {fileID: 4800000, guid: 7fc74090480c84f8b977cfcd55cdfe82, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
@@ -106,12 +106,6 @@ Material:
|
||||
- first:
|
||||
name: _Parallax
|
||||
second: 0.02
|
||||
- first:
|
||||
name: _ShineLocation
|
||||
second: 0.03
|
||||
- first:
|
||||
name: _ShineWidth
|
||||
second: 0.612
|
||||
- first:
|
||||
name: _SmoothnessTextureChannel
|
||||
second: 0
|
||||
@@ -145,18 +139,6 @@ Material:
|
||||
- first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
- first:
|
||||
name: _alpha
|
||||
second: 0.4
|
||||
- first:
|
||||
name: _angle
|
||||
second: 180
|
||||
- first:
|
||||
name: _factor
|
||||
second: 16.2
|
||||
- first:
|
||||
name: _width
|
||||
second: 9969.5
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
@@ -164,9 +146,3 @@ Material:
|
||||
- first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
- first:
|
||||
name: _effectcolor
|
||||
second: {r: 0.14812386, g: 0, b: 0.9338235, a: 0.441}
|
||||
- first:
|
||||
name: _size
|
||||
second: {r: 112, g: 317, b: 100, a: 1000}
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 151a521e1127048568ae9c062c53bd05
|
||||
timeCreated: 1488199687
|
||||
guid: c8243c28075b3431084ded42f46ad567
|
||||
timeCreated: 1531885800
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
@@ -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}
|
||||
@@ -0,0 +1,942 @@
|
||||
%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-Transition
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords:
|
||||
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}
|
||||
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 &21030718755001428
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Nega
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: NEGA
|
||||
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}
|
||||
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 &21035471806006108
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Cutoff
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: CUTOFF
|
||||
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}
|
||||
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 &21048363040754768
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR
|
||||
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}
|
||||
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 &21103468552951452
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-FastBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FASTBLUR
|
||||
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}
|
||||
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 &21165426070421698
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Sepia
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: SEPIA
|
||||
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}
|
||||
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 &21217090983920726
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Add
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: 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}
|
||||
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 &21397352971802982
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR
|
||||
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}
|
||||
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 &21433706607038904
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Hue
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: HUE
|
||||
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}
|
||||
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 &21436055995319614
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: GRAYSCALE
|
||||
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}
|
||||
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 &21553036001917316
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: MEDIUMBLUR
|
||||
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}
|
||||
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 &21582814526197946
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale-Fill-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL GRAYSCALE MEDIUMBLUR
|
||||
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}
|
||||
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 &21593680702607820
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Cutoff-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: CUTOFF FILL
|
||||
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}
|
||||
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 &21613091319250600
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL
|
||||
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}
|
||||
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 &21640785413581468
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR FILL
|
||||
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}
|
||||
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 &21660598935221184
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL MEDIUMBLUR
|
||||
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}
|
||||
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 &21730298716655380
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Subtract
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: SUBTRACT
|
||||
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}
|
||||
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 &21748420970599250
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fade
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FADE
|
||||
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}
|
||||
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 &21811646848630374
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Pixel
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: PIXEL
|
||||
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}
|
||||
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 &21972152714168334
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL GRAYSCALE
|
||||
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}
|
||||
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: c5d9ba160f4f94fc7b37041671ac013d
|
||||
timeCreated: 1488199687
|
||||
guid: 77a4cc77ec7394415a18f9e5a4b8083e
|
||||
timeCreated: 1532512709
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 59 KiB |
@@ -0,0 +1,100 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a74d3d4a498866d44b094d3d3717604d
|
||||
timeCreated: 1533229728
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04feaefc7cdee4c13abcd553a1a6e3a9
|
||||
folderAsset: yes
|
||||
timeCreated: 1528368324
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public enum BlurMode
|
||||
{
|
||||
None = 0,
|
||||
FastBlur = 1,
|
||||
MediumBlur = 2,
|
||||
DetailBlur = 3,
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e81974d221f13d246b4d1ae292e3181a
|
||||
timeCreated: 1515082276
|
||||
guid: 5645838b01af8764d8f381f04b62b9a2
|
||||
timeCreated: 1528296875
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public enum ColorMode
|
||||
{
|
||||
Multiply = 0,
|
||||
Fill = 1,
|
||||
Add = 2,
|
||||
Subtract = 3,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6ba1e487e0a19644afde2bd5531bd04
|
||||
timeCreated: 1528296875
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Area for effect.
|
||||
/// </summary>
|
||||
public enum EffectArea
|
||||
{
|
||||
RectTransform,
|
||||
Fit,
|
||||
Character,
|
||||
}
|
||||
|
||||
public static class EffectAreaExtensions
|
||||
{
|
||||
static readonly Rect rectForCharacter = new Rect(0, 0, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Gets effect for area.
|
||||
/// </summary>
|
||||
public static Rect GetEffectArea(this EffectArea area, VertexHelper vh, Graphic graphic, float aspectRatio = -1)
|
||||
{
|
||||
Rect rect = default(Rect);
|
||||
switch (area)
|
||||
{
|
||||
case EffectArea.RectTransform:
|
||||
rect = graphic.rectTransform.rect;
|
||||
break;
|
||||
case EffectArea.Character:
|
||||
rect = rectForCharacter;
|
||||
break;
|
||||
case EffectArea.Fit:
|
||||
// Fit to contents.
|
||||
UIVertex vertex = default(UIVertex);
|
||||
rect.xMin = rect.yMin = float.MaxValue;
|
||||
rect.xMax = rect.yMax = float.MinValue;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
rect.xMin = Mathf.Min(rect.xMin, vertex.position.x);
|
||||
rect.yMin = Mathf.Min(rect.yMin, vertex.position.y);
|
||||
rect.xMax = Mathf.Max(rect.xMax, vertex.position.x);
|
||||
rect.yMax = Mathf.Max(rect.yMax, vertex.position.y);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
rect = graphic.rectTransform.rect;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(0 < aspectRatio)
|
||||
{
|
||||
if (rect.width < rect.height)
|
||||
{
|
||||
rect.width = rect.height * aspectRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.height = rect.width / aspectRatio;
|
||||
}
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a78f43d1382a048a99411472ca714e1b
|
||||
timeCreated: 1528636556
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class MaterialCache
|
||||
{
|
||||
public ulong hash { get; private set; }
|
||||
public int referenceCount { get; private set; }
|
||||
public Texture texture { get; private set; }
|
||||
public Material material { get; private set; }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
static void ClearCache()
|
||||
{
|
||||
materialCache.Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
public static List<MaterialCache> materialCache = new List<MaterialCache>();
|
||||
|
||||
public static MaterialCache Register(ulong hash, Texture texture, System.Func<Material> onCreateMaterial)
|
||||
{
|
||||
var cache = materialCache.FirstOrDefault(x => x.hash == hash);
|
||||
if (cache != null)
|
||||
{
|
||||
cache.referenceCount++;
|
||||
}
|
||||
if (cache == null)
|
||||
{
|
||||
cache = new MaterialCache()
|
||||
{
|
||||
hash = hash,
|
||||
texture = texture,
|
||||
material = onCreateMaterial(),
|
||||
referenceCount = 1,
|
||||
};
|
||||
materialCache.Add(cache);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
public static void Unregister(MaterialCache cache)
|
||||
{
|
||||
if (cache == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
cache.referenceCount--;
|
||||
if (cache.referenceCount <= 0)
|
||||
{
|
||||
MaterialCache.materialCache.Remove(cache);
|
||||
cache.material = null;
|
||||
cache.texture = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2160d2c55a6100642b6c7ba09df935da
|
||||
timeCreated: 1528509206
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,117 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class MaterialResolver
|
||||
{
|
||||
static readonly StringBuilder s_StringBuilder = new StringBuilder ();
|
||||
|
||||
static readonly Dictionary<string, Material> s_MaterialMap = new Dictionary<string, Material> ();
|
||||
|
||||
public static Material GetOrGenerateMaterialVariant (Shader shader, params object[] append)
|
||||
{
|
||||
if (!shader) {
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] keywords = append.Where (x => 0 < (int)x)
|
||||
.Select (x => x.ToString ().ToUpper ())
|
||||
.ToArray ();
|
||||
Material mat = GetMaterial (shader, append);
|
||||
if (mat) {
|
||||
if(!mat.shaderKeywords.OrderBy(x=>x).SequenceEqual(keywords.OrderBy(x=>x)))
|
||||
{
|
||||
mat.shaderKeywords = keywords;
|
||||
EditorUtility.SetDirty (mat);
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
}
|
||||
}
|
||||
return mat;
|
||||
}
|
||||
|
||||
string variantName = GetVariantName (shader, append);
|
||||
if(s_MaterialMap.TryGetValue(variantName, out mat) && mat)
|
||||
{
|
||||
return mat;
|
||||
}
|
||||
|
||||
Debug.Log ("Generate material : " + variantName);
|
||||
mat = new Material (shader);
|
||||
mat.shaderKeywords = keywords;
|
||||
|
||||
mat.name = variantName;
|
||||
mat.hideFlags |= HideFlags.NotEditable;
|
||||
s_MaterialMap [variantName] = mat;
|
||||
|
||||
bool isMainAsset = append.Cast<int> ().All (x => x == 0);
|
||||
EditorApplication.delayCall += () => SaveMaterial (mat, shader, isMainAsset);
|
||||
return mat;
|
||||
}
|
||||
|
||||
static void SaveMaterial (Material mat, Shader shader, bool isMainAsset)
|
||||
{
|
||||
string materialPath = GetDefaultMaterialPath (shader);
|
||||
|
||||
#if UIEFFECT_SEPARATE
|
||||
string dir = Path.GetDirectoryName(materialPath);
|
||||
materialPath = Path.Combine(Path.Combine(dir, "Separated"), mat.name + ".mat");
|
||||
isMainAsset = true;
|
||||
#endif
|
||||
if (isMainAsset)
|
||||
{
|
||||
Directory.CreateDirectory (Path.GetDirectoryName (materialPath));
|
||||
AssetDatabase.CreateAsset (mat, materialPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetOrGenerateMaterialVariant (shader);
|
||||
mat.hideFlags |= HideFlags.HideInHierarchy;
|
||||
AssetDatabase.AddObjectToAsset (mat, materialPath);
|
||||
}
|
||||
AssetDatabase.SaveAssets ();
|
||||
}
|
||||
|
||||
public static Material GetMaterial (Shader shader, params object[] append)
|
||||
{
|
||||
string variantName = GetVariantName (shader, append);
|
||||
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/" + name + ".mat");
|
||||
}
|
||||
|
||||
public static string GetVariantName (Shader shader, params object[] append)
|
||||
{
|
||||
s_StringBuilder.Length = 0;
|
||||
|
||||
#if UIEFFECT_SEPARATE
|
||||
s_StringBuilder.Append("[Separated] ");
|
||||
#endif
|
||||
s_StringBuilder.Append (Path.GetFileName (shader.name));
|
||||
foreach (object mode in append.Where(x=>0<(int)x)) {
|
||||
s_StringBuilder.Append ("-");
|
||||
s_StringBuilder.Append (mode.ToString ());
|
||||
}
|
||||
return s_StringBuilder.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70261fa2760d4c040ac28aebb1f155fb
|
||||
timeCreated: 1528297353
|
||||
licenseType: Free
|
||||
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,14 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Shadow effect style.
|
||||
/// </summary>
|
||||
public enum ShadowStyle
|
||||
{
|
||||
None = 0,
|
||||
Shadow,
|
||||
Outline,
|
||||
Outline8,
|
||||
Shadow3,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0eda5bf10146491c9cfe6a31c66f9a7
|
||||
timeCreated: 1528296875
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public enum ToneMode
|
||||
{
|
||||
None = 0,
|
||||
Grayscale = 1,
|
||||
Sepia = 2,
|
||||
Nega = 3,
|
||||
Pixel = 4,
|
||||
Mono = 5,
|
||||
Cutoff = 6,
|
||||
Hue = 7,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 092769547c242d74cbad96631a00963f
|
||||
timeCreated: 1528296875
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,98 @@
|
||||
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
|
||||
{
|
||||
protected static readonly Vector2[] splitedCharacterPosition = { Vector2.up, Vector2.one, Vector2.right, Vector2.zero };
|
||||
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; } }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
OnValidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the validate event.
|
||||
/// </summary>
|
||||
protected override void OnValidate ()
|
||||
{
|
||||
var mat = GetMaterial();
|
||||
if (m_EffectMaterial != mat)
|
||||
{
|
||||
m_EffectMaterial = mat;
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
ModifyMaterial();
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected virtual Material GetMaterial()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
public virtual void ModifyMaterial()
|
||||
{
|
||||
targetGraphic.material = isActiveAndEnabled ? m_EffectMaterial : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
ModifyMaterial();
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the behaviour becomes disabled () or inactive.
|
||||
/// </summary>
|
||||
protected override void OnDisable()
|
||||
{
|
||||
ModifyMaterial();
|
||||
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:
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4961e148a8cd4fe0b84dddc2741894a
|
||||
timeCreated: 1487152293
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -18,9 +18,9 @@ namespace Coffee.UIExtensions
|
||||
|
||||
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),
|
||||
Fast = (DesamplingRate.x2 << 0) + (DesamplingRate.x2 << 4) + (FilterMode.Bilinear << 8) + (2 << 10),
|
||||
Medium = (DesamplingRate.x1 << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (3 << 10),
|
||||
Detail = (DesamplingRate.None << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (5 << 10),
|
||||
Custom = -1,
|
||||
}
|
||||
|
||||
@@ -40,11 +40,14 @@ namespace Coffee.UIExtensions
|
||||
_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");
|
||||
|
||||
_spIterations = serializedObject.FindProperty("m_BlurIterations");
|
||||
_spKeepSizeToRootCanvas = serializedObject.FindProperty("m_FitToScreen");
|
||||
_spTargetTexture = serializedObject.FindProperty("m_TargetTexture");
|
||||
_spBlurMode = serializedObject.FindProperty("m_BlurMode");
|
||||
_spCaptureOnEnable = serializedObject.FindProperty("m_CaptureOnEnable");
|
||||
|
||||
_customAdvancedOption = (qualityMode == QualityMode.Custom);
|
||||
|
||||
_customAdvancedOption = (qualityMode == QualityMode.Custom) || _spTargetTexture.objectReferenceValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,6 +55,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var graphic = (target as UIEffectCapturedImage);
|
||||
serializedObject.Update();
|
||||
|
||||
//================
|
||||
@@ -74,24 +78,45 @@ namespace Coffee.UIExtensions
|
||||
GUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Advanced Option", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.PropertyField(_spCaptureOnEnable);// CaptureOnEnable.
|
||||
EditorGUILayout.PropertyField(_spKeepSizeToRootCanvas);// Keep Graphic Size To RootCanvas.
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
QualityMode quality = qualityMode;
|
||||
quality = (QualityMode)EditorGUILayout.EnumPopup("Quality Mode", quality);
|
||||
if(EditorGUI.EndChangeCheck())
|
||||
{
|
||||
_customAdvancedOption = (quality == QualityMode.Custom);
|
||||
_customAdvancedOption = (quality == QualityMode.Custom) || _spTargetTexture.objectReferenceValue;
|
||||
qualityMode = quality;
|
||||
}
|
||||
|
||||
// When qualityMode is `Custom`, show advanced option.
|
||||
if (_customAdvancedOption)
|
||||
{
|
||||
DrawDesamplingRate(_spDesamplingRate);// Desampling rate.
|
||||
if(_spBlurMode.intValue != 0)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spIterations);// Iterations.
|
||||
}
|
||||
DrawDesamplingRate(_spReductionRate);// Reduction rate.
|
||||
EditorGUILayout.PropertyField(_spFilterMode);// Filter Mode.
|
||||
EditorGUILayout.PropertyField(_spIterations);// Iterations.
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Result Texture Setting", EditorStyles.boldLabel);
|
||||
|
||||
if(!_spTargetTexture.objectReferenceValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spFilterMode);// Filter Mode.
|
||||
DrawDesamplingRate(_spDesamplingRate);// Desampling rate.
|
||||
}
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spTargetTexture);// Target Texture.
|
||||
Texture t = _spTargetTexture.objectReferenceValue as Texture;
|
||||
if (t)
|
||||
{
|
||||
GUILayout.Label(string.Format("{0}x{1}", t.width, t.height), EditorStyles.miniLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUILayout.PropertyField(_spKeepSizeToRootCanvas);// Iterations.
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
@@ -101,13 +126,35 @@ namespace Coffee.UIExtensions
|
||||
GUILayout.Label("Debug");
|
||||
|
||||
if (GUILayout.Button("Capture", "ButtonLeft"))
|
||||
UpdateTexture(true);
|
||||
{
|
||||
graphic.Release();
|
||||
EditorApplication.delayCall += graphic.Capture;
|
||||
}
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!(target as UIEffectCapturedImage).capturedTexture);
|
||||
if (GUILayout.Button("Release", "ButtonRight"))
|
||||
UpdateTexture(false);
|
||||
{
|
||||
graphic.Release();
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
// Warning message for overlay rendering.
|
||||
if(graphic && graphic.canvas)
|
||||
{
|
||||
var canvas = graphic.canvas.rootCanvas;
|
||||
if( canvas && canvas.renderMode == RenderMode.WorldSpace)
|
||||
{
|
||||
using (new GUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.HelpBox("'WorldSpace - Camera' render modes is not supported. Change render mode of root canvas.", MessageType.Warning);
|
||||
if (GUILayout.Button("Canvas"))
|
||||
{
|
||||
Selection.activeGameObject = canvas.gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//################################
|
||||
@@ -122,8 +169,11 @@ namespace Coffee.UIExtensions
|
||||
SerializedProperty _spDesamplingRate;
|
||||
SerializedProperty _spReductionRate;
|
||||
SerializedProperty _spFilterMode;
|
||||
SerializedProperty _spBlurMode;
|
||||
SerializedProperty _spIterations;
|
||||
SerializedProperty _spKeepSizeToRootCanvas;
|
||||
SerializedProperty _spTargetTexture;
|
||||
SerializedProperty _spCaptureOnEnable;
|
||||
|
||||
QualityMode qualityMode
|
||||
{
|
||||
@@ -165,20 +215,5 @@ namespace Coffee.UIExtensions
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace Coffee.UIExtensions
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When tone is enable, show parameters.
|
||||
if (spToneMode.intValue != (int)UIEffect.ToneMode.None)
|
||||
if (spToneMode.intValue != (int)ToneMode.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ToneLevel"));
|
||||
@@ -54,7 +54,7 @@ namespace Coffee.UIExtensions
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When color is enable, show parameters.
|
||||
if (spColorMode.intValue != (int)UIEffect.ColorMode.None)
|
||||
if (spColorMode.intValue != (int)ColorMode.Multiply)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectColor"));
|
||||
@@ -70,26 +70,26 @@ namespace Coffee.UIExtensions
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When blur is enable, show parameters.
|
||||
if (spBlurMode.intValue != (int)UIEffect.BlurMode.None)
|
||||
if (spBlurMode.intValue != (int)BlurMode.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Blur"));
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Set effect material.
|
||||
if (!serializedObject.isEditingMultipleObjects && spToneMode.intValue == 0 && spColorMode.intValue == 0 && spBlurMode.intValue == 0)
|
||||
{
|
||||
spMaterial.objectReferenceValue = null;
|
||||
}
|
||||
else if (changed || !serializedObject.isEditingMultipleObjects)
|
||||
{
|
||||
spMaterial.objectReferenceValue = UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName),
|
||||
(UIEffect.ToneMode)spToneMode.intValue,
|
||||
(UIEffect.ColorMode)spColorMode.intValue,
|
||||
(UIEffect.BlurMode)spBlurMode.intValue
|
||||
);
|
||||
}
|
||||
// // Set effect material.
|
||||
// if (!serializedObject.isEditingMultipleObjects && spToneMode.intValue == 0 && spColorMode.intValue == 0 && spBlurMode.intValue == 0)
|
||||
// {
|
||||
// spMaterial.objectReferenceValue = null;
|
||||
// }
|
||||
// else if (changed || !serializedObject.isEditingMultipleObjects)
|
||||
// {
|
||||
// spMaterial.objectReferenceValue = UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName),
|
||||
// (UIEffect.ToneMode)spToneMode.intValue,
|
||||
// (UIEffect.ColorMode)spColorMode.intValue,
|
||||
// (UIEffect.BlurMode)spBlurMode.intValue
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
//################################
|
||||
@@ -132,7 +132,7 @@ namespace Coffee.UIExtensions
|
||||
{
|
||||
_spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
|
||||
var element = _spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
|
||||
element.FindPropertyRelative("shadowMode").intValue = (int)UIEffect.ShadowStyle.Shadow;
|
||||
element.FindPropertyRelative("shadowMode").intValue = (int)ShadowStyle.Shadow;
|
||||
element.FindPropertyRelative("shadowColor").colorValue = Color.black;
|
||||
element.FindPropertyRelative("effectDistance").vector2Value = new Vector2(1f, -1f);
|
||||
element.FindPropertyRelative("useGraphicAlpha").boolValue = true;
|
||||
@@ -142,10 +142,10 @@ namespace Coffee.UIExtensions
|
||||
float ElementHeightCallback(int index)
|
||||
{
|
||||
var element = _spAdditionalShadows.GetArrayElementAtIndex(index);
|
||||
if (element.FindPropertyRelative("shadowMode").intValue == (int)UIEffect.ShadowStyle.None)
|
||||
if (element.FindPropertyRelative("shadowMode").intValue == (int)ShadowStyle.None)
|
||||
return 16;
|
||||
|
||||
return (_spBlurMode.intValue == (int)UIEffect.BlurMode.None ? 66 : 84) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
return (_spBlurMode.intValue == (int)BlurMode.None ? 66 : 84) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -159,7 +159,7 @@ namespace Coffee.UIExtensions
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
var spMode = sp.FindPropertyRelative("shadowMode");
|
||||
EditorGUI.PropertyField(r, spMode);
|
||||
if (spMode.intValue == (int)UIEffect.ShadowStyle.None)
|
||||
if (spMode.intValue == (int)ShadowStyle.None)
|
||||
return;
|
||||
|
||||
r.y += r.height;
|
||||
@@ -169,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)BlurMode.None)
|
||||
{
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("shadowBlur"));
|
||||
@@ -209,14 +209,14 @@ namespace Coffee.UIExtensions
|
||||
EditorGUILayout.PropertyField(spShadowMode);
|
||||
|
||||
// When shadow is enable, show parameters.
|
||||
if (spShadowMode.intValue != (int)UIEffect.ShadowStyle.None)
|
||||
if (spShadowMode.intValue != (int)ShadowStyle.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectDistance"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowColor"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_UseGraphicAlpha"));
|
||||
|
||||
if (_spBlurMode.intValue != (int)UIEffect.BlurMode.None)
|
||||
if (_spBlurMode.intValue != (int)BlurMode.None)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowBlur"));
|
||||
}
|
||||
@@ -231,7 +231,7 @@ namespace Coffee.UIExtensions
|
||||
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)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)ShadowStyle.None)
|
||||
return 16;
|
||||
|
||||
return (uiEffect && uiEffect.blurMode != 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)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 != 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)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 != 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,80 @@
|
||||
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(); } }
|
||||
|
||||
/// <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,319 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Dissolve effect for uGUI.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
public class UIDissolve : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// 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] ColorMode m_ColorMode = ColorMode.Add;
|
||||
[SerializeField] Texture m_NoiseTexture;
|
||||
[SerializeField] protected EffectArea m_EffectArea;
|
||||
[SerializeField] bool m_KeepAspectRatio;
|
||||
[Header("Play Effect")]
|
||||
[SerializeField] bool m_Play = false;
|
||||
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
|
||||
[SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
|
||||
/// <summary>
|
||||
/// Current location[0-1] for dissolve effect. 0 is not dissolved, 1 is completely dissolved.
|
||||
/// </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>
|
||||
/// Noise texture.
|
||||
/// </summary>
|
||||
public Texture noiseTexture
|
||||
{
|
||||
get { return m_NoiseTexture ?? graphic.material.GetTexture("_NoiseTex"); }
|
||||
set
|
||||
{
|
||||
if (m_NoiseTexture != value)
|
||||
{
|
||||
m_NoiseTexture = value;
|
||||
if (graphic)
|
||||
{
|
||||
ModifyMaterial();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The area for effect.
|
||||
/// </summary>
|
||||
public EffectArea effectArea
|
||||
{
|
||||
get { return m_EffectArea; }
|
||||
set
|
||||
{
|
||||
if (m_EffectArea != value)
|
||||
{
|
||||
m_EffectArea = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Keep aspect ratio.
|
||||
/// </summary>
|
||||
public bool keepAspectRatio
|
||||
{
|
||||
get { return m_KeepAspectRatio; }
|
||||
set
|
||||
{
|
||||
if (m_KeepAspectRatio != value)
|
||||
{
|
||||
m_KeepAspectRatio = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <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>
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
public override void ModifyMaterial()
|
||||
{
|
||||
ulong hash = (m_NoiseTexture ? (uint)m_NoiseTexture.GetInstanceID() : 0) + ((ulong)m_ColorMode << 32);
|
||||
if (_materialCache != null && (_materialCache.hash != hash || !isActiveAndEnabled || !m_EffectMaterial))
|
||||
{
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled || !m_EffectMaterial)
|
||||
{
|
||||
graphic.material = null;
|
||||
}
|
||||
else if (!m_NoiseTexture)
|
||||
{
|
||||
graphic.material = m_EffectMaterial;
|
||||
}
|
||||
else if (_materialCache != null && _materialCache.hash == hash)
|
||||
{
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
else
|
||||
{
|
||||
_materialCache = MaterialCache.Register(hash, m_NoiseTexture, () =>
|
||||
{
|
||||
var mat = new Material(m_EffectMaterial);
|
||||
mat.SetTexture("_NoiseTex", m_NoiseTexture);
|
||||
return mat;
|
||||
});
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
return;
|
||||
|
||||
// rect.
|
||||
var tex = noiseTexture;
|
||||
var aspectRatio = m_KeepAspectRatio && tex ? ((float)tex.width) / tex.height : -1;
|
||||
Rect rect = m_EffectArea.GetEffectArea(vh, graphic, aspectRatio);
|
||||
|
||||
// Calculate vertex position.
|
||||
UIVertex vertex = default(UIVertex);
|
||||
bool effectEachCharacter = graphic is Text && m_EffectArea == EffectArea.Character;
|
||||
float x, y;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
|
||||
if (effectEachCharacter)
|
||||
{
|
||||
x = splitedCharacterPosition[i%4].x;
|
||||
y = splitedCharacterPosition[i%4].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = Mathf.Clamp01(vertex.position.x / rect.width + 0.5f);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Protected Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
_time = 0;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ColorMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
MaterialCache _materialCache = null;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,477 @@
|
||||
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 UIEffect : UIEffectBase
|
||||
{
|
||||
/// <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 shadowBlur = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle shadowMode = ShadowStyle.Shadow;
|
||||
|
||||
/// <summary>
|
||||
/// Color for the shadow effect.
|
||||
/// </summary>
|
||||
public Color shadowColor = 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.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect";
|
||||
|
||||
// /// <summary>
|
||||
// /// Tone effect mode.
|
||||
// /// </summary>
|
||||
// public enum ToneMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Grayscale,
|
||||
// Sepia,
|
||||
// Nega,
|
||||
// Pixel,
|
||||
// Mono,
|
||||
// Cutoff,
|
||||
// Hue,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Color effect mode.
|
||||
// /// </summary>
|
||||
// public enum ColorMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Set,
|
||||
// Add,
|
||||
// Sub,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Shadow effect style.
|
||||
// /// </summary>
|
||||
// public enum ShadowStyle
|
||||
// {
|
||||
// None = 0,
|
||||
// Shadow,
|
||||
// Outline,
|
||||
// Outline8,
|
||||
// Shadow3,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Blur effect mode.
|
||||
// /// </summary>
|
||||
// public enum BlurMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Fast,
|
||||
// Medium,
|
||||
// Detail,
|
||||
// }
|
||||
//
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField][Range(0, 1)] float m_ToneLevel = 1;
|
||||
[SerializeField][Range(0, 1)] float m_Blur = 0.25f;
|
||||
[SerializeField][Range(0, 1)] float m_ShadowBlur = 0.25f;
|
||||
[SerializeField] ShadowStyle m_ShadowStyle;
|
||||
[SerializeField] ToneMode m_ToneMode;
|
||||
[SerializeField] ColorMode m_ColorMode;
|
||||
[SerializeField] BlurMode m_BlurMode;
|
||||
[SerializeField] Color m_ShadowColor = Color.black;
|
||||
[SerializeField] Vector2 m_EffectDistance = new Vector2(1f, -1f);
|
||||
[SerializeField] bool m_UseGraphicAlpha = true;
|
||||
[SerializeField] Color m_EffectColor = Color.white;
|
||||
[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(); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring from the graphic.
|
||||
/// </summary>
|
||||
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, 1); SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle shadowStyle { get { return m_ShadowStyle; } set { m_ShadowStyle = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Tone effect mode.
|
||||
/// </summary>
|
||||
public ToneMode toneMode { get { return m_ToneMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public BlurMode blurMode { get { return m_BlurMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color for the shadow effect.
|
||||
/// </summary>
|
||||
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(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Should the shadow inherit the alpha from the graphic?
|
||||
/// </summary>
|
||||
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>
|
||||
/// Additional Shadows.
|
||||
/// </summary>
|
||||
public List<AdditionalShadow> additionalShadows { get { return m_AdditionalShadows; } }
|
||||
|
||||
/// <summary>
|
||||
/// Custom effect factor.
|
||||
/// </summary>
|
||||
public Vector4 customFactor { get { return m_CustomFactor; } set { m_CustomFactor = value; SetDirty(); } }
|
||||
|
||||
/// <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(
|
||||
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 < tempVerts.Count; i++)
|
||||
{
|
||||
vt = tempVerts[i];
|
||||
|
||||
// Set UIEffect prameters to vertex.
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
//================================
|
||||
// Append shadow vertices.
|
||||
//================================
|
||||
{
|
||||
var inputVertCount = tempVerts.Count;
|
||||
var start = 0;
|
||||
var end = inputVertCount;
|
||||
|
||||
// Additional Shadows.
|
||||
for (int i = additionalShadows.Count - 1; 0 <= i; i--)
|
||||
{
|
||||
AdditionalShadow shadow = additionalShadows[i];
|
||||
_ApplyShadow(tempVerts, ref start, ref end, shadow.shadowMode, toneLevel, shadow.shadowBlur, shadow.effectDistance, shadow.shadowColor, shadow.useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Shadow.
|
||||
_ApplyShadow(tempVerts, ref start, ref end, shadowStyle, toneLevel, shadowBlur, effectDistance, shadowColor, useGraphicAlpha);
|
||||
}
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
|
||||
tempVerts.Clear();
|
||||
}
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
//
|
||||
// protected override void OnValidate ()
|
||||
// {
|
||||
// base.OnValidate ();
|
||||
// EditorApplication.delayCall += () => UpdateMaterial(false);
|
||||
// }
|
||||
//
|
||||
// public override void OnAfterDeserialize()
|
||||
// {
|
||||
// if (!m_CustomEffect)
|
||||
// {
|
||||
// EditorApplication.delayCall += () => UpdateMaterial (true);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void UpdateMaterial(bool onlyEditMode)
|
||||
// {
|
||||
// if(!this || onlyEditMode && Application.isPlaying)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// 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(targetGraphic);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// public static Material GetOrGenerateMaterialVariant(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
|
||||
// {
|
||||
// if (!shader)
|
||||
// return null;
|
||||
//
|
||||
// Material mat = GetMaterial(shader, tone, color, blur);
|
||||
//
|
||||
// if (!mat)
|
||||
// {
|
||||
// Debug.Log("Generate material : " + GetVariantName(shader, tone, color, blur));
|
||||
// mat = new Material(shader);
|
||||
//
|
||||
// if (0 < tone)
|
||||
// mat.EnableKeyword("" + tone.ToString().ToUpper());
|
||||
// if (0 < color)
|
||||
// mat.EnableKeyword("UI_COLOR_" + color.ToString().ToUpper());
|
||||
// if (0 < blur)
|
||||
// mat.EnableKeyword("UI_BLUR_" + blur.ToString().ToUpper());
|
||||
//
|
||||
// mat.name = GetVariantName(shader, tone, color, blur);
|
||||
// mat.hideFlags |= HideFlags.NotEditable;
|
||||
//
|
||||
//#if UIEFFECT_SEPARATE
|
||||
// bool isMainAsset = true;
|
||||
// string dir = Path.GetDirectoryName(GetDefaultMaterialPath (shader));
|
||||
// string materialPath = Path.Combine(Path.Combine(dir, "Separated"), mat.name + ".mat");
|
||||
//#else
|
||||
// bool isMainAsset = (0 == tone) && (0 == color) && (0 == blur);
|
||||
// string materialPath = GetDefaultMaterialPath (shader);
|
||||
//#endif
|
||||
// if (isMainAsset)
|
||||
// {
|
||||
// Directory.CreateDirectory(Path.GetDirectoryName(materialPath));
|
||||
// AssetDatabase.CreateAsset(mat, materialPath);
|
||||
// AssetDatabase.SaveAssets();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// mat.hideFlags |= HideFlags.HideInHierarchy;
|
||||
// AssetDatabase.AddObjectToAsset(mat, materialPath);
|
||||
// }
|
||||
// }
|
||||
// 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/Coffee/UIExtensions/UIEffect/Materials/" + name + ".mat");
|
||||
// }
|
||||
//
|
||||
// public static string GetVariantName(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
|
||||
// {
|
||||
// return
|
||||
//#if UIEFFECT_SEPARATE
|
||||
// "[Separated] " + Path.GetFileName(shader.name)
|
||||
//#else
|
||||
// Path.GetFileName(shader.name)
|
||||
//#endif
|
||||
// + (0 < tone ? "-" + tone : "")
|
||||
// + (0 < color ? "-" + color : "")
|
||||
// + (0 < blur ? "-" + blur : "");
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial ()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ToneMode, m_ColorMode, m_BlurMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
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(
|
||||
Packer.ToFloat(toneLevel, 0, blur, 0),
|
||||
Packer.ToFloat(color.r, color.g, color.b, 1)
|
||||
);
|
||||
|
||||
// Append Shadow.
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
|
||||
// Append Shadow3.
|
||||
if (ShadowStyle.Shadow3 == mode)
|
||||
{
|
||||
_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(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(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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
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;
|
||||
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;
|
||||
|
||||
if(colorMode != ColorMode.Multiply)
|
||||
{
|
||||
vertColor.r = vertColor.g = vertColor.b = 1;
|
||||
}
|
||||
|
||||
vertColor.a = useGraphicAlpha ? color.a * vt.color.a / 255 : color.a;
|
||||
vt.color = vertColor;
|
||||
|
||||
// Set UIEffect prameters to vertex.
|
||||
vt.uv1 = factor;
|
||||
verts[i] = vt;
|
||||
}
|
||||
|
||||
// Update next shadow offset.
|
||||
start = end;
|
||||
end = verts.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,499 @@
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffectCapturedImage
|
||||
/// </summary>
|
||||
public class UIEffectCapturedImage : RawImage
|
||||
#if UNITY_EDITOR
|
||||
, ISerializationCallbackReceiver
|
||||
#endif
|
||||
{
|
||||
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-EffectCapture";
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate.
|
||||
/// </summary>
|
||||
public enum DesamplingRate
|
||||
{
|
||||
None = 0,
|
||||
x1 = 1,
|
||||
x2 = 2,
|
||||
x4 = 4,
|
||||
x8 = 8,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField][Range(0, 1)] float m_ToneLevel = 1;
|
||||
[SerializeField][Range(0, 1)] float m_Blur = 0;
|
||||
[SerializeField] ToneMode m_ToneMode;
|
||||
[SerializeField] ColorMode m_ColorMode;
|
||||
[SerializeField] BlurMode m_BlurMode;
|
||||
[SerializeField] Color m_EffectColor = Color.white;
|
||||
[SerializeField] DesamplingRate m_DesamplingRate;
|
||||
[SerializeField] DesamplingRate m_ReductionRate;
|
||||
[SerializeField] FilterMode m_FilterMode = FilterMode.Bilinear;
|
||||
[SerializeField] Material m_EffectMaterial;
|
||||
[FormerlySerializedAs("m_Iterations")]
|
||||
[SerializeField][Range(1, 8)] int m_BlurIterations = 1;
|
||||
[FormerlySerializedAs("m_KeepCanvasSize")]
|
||||
[SerializeField] bool m_FitToScreen = true;
|
||||
[SerializeField] RenderTexture m_TargetTexture;
|
||||
[SerializeField] bool m_CaptureOnEnable = false;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <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); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring from the graphic.
|
||||
/// </summary>
|
||||
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 4); } }
|
||||
|
||||
/// <summary>
|
||||
/// Tone effect mode.
|
||||
/// </summary>
|
||||
public ToneMode toneMode { get { return m_ToneMode; } set { m_ToneMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } set { m_ColorMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public BlurMode blurMode { get { return m_BlurMode; } set { m_BlurMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color for the color effect.
|
||||
/// </summary>
|
||||
public Color effectColor { get { return m_EffectColor; } set { m_EffectColor = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Effect material.
|
||||
/// </summary>
|
||||
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate of the generated RenderTexture.
|
||||
/// </summary>
|
||||
public DesamplingRate desamplingRate { get { return m_DesamplingRate; } set { m_DesamplingRate = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate of reduction buffer to apply effect.
|
||||
/// </summary>
|
||||
public DesamplingRate reductionRate { get { return m_ReductionRate; } set { m_ReductionRate = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// FilterMode for capture.
|
||||
/// </summary>
|
||||
public FilterMode filterMode { get { return m_FilterMode; } set { m_FilterMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Captured texture.
|
||||
/// </summary>
|
||||
public RenderTexture capturedTexture { get { return m_TargetTexture ? m_TargetTexture : _rt; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur iterations.
|
||||
/// </summary>
|
||||
[System.Obsolete("Use blurIterations instead (UnityUpgradable) -> blurIterations")]
|
||||
public int iterations { get { return m_BlurIterations; } set { m_BlurIterations = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur iterations.
|
||||
/// </summary>
|
||||
public int blurIterations { get { return m_BlurIterations; } set { m_BlurIterations = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Fits graphic size to screen.
|
||||
/// </summary>
|
||||
[System.Obsolete("Use fitToScreen instead (UnityUpgradable) -> fitToScreen")]
|
||||
public bool keepCanvasSize { get { return m_FitToScreen; } set { m_FitToScreen = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Fits graphic size to screen.
|
||||
/// </summary>
|
||||
public bool fitToScreen { get { return m_FitToScreen; } set { m_FitToScreen = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Target RenderTexture to capture.
|
||||
/// </summary>
|
||||
public RenderTexture targetTexture { get { return m_TargetTexture; } set { m_TargetTexture = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if (m_CaptureOnEnable && Application.isPlaying)
|
||||
{
|
||||
Capture();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
if (m_CaptureOnEnable && Application.isPlaying)
|
||||
{
|
||||
_Release(false);
|
||||
texture = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the MonoBehaviour will be destroyed.
|
||||
/// </summary>
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
Release();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback function when a UI element needs to generate vertices.
|
||||
/// </summary>
|
||||
protected override void OnPopulateMesh(VertexHelper vh)
|
||||
{
|
||||
// When not displaying, clear vertex.
|
||||
if (texture == null || effectColor.a < 1 / 255f || canvasRenderer.GetAlpha() < 1 / 255f)
|
||||
vh.Clear();
|
||||
else
|
||||
base.OnPopulateMesh(vh);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the desampling.
|
||||
/// </summary>
|
||||
public void GetDesamplingSize(DesamplingRate rate, out int w, out int h)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
var res = UnityEditor.UnityStats.screenRes.Split('x');
|
||||
w = int.Parse(res[0]);
|
||||
h = int.Parse(res[1]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
w = Screen.width;
|
||||
h = Screen.height;
|
||||
}
|
||||
|
||||
if (rate == DesamplingRate.None)
|
||||
return;
|
||||
|
||||
float aspect = (float)w / h;
|
||||
if (w < h)
|
||||
{
|
||||
h = Mathf.ClosestPowerOfTwo(h / (int)rate);
|
||||
w = Mathf.CeilToInt(h * aspect);
|
||||
}
|
||||
else
|
||||
{
|
||||
w = Mathf.ClosestPowerOfTwo(w / (int)rate);
|
||||
h = Mathf.CeilToInt(w / aspect);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Capture rendering result.
|
||||
/// </summary>
|
||||
public void Capture()
|
||||
{
|
||||
// Fit to screen.
|
||||
var rootCanvas = canvas.rootCanvas;
|
||||
if (m_FitToScreen)
|
||||
{
|
||||
var rootTransform = rootCanvas.transform as RectTransform;
|
||||
var size = rootTransform.rect.size;
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size.x);
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size.y);
|
||||
rectTransform.position = rootTransform.position;
|
||||
}
|
||||
|
||||
// Cache some ids.
|
||||
if (s_CopyId == 0)
|
||||
{
|
||||
s_CopyId = Shader.PropertyToID("_UIEffectCapturedImage_ScreenCopyId");
|
||||
s_EffectId1 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId1");
|
||||
s_EffectId2 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId2");
|
||||
|
||||
s_EffectFactorId = Shader.PropertyToID("_EffectFactor");
|
||||
s_ColorFactorId = Shader.PropertyToID("_ColorFactor");
|
||||
s_CommandBuffer = new CommandBuffer();
|
||||
}
|
||||
|
||||
// If target texture exists, release result RT.
|
||||
if (m_TargetTexture)
|
||||
{
|
||||
_Release(ref _rt);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If size of result RT has changed, release it.
|
||||
int w, h;
|
||||
GetDesamplingSize (m_DesamplingRate, out w, out h);
|
||||
if (_rt && (_rt.width != w || _rt.height != h))
|
||||
{
|
||||
_Release (ref _rt);
|
||||
}
|
||||
|
||||
// Generate RT for result.
|
||||
if (_rt == null)
|
||||
{
|
||||
_rt = new RenderTexture(w, h, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default);
|
||||
_rt.filterMode = m_FilterMode;
|
||||
_rt.useMipMap = false;
|
||||
_rt.wrapMode = TextureWrapMode.Clamp;
|
||||
_rt.hideFlags = HideFlags.HideAndDontSave;
|
||||
}
|
||||
}
|
||||
SetupCommandBuffer();
|
||||
}
|
||||
|
||||
void SetupCommandBuffer()
|
||||
{
|
||||
// Material for effect.
|
||||
Material mat = effectMaterial;
|
||||
|
||||
if(s_CommandBuffer == null)
|
||||
{
|
||||
s_CommandBuffer = new CommandBuffer ();
|
||||
}
|
||||
s_CommandBuffer.name = mat ? mat.name : "noeffect";
|
||||
if (_rt)
|
||||
{
|
||||
_rt.name = s_CommandBuffer.name;
|
||||
}
|
||||
|
||||
// [1] Capture from back buffer (back buffer -> copied screen).
|
||||
int w, h;
|
||||
GetDesamplingSize(DesamplingRate.None, out w, out h);
|
||||
s_CommandBuffer.GetTemporaryRT(s_CopyId, w, h, 0, m_FilterMode);
|
||||
#if UNITY_EDITOR
|
||||
s_CommandBuffer.Blit(Resources.FindObjectsOfTypeAll<RenderTexture>().FirstOrDefault(x => x.name == "GameView RT"), s_CopyId);
|
||||
#else
|
||||
s_CommandBuffer.Blit(BuiltinRenderTextureType.BindableTexture, s_CopyId);
|
||||
#endif
|
||||
|
||||
// Set properties for effect.
|
||||
s_CommandBuffer.SetGlobalVector(s_EffectFactorId, new Vector4(toneLevel, 0));
|
||||
s_CommandBuffer.SetGlobalVector(s_ColorFactorId, new Vector4(effectColor.r, effectColor.g, effectColor.b, effectColor.a));
|
||||
|
||||
// [2] Apply base effect with reduction buffer (copied screen -> effect1).
|
||||
GetDesamplingSize (m_ReductionRate, out w, out h);
|
||||
s_CommandBuffer.GetTemporaryRT (s_EffectId1, w, h, 0, m_FilterMode);
|
||||
s_CommandBuffer.Blit(s_CopyId, s_EffectId1, mat, 0);
|
||||
s_CommandBuffer.ReleaseTemporaryRT(s_CopyId);
|
||||
|
||||
// Iterate blurring operation.
|
||||
if (m_BlurMode != BlurMode.None)
|
||||
{
|
||||
s_CommandBuffer.GetTemporaryRT(s_EffectId2, w, h, 0, m_FilterMode);
|
||||
for (int i = 0; i < m_BlurIterations; i++)
|
||||
{
|
||||
// [3] Apply blurring with reduction buffer (effect1 -> effect2, or effect2 -> effect1).
|
||||
s_CommandBuffer.SetGlobalVector(s_EffectFactorId, new Vector4(blur, 0));
|
||||
s_CommandBuffer.Blit(s_EffectId1, s_EffectId2, mat, 1);
|
||||
s_CommandBuffer.SetGlobalVector(s_EffectFactorId, new Vector4(0, blur));
|
||||
s_CommandBuffer.Blit(s_EffectId2, s_EffectId1, mat, 1);
|
||||
}
|
||||
s_CommandBuffer.ReleaseTemporaryRT(s_EffectId2);
|
||||
}
|
||||
|
||||
// [4] Copy to result RT.
|
||||
s_CommandBuffer.Blit(s_EffectId1, new RenderTargetIdentifier (capturedTexture));
|
||||
s_CommandBuffer.ReleaseTemporaryRT(s_EffectId1);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if(!Application.isPlaying)
|
||||
{
|
||||
texture = null;
|
||||
_SetDirty ();
|
||||
Graphics.ExecuteCommandBuffer (s_CommandBuffer);
|
||||
|
||||
_Release(false);
|
||||
texture = capturedTexture;
|
||||
_SetDirty ();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Graphics.ExecuteCommandBuffer(s_CommandBuffer);
|
||||
}
|
||||
#endif
|
||||
// Execute command buffer.
|
||||
canvas.rootCanvas.GetComponent<CanvasScaler> ().StartCoroutine(_CoUpdateTextureOnNextFrame ());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Release captured image.
|
||||
/// </summary>
|
||||
public void Release()
|
||||
{
|
||||
_Release(true);
|
||||
texture = null;
|
||||
_SetDirty();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
// Set parameters as 'Detail'.
|
||||
m_BlurIterations = 5;
|
||||
m_FilterMode = FilterMode.Bilinear;
|
||||
m_DesamplingRate = DesamplingRate.None;
|
||||
m_ReductionRate = DesamplingRate.x1;
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the before serialize event.
|
||||
/// </summary>
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the after deserialize event.
|
||||
/// </summary>
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += () => UpdateMaterial(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the validate event.
|
||||
/// </summary>
|
||||
protected override void OnValidate ()
|
||||
{
|
||||
base.OnValidate ();
|
||||
UnityEditor.EditorApplication.delayCall += () => UpdateMaterial(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the material.
|
||||
/// </summary>
|
||||
/// <param name="ignoreInPlayMode">If set to <c>true</c> ignore in play mode.</param>
|
||||
protected void UpdateMaterial(bool ignoreInPlayMode)
|
||||
{
|
||||
if(!this || ignoreInPlayMode && Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var mat = MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ToneMode, m_ColorMode, m_BlurMode);
|
||||
if (m_EffectMaterial != mat)
|
||||
{
|
||||
material = null;
|
||||
m_EffectMaterial = mat;
|
||||
_SetDirty();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
RenderTexture _rt;
|
||||
|
||||
static int s_CopyId;
|
||||
static int s_EffectId1;
|
||||
static int s_EffectId2;
|
||||
static int s_EffectFactorId;
|
||||
static int s_ColorFactorId;
|
||||
static CommandBuffer s_CommandBuffer;
|
||||
|
||||
/// <summary>
|
||||
/// Release genarated objects.
|
||||
/// </summary>
|
||||
/// <param name="releaseRT">If set to <c>true</c> release cached RenderTexture.</param>
|
||||
void _Release(bool releaseRT)
|
||||
{
|
||||
if (releaseRT || m_TargetTexture)
|
||||
{
|
||||
texture = null;
|
||||
_Release(ref _rt);
|
||||
}
|
||||
|
||||
if (s_CommandBuffer != null)
|
||||
{
|
||||
s_CommandBuffer.Clear();
|
||||
|
||||
if(releaseRT)
|
||||
{
|
||||
s_CommandBuffer.Release ();
|
||||
s_CommandBuffer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||
void _SetDirty()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if(!Application.isPlaying)
|
||||
{
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void _Release(ref RenderTexture obj)
|
||||
{
|
||||
if (obj)
|
||||
{
|
||||
obj.Release();
|
||||
#if UNITY_EDITOR
|
||||
if(!Application.isPlaying)
|
||||
DestroyImmediate(obj);
|
||||
else
|
||||
#endif
|
||||
Destroy(obj);
|
||||
obj = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set texture on next frame.
|
||||
/// </summary>
|
||||
IEnumerator _CoUpdateTextureOnNextFrame ()
|
||||
{
|
||||
yield return new WaitForEndOfFrame ();
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
// Execute command buffer.
|
||||
Graphics.ExecuteCommandBuffer (s_CommandBuffer);
|
||||
#endif
|
||||
_Release(false);
|
||||
texture = capturedTexture;
|
||||
_SetDirty();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||