Compare commits
70 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 |
@@ -33,4 +33,12 @@ sysinfo.txt
|
||||
|
||||
|
||||
# Packages
|
||||
*.unitypackage
|
||||
*.unitypackage
|
||||
build.app
|
||||
unity.log
|
||||
|
||||
.vs/
|
||||
_Android/
|
||||
_iOS/
|
||||
_WebGL/
|
||||
_Standalone/
|
||||
|
||||
|
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:
|
||||
|
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:
|
||||
|
Before Width: | Height: | Size: 9.0 KiB |
@@ -276,7 +276,14 @@ AnimationClip:
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0.5
|
||||
functionName: Closed
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
--- !u!74 &7450624
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 3
|
||||
@@ -605,18 +612,12 @@ AnimatorController:
|
||||
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
|
||||
@@ -630,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
|
||||
@@ -722,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
|
||||
@@ -755,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
|
||||
@@ -804,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: []
|
||||
@@ -820,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:
|
||||
@@ -386,6 +386,90 @@ AnimationClip:
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path: Mask
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: -0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0.41666666
|
||||
outSlope: 0.41666666
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Hue
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: efe700dddcd8341ff8607ac2c827b4b5, type: 3}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 10
|
||||
m_WrapMode: 0
|
||||
@@ -472,6 +556,24 @@ AnimationClip:
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 64967491
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 3747441678
|
||||
attribute: 64967491
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 636985097
|
||||
script: {fileID: 11500000, guid: efe700dddcd8341ff8607ac2c827b4b5, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
@@ -864,6 +966,90 @@ AnimationClip:
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 9bb4e59514e90489d985e9a17c838085, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_EffectFactor
|
||||
path: Mask
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: 922b805bc01c243e5853d9cbb544118c, type: 3}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: -0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1.2
|
||||
value: 0
|
||||
inSlope: 0.41666666
|
||||
outSlope: 0.41666666
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2.4
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Hue
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: efe700dddcd8341ff8607ac2c827b4b5, type: 3}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
|
||||
@@ -4,12 +4,12 @@ timeCreated: 1502934796
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
@@ -21,10 +21,8 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 1
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 512
|
||||
@@ -35,9 +33,7 @@ TextureImporter:
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
@@ -45,10 +41,57 @@ TextureImporter:
|
||||
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
|
||||
buildTargetSettings: []
|
||||
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:
|
||||
|
||||
@@ -128,6 +128,62 @@ AnimationClip:
|
||||
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
|
||||
@@ -160,6 +216,18 @@ AnimationClip:
|
||||
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
|
||||
@@ -294,6 +362,62 @@ AnimationClip:
|
||||
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
|
||||
@@ -339,40 +463,6 @@ AnimationClip:
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
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:
|
||||
@@ -395,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
|
||||
@@ -403,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
|
||||
@@ -437,40 +561,6 @@ AnimationClip:
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
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:
|
||||
@@ -493,19 +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_IsEmpty: 0
|
||||
m_Events:
|
||||
- time: 0
|
||||
functionName: Capture
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7437890
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -801,13 +918,13 @@ AnimatorController:
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: Transition
|
||||
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
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,57 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 925f66fdcc9764b579413b7408c718f2
|
||||
timeCreated: 1488188399
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 953 KiB |
@@ -1,14 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 660f666739adc442dacb957af200c2f1
|
||||
timeCreated: 1527673509
|
||||
licenseType: Pro
|
||||
guid: 04b808c8e7e2f114aa6bce179817e3b6
|
||||
timeCreated: 1533229821
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
@@ -34,24 +34,24 @@ TextureImporter:
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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: 1
|
||||
alphaUsage: 2
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -59,15 +59,7 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -75,7 +67,7 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -83,7 +75,15 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
|
After Width: | Height: | Size: 1.9 MiB |
@@ -1,14 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6789beb7377034038b701aa05106933d
|
||||
timeCreated: 1523277470
|
||||
licenseType: Pro
|
||||
guid: d8f19718cccf14d4b829474ab19e0c7a
|
||||
timeCreated: 1533229825
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
@@ -34,24 +34,24 @@ TextureImporter:
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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: 1
|
||||
alphaUsage: 2
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -59,15 +59,7 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -75,7 +67,7 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -83,7 +75,15 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 512
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@@ -94,7 +94,7 @@ TextureImporter:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag: Demo_ShinyEffectForUGUI
|
||||
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:
|
||||
@@ -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: {}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
%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-HSV
|
||||
m_Shader: {fileID: 4800000, guid: 7fc74090480c84f8b977cfcd55cdfe82, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Cutoff
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
- first:
|
||||
name: _GlossMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _Glossiness
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _GlossyReflections
|
||||
second: 1
|
||||
- first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
- first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
- first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
- first:
|
||||
name: _Parallax
|
||||
second: 0.02
|
||||
- first:
|
||||
name: _SmoothnessTextureChannel
|
||||
second: 0
|
||||
- first:
|
||||
name: _SpecularHighlights
|
||||
second: 1
|
||||
- first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
- 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: _UVSec
|
||||
second: 0
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
- first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
- first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8243c28075b3431084ded42f46ad567
|
||||
timeCreated: 1531885800
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77a4cc77ec7394415a18f9e5a4b8083e
|
||||
timeCreated: 1532512709
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
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,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,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5645838b01af8764d8f381f04b62b9a2
|
||||
timeCreated: 1528296875
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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,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:
|
||||
@@ -10,8 +10,9 @@ namespace Coffee.UIExtensions
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public abstract class UIEffectBase : BaseMeshEffect, ISerializationCallbackReceiver
|
||||
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;
|
||||
@@ -26,21 +27,43 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
|
||||
/// <summary>
|
||||
/// Raises the before serialize event.
|
||||
/// </summary>
|
||||
public virtual void OnBeforeSerialize()
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
OnValidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the after deserialize event.
|
||||
/// Raises the validate event.
|
||||
/// </summary>
|
||||
public virtual void OnAfterDeserialize()
|
||||
protected override void OnValidate ()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.delayCall += () => targetGraphic.material = m_EffectMaterial;
|
||||
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>
|
||||
@@ -48,7 +71,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
targetGraphic.material = m_EffectMaterial;
|
||||
ModifyMaterial();
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
@@ -57,7 +80,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
protected override void OnDisable()
|
||||
{
|
||||
targetGraphic.material = null;
|
||||
ModifyMaterial();
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Coffee.UIExtensions
|
||||
{
|
||||
spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
|
||||
var element = spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
|
||||
element.FindPropertyRelative("style").intValue = (int)UIShadow.ShadowStyle.Shadow;
|
||||
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;
|
||||
@@ -42,10 +42,10 @@ namespace Coffee.UIExtensions
|
||||
float ElementHeightCallback(int index)
|
||||
{
|
||||
var element = spAdditionalShadows.GetArrayElementAtIndex(index);
|
||||
if (element.FindPropertyRelative("style").intValue == (int)UIShadow.ShadowStyle.None)
|
||||
if (element.FindPropertyRelative("style").intValue == (int)ShadowStyle.None)
|
||||
return 16;
|
||||
|
||||
return (uiEffect && uiEffect.blurMode != UIEffect.BlurMode.None ? 84 : 64) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
return (uiEffect && uiEffect.blurMode != BlurMode.None ? 84 : 64) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -59,7 +59,7 @@ namespace Coffee.UIExtensions
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
var spMode = sp.FindPropertyRelative("style");
|
||||
EditorGUI.PropertyField(r, spMode);
|
||||
if (spMode.intValue == (int)UIShadow.ShadowStyle.None)
|
||||
if (spMode.intValue == (int)ShadowStyle.None)
|
||||
return;
|
||||
|
||||
r.y += r.height;
|
||||
@@ -69,7 +69,7 @@ namespace Coffee.UIExtensions
|
||||
r.y += EditorGUIUtility.wideMode ? r.height : r.height * 2;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("useGraphicAlpha"));
|
||||
|
||||
if (uiEffect && uiEffect.blurMode != UIEffect.BlurMode.None)
|
||||
if (uiEffect && uiEffect.blurMode != BlurMode.None)
|
||||
{
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("blur"));
|
||||
@@ -91,14 +91,14 @@ namespace Coffee.UIExtensions
|
||||
EditorGUILayout.PropertyField(spShadowMode);
|
||||
|
||||
// When shadow is enable, show parameters.
|
||||
if (spShadowMode.intValue != (int)UIShadow.ShadowStyle.None)
|
||||
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 != UIEffect.BlurMode.None)
|
||||
if (uiEffect && uiEffect.blurMode != BlurMode.None)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Blur"));
|
||||
}
|
||||
|
||||
@@ -38,12 +38,6 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public Vector4 customFactor2 { get { return m_CustomFactor2; } set { m_CustomFactor2 = value; SetDirty(); } }
|
||||
|
||||
// protected override void OnValidate()
|
||||
// {
|
||||
// base.OnValidate();
|
||||
// Debug.Log("hog!");
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIDissolve.
|
||||
/// Dissolve effect for uGUI.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIDissolve : BaseMeshEffect
|
||||
#if UNITY_EDITOR
|
||||
, ISerializationCallbackReceiver
|
||||
#endif
|
||||
public class UIDissolve : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
@@ -34,23 +23,22 @@ namespace Coffee.UIExtensions
|
||||
[SerializeField] [Range(0, 1)] float m_Width = 0.5f;
|
||||
[SerializeField] [Range(0, 1)] float m_Softness = 0.5f;
|
||||
[SerializeField] [ColorUsage(false)] Color m_Color = new Color(0.0f, 0.25f, 1.0f);
|
||||
[SerializeField] UIEffect.ColorMode m_ColorMode = UIEffect.ColorMode.Add;
|
||||
[SerializeField] Material m_EffectMaterial;
|
||||
[Space]
|
||||
[SerializeField] 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>
|
||||
/// Graphic affected by the UIEffect.
|
||||
/// </summary>
|
||||
new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Location for effect.
|
||||
/// Current location[0-1] for dissolve effect. 0 is not dissolved, 1 is completely dissolved.
|
||||
/// </summary>
|
||||
public float location
|
||||
{
|
||||
@@ -61,7 +49,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Location, value))
|
||||
{
|
||||
m_Location = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +66,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Width, value))
|
||||
{
|
||||
m_Width = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,7 +83,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Softness, value))
|
||||
{
|
||||
m_Softness = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +99,58 @@ namespace Coffee.UIExtensions
|
||||
if (m_Color != value)
|
||||
{
|
||||
m_Color = value;
|
||||
_SetDirty();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,12 +158,7 @@ namespace Coffee.UIExtensions
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public UIEffect.ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Effect material.
|
||||
/// </summary>
|
||||
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
public ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Play dissolve on enable.
|
||||
@@ -142,49 +176,40 @@ namespace Coffee.UIExtensions
|
||||
public AnimatorUpdateMode updateMode { get { return m_UpdateMode; } set { m_UpdateMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
public override void ModifyMaterial()
|
||||
{
|
||||
_time = 0;
|
||||
graphic.material = effectMaterial;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the behaviour becomes disabled () or inactive.
|
||||
/// </summary>
|
||||
protected override void OnDisable()
|
||||
{
|
||||
graphic.material = null;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
var obj = this;
|
||||
EditorApplication.delayCall += () =>
|
||||
ulong hash = (m_NoiseTexture ? (uint)m_NoiseTexture.GetInstanceID() : 0) + ((ulong)m_ColorMode << 32);
|
||||
if (_materialCache != null && (_materialCache.hash != hash || !isActiveAndEnabled || !m_EffectMaterial))
|
||||
{
|
||||
if (Application.isPlaying || !obj || !obj.graphic)
|
||||
return;
|
||||
|
||||
var mat = UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName), UIEffect.ToneMode.None, m_ColorMode, UIEffect.BlurMode.None);
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
}
|
||||
|
||||
if (m_EffectMaterial == mat && graphic.material == mat)
|
||||
return;
|
||||
|
||||
graphic.material = m_EffectMaterial = mat;
|
||||
EditorUtility.SetDirty(this);
|
||||
EditorUtility.SetDirty(graphic);
|
||||
EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
};
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
@@ -195,16 +220,28 @@ namespace Coffee.UIExtensions
|
||||
return;
|
||||
|
||||
// rect.
|
||||
Rect rect = graphic.rectTransform.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);
|
||||
|
||||
var x = Mathf.Clamp01(vertex.position.x / rect.width + 0.5f);
|
||||
var y = Mathf.Clamp01(vertex.position.y / rect.height + 0.5f);
|
||||
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)
|
||||
@@ -223,9 +260,41 @@ namespace Coffee.UIExtensions
|
||||
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()
|
||||
@@ -246,14 +315,5 @@ namespace Coffee.UIExtensions
|
||||
_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the UIEffect as dirty.
|
||||
/// </summary>
|
||||
void _SetDirty()
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,55 +56,55 @@ namespace Coffee.UIExtensions
|
||||
//################################
|
||||
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,
|
||||
}
|
||||
|
||||
// /// <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.
|
||||
@@ -258,118 +258,129 @@ namespace Coffee.UIExtensions
|
||||
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
|
||||
|
||||
protected override void OnValidate ()
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial ()
|
||||
{
|
||||
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("UI_TONE_" + 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 : "");
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ToneMode, m_ColorMode, m_BlurMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -445,7 +456,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
Color vertColor = color;
|
||||
|
||||
if(colorMode != ColorMode.None)
|
||||
if(colorMode != ColorMode.Multiply)
|
||||
{
|
||||
vertColor.r = vertColor.g = vertColor.b = 1;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
using BlurMode = UIEffect.BlurMode;
|
||||
using ColorMode = UIEffect.ColorMode;
|
||||
using ToneMode = UIEffect.ToneMode;
|
||||
|
||||
/// <summary>
|
||||
/// UIEffectCapturedImage
|
||||
/// </summary>
|
||||
@@ -53,8 +47,12 @@ namespace Coffee.UIExtensions
|
||||
[SerializeField] DesamplingRate m_ReductionRate;
|
||||
[SerializeField] FilterMode m_FilterMode = FilterMode.Bilinear;
|
||||
[SerializeField] Material m_EffectMaterial;
|
||||
[SerializeField][Range(1, 8)] int m_Iterations = 1;
|
||||
[SerializeField] bool m_KeepCanvasSize = true;
|
||||
[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;
|
||||
|
||||
|
||||
//################################
|
||||
@@ -113,24 +111,63 @@ namespace Coffee.UIExtensions
|
||||
/// <summary>
|
||||
/// Captured texture.
|
||||
/// </summary>
|
||||
public RenderTexture capturedTexture { get { return _rt; } }
|
||||
|
||||
/// <summary>
|
||||
/// Iterations.
|
||||
/// </summary>
|
||||
public int iterations { get { return m_Iterations; } set { m_Iterations = value; } }
|
||||
public RenderTexture capturedTexture { get { return m_TargetTexture ? m_TargetTexture : _rt; } }
|
||||
|
||||
/// <summary>
|
||||
/// Fits graphic size to the root canvas.
|
||||
/// Blur iterations.
|
||||
/// </summary>
|
||||
public bool keepCanvasSize { get { return m_KeepCanvasSize; } set { m_KeepCanvasSize = value; } }
|
||||
[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(true);
|
||||
Release();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
@@ -146,45 +183,38 @@ namespace Coffee.UIExtensions
|
||||
base.OnPopulateMesh(vh);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
var obj = this;
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
if (Application.isPlaying || !obj)
|
||||
return;
|
||||
|
||||
var mat = (0 == toneMode) && (0 == colorMode) && (0 == blurMode)
|
||||
? null
|
||||
: UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName), toneMode, colorMode, blurMode);
|
||||
|
||||
if (m_EffectMaterial == mat)
|
||||
return;
|
||||
|
||||
m_EffectMaterial = mat;
|
||||
EditorUtility.SetDirty(this);
|
||||
EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the desampling.
|
||||
/// </summary>
|
||||
public void GetDesamplingSize(DesamplingRate rate, out int w, out int h)
|
||||
{
|
||||
var cam = canvas.worldCamera ?? Camera.main;
|
||||
h = cam.pixelHeight;
|
||||
w = cam.pixelWidth;
|
||||
if (rate != DesamplingRate.None)
|
||||
#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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,105 +223,130 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Capture()
|
||||
{
|
||||
// Camera for command buffer.
|
||||
_camera = canvas.worldCamera ?? Camera.main;
|
||||
// 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 id for RT.
|
||||
// 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 size of generated result RT has changed, relese it.
|
||||
// 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(m_DesamplingRate, out w, out h);
|
||||
if (_rt && (_rt.width != w || _rt.height != 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)
|
||||
{
|
||||
_rtToRelease = _rt;
|
||||
_rt = null;
|
||||
}
|
||||
|
||||
// Generate result RT.
|
||||
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;
|
||||
}
|
||||
|
||||
// Create command buffer.
|
||||
if (_buffer == null)
|
||||
{
|
||||
var rtId = new RenderTargetIdentifier(_rt);
|
||||
|
||||
// Material for effect.
|
||||
Material mat = effectMaterial;
|
||||
|
||||
_buffer = new CommandBuffer();
|
||||
_buffer.name =
|
||||
_rt.name =
|
||||
mat ? mat.name : "noeffect";
|
||||
|
||||
// Copy to temporary RT.
|
||||
_buffer.GetTemporaryRT(s_CopyId, -1, -1, 0, m_FilterMode);
|
||||
_buffer.Blit(BuiltinRenderTextureType.CurrentActive, s_CopyId);
|
||||
|
||||
// Set properties.
|
||||
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur, 1));
|
||||
_buffer.SetGlobalVector("_ColorFactor", new Vector4(effectColor.r, effectColor.g, effectColor.b, effectColor.a));
|
||||
|
||||
// Blit without effect.
|
||||
if (!mat)
|
||||
s_CommandBuffer.GetTemporaryRT(s_EffectId2, w, h, 0, m_FilterMode);
|
||||
for (int i = 0; i < m_BlurIterations; i++)
|
||||
{
|
||||
_buffer.Blit(s_CopyId, rtId);
|
||||
_buffer.ReleaseTemporaryRT(s_CopyId);
|
||||
}
|
||||
// Blit with effect.
|
||||
else
|
||||
{
|
||||
GetDesamplingSize(m_ReductionRate, out w, out h);
|
||||
_buffer.GetTemporaryRT(s_EffectId1, w, h, 0, m_FilterMode);
|
||||
_buffer.Blit(s_CopyId, s_EffectId1, mat); // Apply effect (copied screen -> effect1).
|
||||
_buffer.ReleaseTemporaryRT(s_CopyId);
|
||||
|
||||
// Iterate the operation.
|
||||
if(1 < m_Iterations)
|
||||
{
|
||||
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur, 0));
|
||||
_buffer.GetTemporaryRT(s_EffectId2, w, h, 0, m_FilterMode);
|
||||
for (int i = 1; i < m_Iterations; i++)
|
||||
{
|
||||
// Apply effect (effect1 -> effect2, or effect2 -> effect1).
|
||||
_buffer.Blit(i % 2 == 0 ? s_EffectId2 : s_EffectId1, i % 2 == 0 ? s_EffectId1 : s_EffectId2, mat);
|
||||
}
|
||||
}
|
||||
|
||||
_buffer.Blit(m_Iterations % 2 == 0 ? s_EffectId2 : s_EffectId1, rtId);
|
||||
_buffer.ReleaseTemporaryRT(s_EffectId1);
|
||||
if (1 < m_Iterations)
|
||||
{
|
||||
_buffer.ReleaseTemporaryRT(s_EffectId2);
|
||||
}
|
||||
// [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);
|
||||
}
|
||||
|
||||
// Add command buffer to camera.
|
||||
_camera.AddCommandBuffer(kCameraEvent, _buffer);
|
||||
// [4] Copy to result RT.
|
||||
s_CommandBuffer.Blit(s_EffectId1, new RenderTargetIdentifier (capturedTexture));
|
||||
s_CommandBuffer.ReleaseTemporaryRT(s_EffectId1);
|
||||
|
||||
// StartCoroutine by CanvasScaler.
|
||||
var rootCanvas = canvas.rootCanvas;
|
||||
var scaler = rootCanvas.GetComponent<CanvasScaler>();
|
||||
scaler.StartCoroutine(_CoUpdateTextureOnNextFrame());
|
||||
if (m_KeepCanvasSize)
|
||||
#if UNITY_EDITOR
|
||||
if(!Application.isPlaying)
|
||||
{
|
||||
var size = (rootCanvas.transform as RectTransform).rect.size;
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size.x);
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size.y);
|
||||
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>
|
||||
@@ -300,22 +355,79 @@ namespace Coffee.UIExtensions
|
||||
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.
|
||||
//################################
|
||||
const CameraEvent kCameraEvent = CameraEvent.AfterEverything;
|
||||
Camera _camera;
|
||||
RenderTexture _rt;
|
||||
RenderTexture _rtToRelease;
|
||||
CommandBuffer _buffer;
|
||||
|
||||
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.
|
||||
@@ -323,41 +435,65 @@ namespace Coffee.UIExtensions
|
||||
/// <param name="releaseRT">If set to <c>true</c> release cached RenderTexture.</param>
|
||||
void _Release(bool releaseRT)
|
||||
{
|
||||
if (releaseRT)
|
||||
if (releaseRT || m_TargetTexture)
|
||||
{
|
||||
texture = null;
|
||||
_Release(ref _rt);
|
||||
}
|
||||
|
||||
if (_rt != null)
|
||||
if (s_CommandBuffer != null)
|
||||
{
|
||||
s_CommandBuffer.Clear();
|
||||
|
||||
if(releaseRT)
|
||||
{
|
||||
_rt.Release();
|
||||
_rt = null;
|
||||
s_CommandBuffer.Release ();
|
||||
s_CommandBuffer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_buffer != null)
|
||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||
void _SetDirty()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if(!Application.isPlaying)
|
||||
{
|
||||
if (_camera != null)
|
||||
_camera.RemoveCommandBuffer(kCameraEvent, _buffer);
|
||||
_buffer.Release();
|
||||
_buffer = null;
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (_rtToRelease)
|
||||
void _Release(ref RenderTexture obj)
|
||||
{
|
||||
if (obj)
|
||||
{
|
||||
_rtToRelease.Release();
|
||||
_rtToRelease = null;
|
||||
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()
|
||||
IEnumerator _CoUpdateTextureOnNextFrame ()
|
||||
{
|
||||
yield return new WaitForEndOfFrame();
|
||||
yield return new WaitForEndOfFrame ();
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
// Execute command buffer.
|
||||
Graphics.ExecuteCommandBuffer (s_CommandBuffer);
|
||||
#endif
|
||||
_Release(false);
|
||||
texture = _rt;
|
||||
texture = capturedTexture;
|
||||
_SetDirty();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// HSV Modifier.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIHsvModifier : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-HSV";
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[Header("Target")]
|
||||
[SerializeField] [ColorUsage(false)] Color m_TargetColor = Color.red;
|
||||
[SerializeField] [Range(0, 1)] float m_Range = 0.1f;
|
||||
[Header("Adjustment")]
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Hue;
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Saturation;
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Value;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Target color to affect hsv shift.
|
||||
/// </summary>
|
||||
public Color targetColor
|
||||
{
|
||||
get { return m_TargetColor; }
|
||||
set
|
||||
{
|
||||
if (m_TargetColor != value)
|
||||
{
|
||||
m_TargetColor = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Color range to affect hsv shift [0 ~ 1].
|
||||
/// </summary>
|
||||
public float range
|
||||
{
|
||||
get { return m_Range; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Range, value))
|
||||
{
|
||||
m_Range = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saturation shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float saturation
|
||||
{
|
||||
get { return m_Saturation; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Saturation, value))
|
||||
{
|
||||
m_Saturation = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Value shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float value
|
||||
{
|
||||
get { return m_Value; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Value, value))
|
||||
{
|
||||
m_Value = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hue shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float hue
|
||||
{
|
||||
get { return m_Hue; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Hue, value))
|
||||
{
|
||||
m_Hue = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName));
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
return;
|
||||
|
||||
vh.GetUIVertexStream(tempVerts);
|
||||
vh.Clear();
|
||||
|
||||
float h,s,v;
|
||||
Color.RGBToHSV(m_TargetColor, out h, out s, out v);
|
||||
|
||||
// Pack some effect factors to 1 float.
|
||||
Vector2 factor = new Vector2(
|
||||
Packer.ToFloat(h, s, v, m_Range),
|
||||
Packer.ToFloat(m_Hue + 0.5f, m_Saturation + 0.5f, m_Value + 0.5f)
|
||||
);
|
||||
|
||||
for (int i = 0; i < tempVerts.Count; i++)
|
||||
{
|
||||
UIVertex vt = tempVerts[i];
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
}
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efe700dddcd8341ff8607ac2c827b4b5
|
||||
timeCreated: 1523859834
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -51,21 +51,6 @@ namespace Coffee.UIExtensions
|
||||
public bool useGraphicAlpha = true;
|
||||
}
|
||||
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Shadow effect style.
|
||||
/// </summary>
|
||||
public enum ShadowStyle
|
||||
{
|
||||
None = 0,
|
||||
Shadow,
|
||||
Outline,
|
||||
Outline8,
|
||||
Shadow3,
|
||||
}
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
|
||||
@@ -18,10 +18,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIShiny : BaseMeshEffect
|
||||
#if UNITY_EDITOR
|
||||
, ISerializationCallbackReceiver
|
||||
#endif
|
||||
public class UIShiny : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
@@ -39,8 +36,8 @@ namespace Coffee.UIExtensions
|
||||
[FormerlySerializedAs("m_Alpha")]
|
||||
[SerializeField][Range(0, 1)] float m_Brightness = 1f;
|
||||
[SerializeField][Range(0, 1)] float m_Highlight = 1;
|
||||
[SerializeField] Material m_EffectMaterial;
|
||||
[Space]
|
||||
[SerializeField] protected EffectArea m_EffectArea;
|
||||
[Header("Play Effect")]
|
||||
[SerializeField] bool m_Play = false;
|
||||
[SerializeField] bool m_Loop = false;
|
||||
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
|
||||
@@ -51,10 +48,10 @@ namespace Coffee.UIExtensions
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Graphic affected by the UIEffect.
|
||||
/// </summary>
|
||||
new public Graphic graphic { get { return base.graphic; } }
|
||||
// /// <summary>
|
||||
// /// Graphic affected by the UIEffect.
|
||||
// /// </summary>
|
||||
// new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Location for shiny effect.
|
||||
@@ -68,7 +65,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Location, value))
|
||||
{
|
||||
m_Location = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,7 +82,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Width, value))
|
||||
{
|
||||
m_Width = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +99,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Softness, value))
|
||||
{
|
||||
m_Softness = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,7 +117,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Brightness, value))
|
||||
{
|
||||
m_Brightness = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,7 +134,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Brightness, value))
|
||||
{
|
||||
m_Brightness = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +151,7 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Highlight, value))
|
||||
{
|
||||
m_Highlight = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,15 +167,26 @@ namespace Coffee.UIExtensions
|
||||
if (!Mathf.Approximately(m_Rotation, value))
|
||||
{
|
||||
m_Rotation = value;
|
||||
_SetDirty();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effect material.
|
||||
/// The area for effect.
|
||||
/// </summary>
|
||||
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
public EffectArea effectArea
|
||||
{
|
||||
get { return m_EffectArea; }
|
||||
set
|
||||
{
|
||||
if (m_EffectArea != value)
|
||||
{
|
||||
m_EffectArea = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play shinning on enable.
|
||||
@@ -211,52 +219,58 @@ namespace Coffee.UIExtensions
|
||||
protected override void OnEnable()
|
||||
{
|
||||
_time = 0;
|
||||
graphic.material = effectMaterial;
|
||||
// graphic.material = effectMaterial;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the behaviour becomes disabled () or inactive.
|
||||
/// </summary>
|
||||
protected override void OnDisable()
|
||||
{
|
||||
graphic.material = null;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// This function is called when the behaviour becomes disabled () or inactive.
|
||||
// /// </summary>
|
||||
// protected override void OnDisable()
|
||||
// {
|
||||
// graphic.material = null;
|
||||
// base.OnDisable();
|
||||
// }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnBeforeSerialize()
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName));
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
var obj = this;
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
if (Application.isPlaying || !obj)
|
||||
return;
|
||||
|
||||
var mat = GetMaterial(shaderName);
|
||||
if (m_EffectMaterial == mat && graphic.material == mat)
|
||||
return;
|
||||
|
||||
graphic.material = m_EffectMaterial = mat;
|
||||
EditorUtility.SetDirty(this);
|
||||
EditorUtility.SetDirty(graphic);
|
||||
EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
};
|
||||
}
|
||||
|
||||
public static Material GetMaterial(string shaderName)
|
||||
{
|
||||
string name = Path.GetFileName(shaderName);
|
||||
return AssetDatabase.FindAssets("t:Material " + name)
|
||||
.Select(x => AssetDatabase.GUIDToAssetPath(x))
|
||||
.SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
|
||||
.OfType<Material>()
|
||||
.FirstOrDefault(x => x.name == name);
|
||||
}
|
||||
// public void OnBeforeSerialize()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public void OnAfterDeserialize()
|
||||
// {
|
||||
// var obj = this;
|
||||
// EditorApplication.delayCall += () =>
|
||||
// {
|
||||
// if (Application.isPlaying || !obj)
|
||||
// return;
|
||||
//
|
||||
// var mat = GetMaterial(shaderName);
|
||||
// if (m_EffectMaterial == mat && graphic.material == mat)
|
||||
// return;
|
||||
//
|
||||
// graphic.material = m_EffectMaterial = mat;
|
||||
// EditorUtility.SetDirty(this);
|
||||
// EditorUtility.SetDirty(graphic);
|
||||
// EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// public static Material GetMaterial(string shaderName)
|
||||
// {
|
||||
// string name = Path.GetFileName(shaderName);
|
||||
// return AssetDatabase.FindAssets("t:Material " + name)
|
||||
// .Select(x => AssetDatabase.GUIDToAssetPath(x))
|
||||
// .SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
|
||||
// .OfType<Material>()
|
||||
// .FirstOrDefault(x => x.name == name);
|
||||
// }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
@@ -268,7 +282,7 @@ namespace Coffee.UIExtensions
|
||||
return;
|
||||
|
||||
// rect.
|
||||
Rect rect = graphic.rectTransform.rect;
|
||||
Rect rect = m_EffectArea.GetEffectArea(vh, graphic);
|
||||
|
||||
// rotation.
|
||||
float rad = rotation * Mathf.Deg2Rad;
|
||||
@@ -277,6 +291,8 @@ namespace Coffee.UIExtensions
|
||||
dir = dir.normalized;
|
||||
|
||||
// Calculate vertex position.
|
||||
bool effectEachCharacter = graphic is Text && m_EffectArea == EffectArea.Character;
|
||||
|
||||
UIVertex vertex = default(UIVertex);
|
||||
Vector2 nomalizedPos;
|
||||
Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix.
|
||||
@@ -287,6 +303,17 @@ namespace Coffee.UIExtensions
|
||||
// Normalize vertex position by local matrix.
|
||||
nomalizedPos = localMatrix * vertex.position;
|
||||
|
||||
// Normalize vertex position by local matrix.
|
||||
if (effectEachCharacter)
|
||||
{
|
||||
// Each characters.
|
||||
nomalizedPos = localMatrix * splitedCharacterPosition[i % 4];
|
||||
}
|
||||
else
|
||||
{
|
||||
nomalizedPos = localMatrix * vertex.position;
|
||||
}
|
||||
|
||||
vertex.uv1 = new Vector2(
|
||||
Packer.ToFloat(Mathf.Clamp01(nomalizedPos.y), softness, width, brightness),
|
||||
Packer.ToFloat(location, highlight)
|
||||
@@ -330,13 +357,13 @@ namespace Coffee.UIExtensions
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the UIEffect as dirty.
|
||||
/// </summary>
|
||||
void _SetDirty()
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Mark the UIEffect as dirty.
|
||||
// /// </summary>
|
||||
// void _SetDirty()
|
||||
// {
|
||||
// if (graphic)
|
||||
// graphic.SetVerticesDirty();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Transition effect.
|
||||
/// </summary>
|
||||
public class UITransitionEffect : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-Transition";
|
||||
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public enum EffectMode
|
||||
{
|
||||
None = 0,
|
||||
Fade = 1,
|
||||
Cutoff = 2,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] EffectMode m_EffectMode;
|
||||
[SerializeField][Range(0, 1)] float m_EffectFactor = 1;
|
||||
[SerializeField] Texture m_TransitionTexture;
|
||||
[SerializeField] EffectArea m_EffectArea;
|
||||
[SerializeField] bool m_KeepAspectRatio;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Effect factor between 0(no effect) and 1(complete effect).
|
||||
/// </summary>
|
||||
public float effectFactor
|
||||
{
|
||||
get { return m_EffectFactor; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_EffectFactor, value))
|
||||
{
|
||||
m_EffectFactor = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transition texture.
|
||||
/// </summary>
|
||||
public Texture transitionTexture
|
||||
{
|
||||
get { return m_TransitionTexture; }
|
||||
set
|
||||
{
|
||||
if (m_TransitionTexture != value)
|
||||
{
|
||||
m_TransitionTexture = value;
|
||||
if (graphic)
|
||||
{
|
||||
ModifyMaterial();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public EffectMode effectMode { get { return m_EffectMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Keep aspect ratio.
|
||||
/// </summary>
|
||||
public bool keepAspectRatio
|
||||
{
|
||||
get { return m_KeepAspectRatio; }
|
||||
set
|
||||
{
|
||||
if (m_KeepAspectRatio != value)
|
||||
{
|
||||
m_KeepAspectRatio = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
public override void ModifyMaterial()
|
||||
{
|
||||
ulong hash = (m_TransitionTexture ? (uint)m_TransitionTexture.GetInstanceID() : 0) + (uint)m_EffectMode;
|
||||
if (_materialCache != null && (_materialCache.hash != hash || !isActiveAndEnabled || !m_EffectMaterial))
|
||||
{
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled || !m_EffectMaterial)
|
||||
{
|
||||
graphic.material = null;
|
||||
}
|
||||
else if (!m_TransitionTexture)
|
||||
{
|
||||
graphic.material = m_EffectMaterial;
|
||||
}
|
||||
else if (_materialCache != null && _materialCache.hash == hash)
|
||||
{
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
else
|
||||
{
|
||||
_materialCache = MaterialCache.Register(hash, m_TransitionTexture, () =>
|
||||
{
|
||||
var mat = new Material(m_EffectMaterial);
|
||||
mat.SetTexture("_TransitionTexture", m_TransitionTexture);
|
||||
return mat;
|
||||
});
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled || m_EffectMode == EffectMode.None)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// rect.
|
||||
var tex = transitionTexture;
|
||||
var aspectRatio = m_KeepAspectRatio && tex ? ((float)tex.width) / tex.height : -1;
|
||||
Rect rect = m_EffectArea.GetEffectArea(vh, graphic, aspectRatio);
|
||||
|
||||
// Set prameters to vertex.
|
||||
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(
|
||||
effectFactor,
|
||||
Packer.ToFloat (x, y)
|
||||
);
|
||||
|
||||
vh.SetUIVertex(vertex, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Protected Members.
|
||||
//################################
|
||||
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 m_EffectMode != EffectMode.None
|
||||
? MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_EffectMode)
|
||||
: null;
|
||||
}
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
MaterialCache _materialCache = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 922b805bc01c243e5853d9cbb544118c
|
||||
timeCreated: 1485321967
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -56,7 +56,7 @@ Shader "UI/Hidden/UI-Effect-Dissolve"
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
@@ -3,7 +3,9 @@ guid: e1b48dc831eb147e9886c049033213bf
|
||||
timeCreated: 1523859834
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
Shader "UI/Hidden/UI-Effect-HSV"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
float2 uv1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 wpos : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
half4 range : TEXCOORD2;
|
||||
half3 hsv : TEXCOORD3;
|
||||
};
|
||||
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.wpos = IN.vertex;
|
||||
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
OUT.texcoord = IN.texcoord;
|
||||
OUT.color = IN.color;
|
||||
|
||||
OUT.range = UnpackToVec4(IN.uv1.x);
|
||||
OUT.hsv = UnpackToVec3(IN.uv1.y) - 0.5f;
|
||||
OUT.hsv.yz *= 2;
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half3 rgb2hsv(half3 c) {
|
||||
half4 K = half4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
half4 p = lerp(half4(c.bg, K.wz), half4(c.gb, K.xy), step(c.b, c.g));
|
||||
half4 q = lerp(half4(p.xyw, c.r), half4(c.r, p.yzx), step(p.x, c.r));
|
||||
|
||||
half d = q.x - min(q.w, q.y);
|
||||
half e = 1.0e-10;
|
||||
return half3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
||||
}
|
||||
|
||||
half3 hsv2rgb(half3 c) {
|
||||
c = half3(c.x, clamp(c.yz, 0.0, 1.0));
|
||||
half4 K = half4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
half3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * lerp(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : COLOR
|
||||
{
|
||||
half4 color = tex2D(_MainTex, IN.texcoord);// + _TextureSampleAdd) * IN.color;
|
||||
|
||||
color.a *= UnityGet2DClipping(IN.wpos.xy, _ClipRect);
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
half3 hsv = rgb2hsv(color.rgb);
|
||||
half3 range = abs(hsv - IN.range.xyz);
|
||||
half diff = max(max(min(1-range.x, range.x), min(1-range.y, range.y)/10), min(1-range.z, range.z)/10);
|
||||
|
||||
fixed masked = step(diff, IN.range.w);
|
||||
color.rgb = hsv2rgb(hsv + IN.hsv.xyz * masked);
|
||||
|
||||
return (color + _TextureSampleAdd) * IN.color;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fc74090480c84f8b977cfcd55cdfe82
|
||||
timeCreated: 1531882595
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,131 @@
|
||||
Shader "UI/Hidden/UI-Effect-Transition"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
[Header(Transition)]
|
||||
_TransitionTexture("Transition Texture (A)", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
#pragma shader_feature __ FADE CUTOFF
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
half2 factor : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 wpos : TEXCOORD1;
|
||||
half3 factor : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _TransitionTexture;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.wpos = IN.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.wpos);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
OUT.factor = half3(IN.factor.x, UnpackToVec2(IN.factor.y));
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half effectFactor = IN.factor.x;
|
||||
half alpha = tex2D(_TransitionTexture, IN.factor.yz).a;
|
||||
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd);
|
||||
color.a *= UnityGet2DClipping(IN.wpos.xy, _ClipRect);
|
||||
|
||||
#if FADE
|
||||
color.a = color.a * alpha + (effectFactor * 2 - 1);
|
||||
color.a *= step(0.001, color.a);
|
||||
#elif CUTOFF
|
||||
color.a = step(0.001, color.a * alpha - 1 + effectFactor);
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color * IN.color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85ad24dd0759947ddb117625e108d49c
|
||||
timeCreated: 1482973535
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _TransitionTexture: {fileID: 2800000, guid: a74d3d4a498866d44b094d3d3717604d,
|
||||
type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,156 +1,186 @@
|
||||
#ifndef UI_EFFECT_INCLUDED
|
||||
#define UI_EFFECT_INCLUDED
|
||||
|
||||
//################################
|
||||
// Define
|
||||
//################################
|
||||
#define PACKER_STEP 64
|
||||
|
||||
#if UI_TONE_GRAYSCALE | UI_TONE_SEPIA | UI_TONE_NEGA | UI_TONE_PIXEL | UI_TONE_MONO | UI_TONE_CUTOFF | UI_TONE_HUE
|
||||
#if GRAYSCALE | SEPIA | NEGA | PIXEL | MONO | CUTOFF | HUE
|
||||
#define UI_TONE
|
||||
#endif
|
||||
|
||||
#if UI_COLOR_ADD | UI_COLOR_SUB | UI_COLOR_SET
|
||||
#if ADD | SUBTRACT | FILL
|
||||
#define UI_COLOR
|
||||
#endif
|
||||
|
||||
#if UI_BLUR_FAST | UI_BLUR_MEDIUM | UI_BLUR_DETAIL
|
||||
#if FASTBLUR | MEDIUMBLUR | DETAILBLUR
|
||||
#define UI_BLUR
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Unpacker to vector
|
||||
//################################
|
||||
// Unpack float to low-precision [0-1] fixed4.
|
||||
// Unpack float to low-precision [0-1] fixed4.
|
||||
fixed4 UnpackToVec4(float value)
|
||||
{
|
||||
{
|
||||
const int PACKER_STEP = 64;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed4 color;
|
||||
fixed4 unpacked;
|
||||
|
||||
color.r = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
unpacked.x = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.g = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
unpacked.y = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.b = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
unpacked.z = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.a = (value % PACKER_STEP) / PRECISION;
|
||||
return color;
|
||||
unpacked.w = (value % PACKER_STEP) / PRECISION;
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
//################################
|
||||
// Blur effect
|
||||
//################################
|
||||
// Calculate blur effect.
|
||||
// Sample texture by blured uv, with bias.
|
||||
fixed4 Blur(sampler2D tex, half2 uv, half2 addUv, half bias)
|
||||
// Unpack float to low-precision [0-1] fixed3.
|
||||
fixed3 UnpackToVec3(float value)
|
||||
{
|
||||
return
|
||||
(
|
||||
tex2D(tex, uv + half2(addUv.x, addUv.y))
|
||||
+ tex2D(tex, uv + half2(-addUv.x, addUv.y))
|
||||
+ tex2D(tex, uv + half2(addUv.x, -addUv.y))
|
||||
+ tex2D(tex, uv + half2(-addUv.x, -addUv.y))
|
||||
#if UI_BLUR_DETAIL
|
||||
+ tex2D(tex, uv + half2(addUv.x, 0))
|
||||
+ tex2D(tex, uv + half2(-addUv.x, 0))
|
||||
+ tex2D(tex, uv + half2(0, addUv.y))
|
||||
+ tex2D(tex, uv + half2(0, -addUv.y))
|
||||
)
|
||||
* bias / 2;
|
||||
#else
|
||||
)
|
||||
* bias;
|
||||
#endif
|
||||
const int PACKER_STEP = 256;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed3 unpacked;
|
||||
|
||||
unpacked.x = (value % (PACKER_STEP)) / (PACKER_STEP - 1);
|
||||
value = floor(value / (PACKER_STEP));
|
||||
|
||||
unpacked.y = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
unpacked.z = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
// Unpack float to low-precision [0-1] half2.
|
||||
half2 UnpackToVec2(float value)
|
||||
{
|
||||
const int PACKER_STEP = 4096;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
half2 unpacked;
|
||||
|
||||
unpacked.x = (value % (PACKER_STEP)) / (PACKER_STEP - 1);
|
||||
value = floor(value / (PACKER_STEP));
|
||||
|
||||
unpacked.y = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
|
||||
// Sample texture with blurring.
|
||||
// * Fast: Sample texture with 3x3 kernel.
|
||||
// * Medium: Sample texture with 5x5 kernel.
|
||||
// * Detail: Sample texture with 7x7 kernel.
|
||||
fixed4 Tex2DBlurring (sampler2D tex, half2 uv, half2 blur)
|
||||
{
|
||||
#if FASTBLUR
|
||||
const int KERNEL_SIZE = 3;
|
||||
#elif MEDIUMBLUR
|
||||
const int KERNEL_SIZE = 5;
|
||||
#elif DETAILBLUR
|
||||
const int KERNEL_SIZE = 7;
|
||||
#else
|
||||
const int KERNEL_SIZE = 1;
|
||||
#endif
|
||||
float4 o = 0;
|
||||
float sum = 0;
|
||||
float weight;
|
||||
half2 texcood;
|
||||
for(int x = -KERNEL_SIZE/2; x <= KERNEL_SIZE/2; x++)
|
||||
{
|
||||
for(int y = -KERNEL_SIZE/2; y <= KERNEL_SIZE/2; y++)
|
||||
{
|
||||
texcood = uv;
|
||||
texcood.x += blur.x * x;
|
||||
texcood.y += blur.y * y;
|
||||
weight = 1.0/(abs(x)+abs(y)+2);
|
||||
o += tex2D(tex, texcood)*weight;
|
||||
sum += weight;
|
||||
}
|
||||
}
|
||||
return o / sum;
|
||||
}
|
||||
|
||||
// Sample texture with blurring.
|
||||
// * Fast: Sample texture with 3x4 blurring.
|
||||
// * Medium: Sample texture with 6x4 blurring.
|
||||
// * Detail: Sample texture with 6x8 blurring.
|
||||
fixed4 Tex2DBlurring(sampler2D tex, half2 uv, half2 blur)
|
||||
// * Fast: Sample texture with 3x1 kernel.
|
||||
// * Medium: Sample texture with 5x1 kernel.
|
||||
// * Detail: Sample texture with 7x1 kernel.
|
||||
fixed4 Tex2DBlurring1D (sampler2D tex, half2 uv, half2 blur)
|
||||
{
|
||||
half4 color = tex2D(tex, uv);
|
||||
|
||||
#if UI_BLUR_FAST
|
||||
return color * 0.41511
|
||||
+ Blur( tex, uv, blur * 3, 0.12924 )
|
||||
+ Blur( tex, uv, blur * 5, 0.01343 )
|
||||
+ Blur( tex, uv, blur * 6, 0.00353 );
|
||||
|
||||
#elif UI_BLUR_MEDIUM | UI_BLUR_DETAIL
|
||||
return color * 0.14387
|
||||
+ Blur( tex, uv, blur * 1, 0.06781 )
|
||||
+ Blur( tex, uv, blur * 2, 0.05791 )
|
||||
+ Blur( tex, uv, blur * 3, 0.04360 )
|
||||
+ Blur( tex, uv, blur * 4, 0.02773 )
|
||||
+ Blur( tex, uv, blur * 5, 0.01343 )
|
||||
+ Blur( tex, uv, blur * 6, 0.00353 );
|
||||
#if FASTBLUR
|
||||
const int KERNEL_SIZE = 3;
|
||||
#elif MEDIUMBLUR
|
||||
const int KERNEL_SIZE = 5;
|
||||
#elif DETAILBLUR
|
||||
const int KERNEL_SIZE = 7;
|
||||
#else
|
||||
return color;
|
||||
const int KERNEL_SIZE = 1;
|
||||
#endif
|
||||
float4 o = 0;
|
||||
float sum = 0;
|
||||
float weight;
|
||||
half2 texcood;
|
||||
for(int i = -KERNEL_SIZE/2; i <= KERNEL_SIZE/2; i++)
|
||||
{
|
||||
texcood = uv;
|
||||
texcood.x += blur.x * i;
|
||||
texcood.y += blur.y * i;
|
||||
weight = 1.0/(abs(i)+2);
|
||||
o += tex2D(tex, texcood)*weight;
|
||||
sum += weight;
|
||||
}
|
||||
return o / sum;
|
||||
}
|
||||
|
||||
//################################
|
||||
// Tone effect
|
||||
//################################
|
||||
fixed3 shift_hue(fixed3 RGB, half VSU, half VSW)
|
||||
{
|
||||
fixed3 RESULT;
|
||||
RESULT.x = (0.299 + 0.701*VSU + 0.168*VSW)*RGB.x
|
||||
fixed3 result;
|
||||
result.x = (0.299 + 0.701*VSU + 0.168*VSW)*RGB.x
|
||||
+ (0.587 - 0.587*VSU + 0.330*VSW)*RGB.y
|
||||
+ (0.114 - 0.114*VSU - 0.497*VSW)*RGB.z;
|
||||
|
||||
RESULT.y = (0.299 - 0.299*VSU - 0.328*VSW)*RGB.x
|
||||
result.y = (0.299 - 0.299*VSU - 0.328*VSW)*RGB.x
|
||||
+ (0.587 + 0.413*VSU + 0.035*VSW)*RGB.y
|
||||
+ (0.114 - 0.114*VSU + 0.292*VSW)*RGB.z;
|
||||
|
||||
RESULT.z = (0.299 - 0.3*VSU + 1.25*VSW)*RGB.x
|
||||
result.z = (0.299 - 0.3*VSU + 1.25*VSW)*RGB.x
|
||||
+ (0.587 - 0.588*VSU - 1.05*VSW)*RGB.y
|
||||
+ (0.114 + 0.886*VSU - 0.203*VSW)*RGB.z;
|
||||
|
||||
return (RESULT);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Apply tone effect.
|
||||
fixed4 ApplyToneEffect(fixed4 color, fixed factor)
|
||||
{
|
||||
#ifdef UI_TONE_GRAYSCALE // Grayscale
|
||||
#ifdef GRAYSCALE
|
||||
color.rgb = lerp(color.rgb, Luminance(color.rgb), factor);
|
||||
|
||||
#elif UI_TONE_SEPIA // Sepia
|
||||
#elif SEPIA
|
||||
color.rgb = lerp(color.rgb, Luminance(color.rgb) * half3(1.07, 0.74, 0.43), factor);
|
||||
|
||||
#elif UI_TONE_NEGA // Nega
|
||||
#elif NEGA
|
||||
color.rgb = lerp(color.rgb, 1 - color.rgb, factor);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Color effect
|
||||
//################################
|
||||
// Apply color effect.
|
||||
half4 ApplyColorEffect(half4 color, half4 factor)
|
||||
{
|
||||
#ifdef UI_COLOR_SET // Set
|
||||
#ifdef FILL
|
||||
color.rgb = lerp(color.rgb, factor.rgb, factor.a);
|
||||
|
||||
#elif UI_COLOR_ADD // Add
|
||||
#elif ADD
|
||||
color.rgb += factor.rgb * factor.a;
|
||||
|
||||
#elif UI_COLOR_SUB // Sub
|
||||
#elif SUBTRACT
|
||||
color.rgb -= factor.rgb * factor.a;
|
||||
|
||||
#else
|
||||
color.rgb = lerp(color.rgb, color.rgb * factor.rgb, factor.a);
|
||||
#endif
|
||||
|
||||
#if UI_TONE_CUTOFF
|
||||
#if CUTOFF
|
||||
color.a = factor.a;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -50,13 +50,17 @@ Shader "UI/Hidden/UI-Effect"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#if !defined(SHADER_API_D3D11_9X) && !defined(SHADER_API_D3D9)
|
||||
#pragma target 2.0
|
||||
#else
|
||||
#pragma target 3.0
|
||||
#endif
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL UI_TONE_MONO UI_TONE_CUTOFF UI_TONE_HUE
|
||||
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
|
||||
#pragma shader_feature __ UI_BLUR_FAST UI_BLUR_MEDIUM UI_BLUR_DETAIL
|
||||
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL MONO CUTOFF HUE
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
@@ -87,8 +91,8 @@ Shader "UI/Hidden/UI-Effect"
|
||||
#if defined (UI_TONE) || defined (UI_BLUR)
|
||||
half4 effectFactor : TEXCOORD2;
|
||||
#endif
|
||||
#if UI_TONE_HUE || UI_TONE_PIXEL
|
||||
half4 extraFactor : TEXCOORD3;
|
||||
#if HUE || PIXEL
|
||||
half2 extraFactor : TEXCOORD3;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -114,10 +118,10 @@ Shader "UI/Hidden/UI-Effect"
|
||||
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
|
||||
#endif
|
||||
|
||||
#if UI_TONE_HUE
|
||||
#if HUE
|
||||
OUT.extraFactor.x = cos(OUT.effectFactor.x*3.14159265359 * 2);
|
||||
OUT.extraFactor.y = sin(OUT.effectFactor.x*3.14159265359 * 2);
|
||||
#elif UI_TONE_PIXEL
|
||||
#elif PIXEL
|
||||
OUT.extraFactor.xy = max(2, (1-OUT.effectFactor.x*0.98) * _MainTex_TexelSize.zw);
|
||||
#endif
|
||||
|
||||
@@ -131,7 +135,7 @@ Shader "UI/Hidden/UI-Effect"
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
#if UI_TONE_PIXEL
|
||||
#if PIXEL
|
||||
IN.texcoord = round(IN.texcoord * IN.extraFactor.xy) / IN.extraFactor.xy;
|
||||
#endif
|
||||
|
||||
@@ -142,18 +146,18 @@ Shader "UI/Hidden/UI-Effect"
|
||||
#endif
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
#ifdef UI_TONE_CUTOFF
|
||||
#ifdef CUTOFF
|
||||
clip (color.a - 1 + IN.effectFactor.x * 1.001);
|
||||
#elif UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
#if UI_TONE_MONO
|
||||
#if MONO
|
||||
color.rgb = IN.color.rgb;
|
||||
color.a = color.a * tex2D(_MainTex, IN.texcoord).a + IN.effectFactor.x * 2 - 1;
|
||||
#elif UI_TONE_HUE
|
||||
#elif HUE
|
||||
color.rgb = shift_hue(color.rgb, IN.extraFactor.x, IN.extraFactor.y);
|
||||
#elif defined (UI_TONE) & !UI_TONE_CUTOFF
|
||||
#elif defined (UI_TONE) & !CUTOFF
|
||||
color = ApplyToneEffect(color, IN.effectFactor.x);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,84 +14,53 @@ Shader "UI/Hidden/UI-EffectCapture"
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
Name "Effect-Base"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL UI_TONE_MONO UI_TONE_CUTOFF UI_TONE_HUE
|
||||
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
|
||||
#pragma shader_feature __ UI_BLUR_FAST UI_BLUR_MEDIUM UI_BLUR_DETAIL
|
||||
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
fixed4 colorFactor : COLOR1;
|
||||
#endif
|
||||
|
||||
half4 effectFactor : TEXCOORD2;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
half4 _EffectFactor;
|
||||
fixed4 _ColorFactor;
|
||||
|
||||
v2f vert(appdata_img v)
|
||||
v2f_img vert(appdata_img v)
|
||||
{
|
||||
v2f OUT;
|
||||
OUT.vertex = UnityObjectToClipPos(v.vertex);
|
||||
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.effectFactor = _EffectFactor;
|
||||
|
||||
#if UI_TONE_HUE
|
||||
OUT.effectFactor.y = sin(OUT.effectFactor.x*3.14159265359*2);
|
||||
OUT.effectFactor.x = cos(OUT.effectFactor.x*3.14159265359*2);
|
||||
#elif UI_TONE_PIXEL
|
||||
OUT.effectFactor.xy = max(2, (1-OUT.effectFactor.x) * _MainTex_TexelSize.zw);
|
||||
#endif
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
OUT.colorFactor = _ColorFactor;
|
||||
#endif
|
||||
|
||||
v2f_img o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.texcoord;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
OUT.texcoord.y = lerp(OUT.texcoord.y, 1 - OUT.texcoord.y, OUT.effectFactor.w);
|
||||
o.uv.y = 1 - o.uv.y;
|
||||
#endif
|
||||
|
||||
return OUT;
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
fixed4 frag(v2f_img IN) : SV_Target
|
||||
{
|
||||
#if UI_TONE_PIXEL
|
||||
IN.texcoord = round(IN.texcoord * IN.effectFactor.xy) / IN.effectFactor.xy;
|
||||
#endif
|
||||
half effectFactor = _EffectFactor.x;
|
||||
fixed4 colorFactor = _ColorFactor;
|
||||
|
||||
#if defined (UI_BLUR)
|
||||
half4 color = Tex2DBlurring(_MainTex, IN.texcoord, IN.effectFactor.z * _MainTex_TexelSize.xy * 2);
|
||||
#else
|
||||
half4 color = tex2D(_MainTex, IN.texcoord);
|
||||
#if PIXEL
|
||||
half2 pixelScale = max(2, (1 - effectFactor) * _MainTex_TexelSize.zw);
|
||||
IN.uv = round(IN.uv * pixelScale) / pixelScale;
|
||||
#endif
|
||||
|
||||
#if UI_TONE_HUE
|
||||
color.rgb = shift_hue(color.rgb, IN.effectFactor.x, IN.effectFactor.y);
|
||||
#elif defined (UI_TONE)
|
||||
color = ApplyToneEffect(color, IN.effectFactor.x);
|
||||
half4 color = tex2D(_MainTex, IN.uv);
|
||||
|
||||
#if defined (UI_TONE)
|
||||
color = ApplyToneEffect(color, effectFactor);
|
||||
#endif
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
color = ApplyColorEffect(color, IN.colorFactor);
|
||||
color = ApplyColorEffect(color, colorFactor);
|
||||
#endif
|
||||
|
||||
color.a = 1;
|
||||
@@ -99,5 +68,34 @@ Shader "UI/Hidden/UI-EffectCapture"
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Effect-Blur"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_img
|
||||
#pragma fragment frag_blur
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
half4 _EffectFactor;
|
||||
|
||||
fixed4 frag_blur(v2f_img IN) : SV_Target
|
||||
{
|
||||
half2 blurFactor = _EffectFactor.xy;
|
||||
half4 color = Tex2DBlurring1D(_MainTex, IN.uv, blurFactor * _MainTex_TexelSize.xy * 2);
|
||||
color.a = 1;
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -6,10 +8,6 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
using BlurMode = UIEffect.BlurMode;
|
||||
using ColorMode = UIEffect.ColorMode;
|
||||
using ToneMode = UIEffect.ToneMode;
|
||||
|
||||
public static class MaterialBundle
|
||||
{
|
||||
[MenuItem("UIEffect/Generate Material Bundle")]
|
||||
@@ -36,6 +34,13 @@ namespace Coffee.UIExtensions
|
||||
, (BlurMode[])Enum.GetValues(typeof(BlurMode))
|
||||
);
|
||||
|
||||
GenerateMaterialVariants(
|
||||
Shader.Find(UIDissolve.shaderName)
|
||||
, new ToneMode[]{ToneMode.None}
|
||||
, (ColorMode[])Enum.GetValues(typeof(ColorMode))
|
||||
, new BlurMode[]{BlurMode.None}
|
||||
);
|
||||
|
||||
AssetDatabase.StopAssetEditing();
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
@@ -51,9 +56,10 @@ namespace Coffee.UIExtensions
|
||||
for (int i = 0; i < combinations.Length; i++)
|
||||
{
|
||||
var comb = combinations[i];
|
||||
|
||||
EditorUtility.DisplayProgressBar("Genarate Effect Material Bundle", UIEffect.GetVariantName(shader, comb.tone, comb.color, comb.blur), (float)i / combinations.Length);
|
||||
UIEffect.GetOrGenerateMaterialVariant(shader, comb.tone, comb.color, comb.blur);
|
||||
var name = MaterialResolver.GetVariantName(shader, comb.tone, comb.color, comb.blur);
|
||||
EditorUtility.DisplayProgressBar("Genarate Effect Material Bundle", name, (float)i / combinations.Length);
|
||||
|
||||
MaterialResolver.GetOrGenerateMaterialVariant(shader, comb.tone, comb.color, comb.blur);
|
||||
}
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 862bf82ce26d647879e5918559c07976
|
||||
timeCreated: 1527674400
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,140 @@
|
||||
# Changelog
|
||||
|
||||
## [v2.8.3](https://github.com/mob-sakai/UIEffect/tree/v2.8.3) (2018-09-29)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.2...v2.8.3)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- UIEffectCapturedImage: Black screen with Unity 2018.1+ editor on Windows [\#131](https://github.com/mob-sakai/UIEffect/issues/131)
|
||||
|
||||
## [v2.8.2](https://github.com/mob-sakai/UIEffect/tree/v2.8.2) (2018-09-26)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.1...v2.8.2)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- UICapturedEffectImage does not work with 'ScreenSpace - Overlay' in edit mode [\#128](https://github.com/mob-sakai/UIEffect/issues/128)
|
||||
- The UIEffectCapturedImage is upside down with 'ScreenSpace - Overlay' mode [\#127](https://github.com/mob-sakai/UIEffect/issues/127)
|
||||
- When "UI-Effect.mat" is created automatically, Unity hangs up. [\#126](https://github.com/mob-sakai/UIEffect/issues/126)
|
||||
- UICapturedEffectImage does not work with Lightweight Render Pipeline LWRP [\#125](https://github.com/mob-sakai/UIEffect/issues/125)
|
||||
|
||||
## [v2.8.1](https://github.com/mob-sakai/UIEffect/tree/v2.8.1) (2018-08-17)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.0...v2.8.1)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- \(Demo\) "Transition capture & dissolve" is incorrect [\#119](https://github.com/mob-sakai/UIEffect/issues/119)
|
||||
|
||||
## [v2.8.0](https://github.com/mob-sakai/UIEffect/tree/v2.8.0) (2018-08-14)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.1...v2.8.0)
|
||||
|
||||
* Create a screen transition!
|
||||

|
||||
|
||||
* Some updates make UIEffectCapturedImage easier to use!
|
||||
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- UIEffectCapturedImage: Supports 'ScreenSpace - Overlay' [\#115](https://github.com/mob-sakai/UIEffect/issues/115)
|
||||
- UIEffectCapturedImage: Keep aspect ratio [\#114](https://github.com/mob-sakai/UIEffect/issues/114)
|
||||
- UIEffectCapturedImage: 'Capture on enable' option [\#113](https://github.com/mob-sakai/UIEffect/issues/113)
|
||||
- UITransitionEffect: Change transition texture [\#111](https://github.com/mob-sakai/UIEffect/issues/111)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- UIEffectCapturedImage: change parameter name `keepCanvasSize` to `fitToScreen` [\#116](https://github.com/mob-sakai/UIEffect/issues/116)
|
||||
|
||||
## [v2.7.1](https://github.com/mob-sakai/UIEffect/tree/v2.7.1) (2018-08-06)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.0...v2.7.1)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- In v2.7.0, UIEffectCapturedImage is flipped vertically on Windows [\#112](https://github.com/mob-sakai/UIEffect/issues/112)
|
||||
|
||||
## [v2.7.0](https://github.com/mob-sakai/UIEffect/tree/v2.7.0) (2018-07-26)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.2...v2.7.0)
|
||||
|
||||
UIHsvModifier: Modify hue, saturation, and value as you like!
|
||||

|
||||
|
||||
* Note: `Hue` mode in UIEffect component will be obsolete in the near future. Please use UIHsvModifier component instead.
|
||||
* Note: `Cutoff` and `Mono` mode in UIEffect component will be obsolete in the near future. Please use UITransitionEffect component instead.
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- UIEffectCapturedImage: Support target RenderTexture to use external component [\#108](https://github.com/mob-sakai/UIEffect/issues/108)
|
||||
- Transition effect as other component [\#105](https://github.com/mob-sakai/UIEffect/issues/105)
|
||||
- Use multi-pass blurring to capture screenshot [\#96](https://github.com/mob-sakai/UIEffect/issues/96)
|
||||
- Feature: HSV modifier [\#44](https://github.com/mob-sakai/UIEffect/issues/44)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- UIEffectCapturedImage: ColorMode is not working [\#109](https://github.com/mob-sakai/UIEffect/issues/109)
|
||||
- UIDissolve is not maskable [\#101](https://github.com/mob-sakai/UIEffect/issues/101)
|
||||
|
||||
## [v2.6.2](https://github.com/mob-sakai/UIEffect/tree/v2.6.2) (2018-07-18)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.1...v2.6.2)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Shader has compile errors in D3D9 or D3D11\_9X\(WSA\) [\#99](https://github.com/mob-sakai/UIEffect/issues/99)
|
||||
|
||||
## [v2.6.1](https://github.com/mob-sakai/UIEffect/tree/v2.6.1) (2018-06-14)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.0...v2.6.1)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Errors occurred on build \(v2.6.0\) [\#90](https://github.com/mob-sakai/UIEffect/issues/90)
|
||||
|
||||
## [v2.6.0](https://github.com/mob-sakai/UIEffect/tree/v2.6.0) (2018-06-14)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.2...v2.6.0)
|
||||
|
||||
Blurring effect has been improved about 6 times faster!
|
||||

|
||||
|
||||
You can change noise texture for dissolve effect from inspector or script!
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Improve blurring performance [\#88](https://github.com/mob-sakai/UIEffect/issues/88)
|
||||
- Separate the effect with a character [\#86](https://github.com/mob-sakai/UIEffect/issues/86)
|
||||
- Change dissolve texture [\#75](https://github.com/mob-sakai/UIEffect/issues/75)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Change BlurMode correctly [\#84](https://github.com/mob-sakai/UIEffect/issues/84)
|
||||
- Refactoring to prepare v3.0.0 [\#83](https://github.com/mob-sakai/UIEffect/issues/83)
|
||||
- Change ColorMode correctly [\#51](https://github.com/mob-sakai/UIEffect/issues/51)
|
||||
|
||||
## [v2.5.2](https://github.com/mob-sakai/UIEffect/tree/v2.5.2) (2018-06-07)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.1...v2.5.2)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- When `UIEFFECT\_SEPARATE` symbol is defined, UIDissolve does not work well [\#85](https://github.com/mob-sakai/UIEffect/issues/85)
|
||||
|
||||
## [v2.5.1](https://github.com/mob-sakai/UIEffect/tree/v2.5.1) (2018-05-31)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.0...v2.5.1)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Fix demo [\#82](https://github.com/mob-sakai/UIEffect/issues/82)
|
||||
|
||||
## [v2.5.0](https://github.com/mob-sakai/UIEffect/tree/v2.5.0) (2018-05-31)
|
||||
|
||||
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.4.1...v2.5.0)
|
||||
|
||||
@@ -6,4 +6,4 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/UIEffect/Demo/Demo - UIEffect.unity
|
||||
path: Assets/Coffee/UIExtensions/UIEffect/Demo/UIEffect_Demo.unity
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
--- !u!129 &1
|
||||
PlayerSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
serializedVersion: 10
|
||||
productGUID: 893acf534ad534977b834042374da133
|
||||
AndroidProfiler: 0
|
||||
defaultScreenOrientation: 4
|
||||
targetDevice: 2
|
||||
@@ -13,20 +14,46 @@ PlayerSettings:
|
||||
productName: UIEffect
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1}
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
m_SplashScreenLogoStyle: 1
|
||||
m_SplashScreenDrawMode: 0
|
||||
m_SplashScreenBackgroundAnimationZoom: 1
|
||||
m_SplashScreenLogoAnimationZoom: 1
|
||||
m_SplashScreenBackgroundLandscapeAspect: 1
|
||||
m_SplashScreenBackgroundPortraitAspect: 1
|
||||
m_SplashScreenBackgroundLandscapeUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenBackgroundPortraitUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenLogos: []
|
||||
m_SplashScreenBackgroundLandscape: {fileID: 0}
|
||||
m_SplashScreenBackgroundPortrait: {fileID: 0}
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
m_RenderingPath: 1
|
||||
m_MobileRenderingPath: 1
|
||||
defaultScreenWidthWeb: 600
|
||||
defaultScreenHeightWeb: 800
|
||||
m_StereoRenderingPath: 0
|
||||
m_ActiveColorSpace: 0
|
||||
m_MTRendering: 1
|
||||
m_MobileMTRendering: 0
|
||||
m_Stereoscopic3D: 0
|
||||
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||
iosShowActivityIndicatorOnLoading: -1
|
||||
androidShowActivityIndicatorOnLoading: -1
|
||||
tizenShowActivityIndicatorOnLoading: -1
|
||||
iosAppInBackgroundBehavior: 0
|
||||
displayResolutionDialog: 1
|
||||
iosAllowHTTPDownload: 1
|
||||
@@ -41,7 +68,7 @@ PlayerSettings:
|
||||
defaultIsNativeResolution: 1
|
||||
runInBackground: 0
|
||||
captureSingleScreen: 0
|
||||
Override IPod Music: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
submitAnalytics: 1
|
||||
usePlayerLog: 1
|
||||
@@ -50,6 +77,7 @@ PlayerSettings:
|
||||
resizableWindow: 0
|
||||
useMacAppStoreValidation: 0
|
||||
gpuSkinning: 0
|
||||
graphicsJobs: 0
|
||||
xboxPIXTextureCapture: 0
|
||||
xboxEnableAvatar: 0
|
||||
xboxEnableKinect: 0
|
||||
@@ -68,8 +96,10 @@ PlayerSettings:
|
||||
n3dsEnableSharedListOpt: 1
|
||||
n3dsEnableVSync: 0
|
||||
uiUse16BitDepthBuffer: 0
|
||||
ignoreAlphaClear: 0
|
||||
xboxOneResolution: 0
|
||||
ps3SplashScreen: {fileID: 0}
|
||||
xboxOneMonoLoggingLevel: 0
|
||||
xboxOneLoggingLevel: 1
|
||||
videoMemoryForVertexBuffers: 0
|
||||
psp2PowerMode: 0
|
||||
psp2AcquireBGM: 1
|
||||
@@ -91,11 +121,10 @@ PlayerSettings:
|
||||
bundleIdentifier: com.coffee.uieffect
|
||||
bundleVersion: 1.0
|
||||
preloadedAssets: []
|
||||
metroEnableIndependentInputSource: 0
|
||||
metroEnableLowLatencyPresentationAPI: 0
|
||||
metroInputSource: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
xboxOneDisableKinectGpuReservation: 0
|
||||
virtualRealitySupported: 0
|
||||
productGUID: 893acf534ad534977b834042374da133
|
||||
protectGraphicsMemory: 0
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 9
|
||||
AndroidPreferredInstallLocation: 1
|
||||
@@ -115,7 +144,10 @@ PlayerSettings:
|
||||
serializedVersion: 2
|
||||
m_Bits: 238
|
||||
iPhoneSdkVersion: 988
|
||||
iPhoneTargetOSVersion: 22
|
||||
iOSTargetOSVersionString: 6.0
|
||||
tvOSSdkVersion: 0
|
||||
tvOSRequireExtendedGameController: 0
|
||||
tvOSTargetOSVersionString:
|
||||
uIPrerenderedIcon: 0
|
||||
uIRequiresPersistentWiFi: 0
|
||||
uIRequiresFullScreen: 1
|
||||
@@ -133,6 +165,10 @@ PlayerSettings:
|
||||
iPadLandscapeSplashScreen: {fileID: 0}
|
||||
iPadHighResLandscapeSplashScreen: {fileID: 0}
|
||||
appleTVSplashScreen: {fileID: 0}
|
||||
tvOSSmallIconLayers: []
|
||||
tvOSLargeIconLayers: []
|
||||
tvOSTopShelfImageLayers: []
|
||||
tvOSTopShelfImageWideLayers: []
|
||||
iOSLaunchScreenType: 0
|
||||
iOSLaunchScreenPortrait: {fileID: 0}
|
||||
iOSLaunchScreenLandscape: {fileID: 0}
|
||||
@@ -151,6 +187,13 @@ PlayerSettings:
|
||||
iOSLaunchScreeniPadSize: 100
|
||||
iOSLaunchScreeniPadCustomXibPath:
|
||||
iOSDeviceRequirements: []
|
||||
iOSURLSchemes: []
|
||||
iOSBackgroundModes: 0
|
||||
iOSMetalForceHardShadows: 0
|
||||
appleDeveloperTeamID:
|
||||
iOSManualSigningProvisioningProfileID:
|
||||
tvOSManualSigningProvisioningProfileID:
|
||||
appleEnableAutomaticSigning: 0
|
||||
AndroidTargetDevice: 0
|
||||
AndroidSplashScreenScale: 0
|
||||
androidSplashScreen: {fileID: 0}
|
||||
@@ -174,6 +217,9 @@ PlayerSettings:
|
||||
m_Height: 128
|
||||
m_BuildTargetBatching: []
|
||||
m_BuildTargetGraphicsAPIs: []
|
||||
m_BuildTargetVRSettings: []
|
||||
openGLRequireES31: 0
|
||||
openGLRequireES31AEP: 0
|
||||
webPlayerTemplate: APPLICATION:Default
|
||||
m_TemplateCustomTags: {}
|
||||
wiiUTitleID: 0005000011000000
|
||||
@@ -192,12 +238,15 @@ PlayerSettings:
|
||||
wiiUSystemHeapSize: 128
|
||||
wiiUTVStartupScreen: {fileID: 0}
|
||||
wiiUGamePadStartupScreen: {fileID: 0}
|
||||
wiiUDrcBufferDisabled: 0
|
||||
wiiUProfilerLibPath:
|
||||
actionOnDotNetUnhandledException: 1
|
||||
enableInternalProfiler: 0
|
||||
logObjCUncaughtExceptions: 1
|
||||
enableCrashReportAPI: 0
|
||||
cameraUsageDescription:
|
||||
locationUsageDescription:
|
||||
microphoneUsageDescription:
|
||||
XboxTitleId:
|
||||
XboxImageXexPath:
|
||||
XboxSpaPath:
|
||||
@@ -208,24 +257,6 @@ PlayerSettings:
|
||||
xboxAdditionalTitleMemorySize: 0
|
||||
xboxDeployKinectHeadOrientation: 0
|
||||
xboxDeployKinectHeadPosition: 0
|
||||
ps3TitleConfigPath:
|
||||
ps3DLCConfigPath:
|
||||
ps3ThumbnailPath:
|
||||
ps3BackgroundPath:
|
||||
ps3SoundPath:
|
||||
ps3NPAgeRating: 12
|
||||
ps3TrophyCommId:
|
||||
ps3NpCommunicationPassphrase:
|
||||
ps3TrophyPackagePath:
|
||||
ps3BootCheckMaxSaveGameSizeKB: 128
|
||||
ps3TrophyCommSig:
|
||||
ps3SaveGameSlots: 1
|
||||
ps3TrialMode: 0
|
||||
ps3VideoMemoryForAudio: 0
|
||||
ps3EnableVerboseMemoryStats: 0
|
||||
ps3UseSPUForUmbra: 0
|
||||
ps3EnableMoveSupport: 1
|
||||
ps3DisableDolbyEncoding: 0
|
||||
ps4NPAgeRating: 12
|
||||
ps4NPTitleSecret:
|
||||
ps4NPTrophyPackPath:
|
||||
@@ -237,7 +268,9 @@ PlayerSettings:
|
||||
ps4AppType: 0
|
||||
ps4ParamSfxPath:
|
||||
ps4VideoOutPixelFormat: 0
|
||||
ps4VideoOutResolution: 4
|
||||
ps4VideoOutInitialWidth: 1920
|
||||
ps4VideoOutBaseModeInitialWidth: 1920
|
||||
ps4VideoOutReprojectionRate: 120
|
||||
ps4PronunciationXMLPath:
|
||||
ps4PronunciationSIGPath:
|
||||
ps4BackgroundImagePath:
|
||||
@@ -251,6 +284,7 @@ PlayerSettings:
|
||||
ps4NPtitleDatPath:
|
||||
ps4RemotePlayKeyAssignment: -1
|
||||
ps4RemotePlayKeyMappingDir:
|
||||
ps4PlayTogetherPlayerCount: 0
|
||||
ps4EnterButtonAssignment: 1
|
||||
ps4ApplicationParam1: 0
|
||||
ps4ApplicationParam2: 0
|
||||
@@ -258,24 +292,35 @@ PlayerSettings:
|
||||
ps4ApplicationParam4: 0
|
||||
ps4DownloadDataSize: 0
|
||||
ps4GarlicHeapSize: 2048
|
||||
ps4ProGarlicHeapSize: 2560
|
||||
ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE
|
||||
ps4UseDebugIl2cppLibs: 0
|
||||
ps4pnSessions: 1
|
||||
ps4pnPresence: 1
|
||||
ps4pnFriends: 1
|
||||
ps4pnGameCustomData: 1
|
||||
playerPrefsSupport: 0
|
||||
restrictedAudioUsageRights: 0
|
||||
ps4UseResolutionFallback: 0
|
||||
ps4ReprojectionSupport: 0
|
||||
ps4UseAudio3dBackend: 0
|
||||
ps4SocialScreenEnabled: 0
|
||||
ps4ScriptOptimizationLevel: 3
|
||||
ps4Audio3dVirtualSpeakerCount: 14
|
||||
ps4attribCpuUsage: 0
|
||||
ps4PatchPkgPath:
|
||||
ps4PatchLatestPkgPath:
|
||||
ps4PatchChangeinfoPath:
|
||||
ps4PatchDayOne: 0
|
||||
ps4attribUserManagement: 0
|
||||
ps4attribMoveSupport: 0
|
||||
ps4attrib3DSupport: 0
|
||||
ps4attribShareSupport: 0
|
||||
ps4attribExclusiveVR: 0
|
||||
ps4disableAutoHideSplash: 0
|
||||
ps4videoRecordingFeaturesUsed: 0
|
||||
ps4contentSearchFeaturesUsed: 0
|
||||
ps4attribEyeToEyeDistanceSettingVR: 0
|
||||
ps4IncludedModules: []
|
||||
monoEnv:
|
||||
psp2Splashimage: {fileID: 0}
|
||||
@@ -324,9 +369,35 @@ PlayerSettings:
|
||||
psp2UseLibLocation: 0
|
||||
psp2InfoBarOnStartup: 0
|
||||
psp2InfoBarColor: 0
|
||||
psp2UseDebugIl2cppLibs: 0
|
||||
psmSplashimage: {fileID: 0}
|
||||
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
||||
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
||||
spritePackerPolicy:
|
||||
webGLMemorySize: 256
|
||||
webGLExceptionSupport: 1
|
||||
webGLDataCaching: 0
|
||||
webGLDebugSymbols: 0
|
||||
webGLEmscriptenArgs:
|
||||
webGLModulesDirectory:
|
||||
webGLTemplate: APPLICATION:Default
|
||||
webGLAnalyzeBuildSize: 0
|
||||
webGLUseEmbeddedResources: 0
|
||||
webGLUseWasm: 0
|
||||
webGLCompressionFormat: 1
|
||||
scriptingDefineSymbols: {}
|
||||
platformArchitecture:
|
||||
iOS: 2
|
||||
scriptingBackend:
|
||||
Android: 0
|
||||
WebGL: 1
|
||||
WebPlayer: 0
|
||||
iOS: 1
|
||||
incrementalIl2cppBuild:
|
||||
iOS: 1
|
||||
additionalIl2CppArgs:
|
||||
m_RenderingPath: 1
|
||||
m_MobileRenderingPath: 1
|
||||
metroPackageName: UIEffect
|
||||
metroPackageVersion:
|
||||
metroCertificatePath:
|
||||
@@ -353,29 +424,14 @@ PlayerSettings:
|
||||
metroFTAFileTypes: []
|
||||
metroProtocolName:
|
||||
metroCompilationOverrides: 1
|
||||
blackberryDeviceAddress:
|
||||
blackberryDevicePassword:
|
||||
blackberryTokenPath:
|
||||
blackberryTokenExires:
|
||||
blackberryTokenAuthor:
|
||||
blackberryTokenAuthorId:
|
||||
blackberryCskPassword:
|
||||
blackberrySaveLogPath:
|
||||
blackberrySharedPermissions: 0
|
||||
blackberryCameraPermissions: 0
|
||||
blackberryGPSPermissions: 0
|
||||
blackberryDeviceIDPermissions: 0
|
||||
blackberryMicrophonePermissions: 0
|
||||
blackberryGamepadSupport: 0
|
||||
blackberryBuildId: 0
|
||||
blackberryLandscapeSplashScreen: {fileID: 0}
|
||||
blackberryPortraitSplashScreen: {fileID: 0}
|
||||
blackberrySquareSplashScreen: {fileID: 0}
|
||||
tizenProductDescription:
|
||||
tizenProductURL:
|
||||
tizenSigningProfileName:
|
||||
tizenGPSPermissions: 0
|
||||
tizenMicrophonePermissions: 0
|
||||
tizenDeploymentTarget:
|
||||
tizenDeploymentTargetType: 0
|
||||
tizenMinOSVersion: 0
|
||||
n3dsUseExtSaveData: 0
|
||||
n3dsCompressStaticMem: 1
|
||||
n3dsExtSaveDataNumber: 0x12345
|
||||
@@ -405,51 +461,20 @@ PlayerSettings:
|
||||
XboxOnePackageEncryption: 0
|
||||
XboxOnePackageUpdateGranularity: 2
|
||||
XboxOneDescription:
|
||||
XboxOneLanguage:
|
||||
- enus
|
||||
XboxOneCapability: []
|
||||
XboxOneGameRating: {}
|
||||
XboxOneIsContentPackage: 0
|
||||
XboxOneEnableGPUVariability: 0
|
||||
XboxOneSockets: {}
|
||||
XboxOneSplashScreen: {fileID: 0}
|
||||
XboxOneAllowedProductIds: []
|
||||
XboxOnePersistentLocalStorageSize: 0
|
||||
intPropertyNames:
|
||||
- Android::ScriptingBackend
|
||||
- WebGL::ScriptingBackend
|
||||
- WebGL::audioCompressionFormat
|
||||
- WebGL::exceptionSupport
|
||||
- WebGL::memorySize
|
||||
- WebPlayer::ScriptingBackend
|
||||
- iOS::Architecture
|
||||
- iOS::EnableIncrementalBuildSupportForIl2cpp
|
||||
- iOS::ScriptingBackend
|
||||
Android::ScriptingBackend: 0
|
||||
WebGL::ScriptingBackend: 1
|
||||
WebGL::audioCompressionFormat: 4
|
||||
WebGL::exceptionSupport: 1
|
||||
WebGL::memorySize: 256
|
||||
WebPlayer::ScriptingBackend: 0
|
||||
iOS::Architecture: 2
|
||||
iOS::EnableIncrementalBuildSupportForIl2cpp: 1
|
||||
iOS::ScriptingBackend: 1
|
||||
boolPropertyNames:
|
||||
- WebGL::analyzeBuildSize
|
||||
- WebGL::dataCaching
|
||||
- WebGL::useEmbeddedResources
|
||||
- XboxOne::enus
|
||||
WebGL::analyzeBuildSize: 0
|
||||
WebGL::dataCaching: 0
|
||||
WebGL::useEmbeddedResources: 0
|
||||
XboxOne::enus: 1
|
||||
stringPropertyNames:
|
||||
- Build_ServiceEnabled::Build_ServiceEnabled
|
||||
- UNet_ServiceEnabled::UNet_ServiceEnabled
|
||||
- WebGL::emscriptenArgs
|
||||
- WebGL::template
|
||||
- additionalIl2CppArgs::additionalIl2CppArgs
|
||||
Build_ServiceEnabled::Build_ServiceEnabled: True
|
||||
UNet_ServiceEnabled::UNet_ServiceEnabled: True
|
||||
WebGL::emscriptenArgs:
|
||||
WebGL::template: APPLICATION:Default
|
||||
additionalIl2CppArgs::additionalIl2CppArgs:
|
||||
vrEditorSettings: {}
|
||||
cloudServicesEnabled:
|
||||
Build: 1
|
||||
UNet: 1
|
||||
cloudProjectId: 9c73f463-d463-4a0a-b60d-c348116f2a23
|
||||
projectName: UIEffect
|
||||
organizationId: mob-sakai
|
||||
|
||||
@@ -1 +1 @@
|
||||
m_EditorVersion: 5.5.0p4
|
||||
m_EditorVersion: 5.5.4p5
|
||||
|
||||
@@ -12,8 +12,8 @@ UIEffect contains visual effect components for uGUI element in Unity.
|
||||
|
||||
<< [Description](#Description) | [WebGL Demo](#demo) | [Download](https://github.com/mob-sakai/UIEffect/releases) | [Usage](#usage) | [Development Note](#development-note) >>
|
||||
|
||||
### [RELEASE NOTE ](https://github.com/mob-sakai/UIEffect/blob/develop/CHANGELOG.md)
|
||||
|
||||
### What's new? [See changelog ](https://github.com/mob-sakai/UIEffect/blob/develop/CHANGELOG.md)
|
||||
### Do you want to receive notifications for new releases? [Watch this repo ](https://github.com/mob-sakai/UIEffect/subscription)
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Let's decorate your UI with effects!
|
||||
You can control parameters as you like from the script as well as inspector.
|
||||
AnimationClip is supported as a matter of course!
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
<br><br>
|
||||
@@ -32,17 +32,19 @@ AnimationClip is supported as a matter of course!
|
||||
|
||||
| Component | Features | Screenshot |
|
||||
|-|-|-|
|
||||
|**UIEffect**|Combine some visual effects.<br>See also [Development note](#why-is-uieffect-lightweight?).<br><br>**ToneMode:** Grayscale, Sepia, Nega, Pixelation, Hue shift, Cutoff (alpha-based), Mono (alpha-based)<br>**ColorMode:** Overwrite, Additive, Subtract<br>**BlurMode:** Fast, Medium, Detail<br><br>*NOTE: ToneMode, ColorMode and BlurMode are changeable only in editor.*<br>*NOTE: Custom Effect feature will be obsolete. Please use `UICustomEffect` component instead.*<br>*NOTE: Shadow feature will be obsolete. Please use `UIShadow` component instead.*|<img src="https://user-images.githubusercontent.com/12690315/40757428-68277f0c-64c3-11e8-89e5-4a19616a85c1.png" width="1000px">|
|
||||
|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.<br>See also [Development note](#how-does-uieffectcapturedimage-work?).<br><br>**ToneMode:** Grayscale, Sepia, Nega, Pixelation, Hue shift<br>**ColorMode:** Overwrite, Additive, Subtract<br>**BlurMode:** Fast, Medium, Detail|<img src="https://user-images.githubusercontent.com/12690315/34619468-97e3c134-f285-11e7-90b2-3a75bde13911.gif" width="1000px">|
|
||||
|**UIShiny**|Apply shinning effect to a graphic.<br><br>**Options:** Location, Width, Rotation, Softness, Brightness, Highlight|<img src="https://user-images.githubusercontent.com/12690315/40716998-cd42e954-6445-11e8-899b-f8ba8f1fea83.gif" width="1000px">|
|
||||
|**UIDissolve**|Apply dissolve effect to a graphic.<br><br>**ColorMode:** Overwrite, Additive, Subtract<br>**Options:** Location, Width, Rotation, Softness, Color|<img src="https://user-images.githubusercontent.com/12690315/40717609-f0c3ca40-6447-11e8-97aa-7c4242d12106.gif" width="1000px">|
|
||||
|**UIEffect**|Combine some visual effects.<br><br>**ToneMode:** Grayscale, Sepia, Nega, Pixelation, Hue shift, Cutoff (alpha-based), Mono (alpha-based)<br>**ColorMode:** Multiply, Fill, Additive, Subtract<br>**BlurMode:** Fast, Medium, Detail<br><br>*NOTE: ToneMode, ColorMode and BlurMode are changeable only in editor.*<br>*NOTE: Custom Effect feature is deprecated. Please use `UICustomEffect` component instead.*<br>*NOTE: Shadow feature is deprecated. Please use `UIShadow` component instead.*<br>*NOTE: Hue is deprecated. Please use UIHsvModifier component instead.*<br>*NOTE: Cutoff and Mono is deprecated. Please use UITransitionEffect component instead.*|<img src="https://user-images.githubusercontent.com/12690315/40757428-68277f0c-64c3-11e8-89e5-4a19616a85c1.png" width="1000px">|
|
||||
|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.<br>This effect is non-realtime, light-weight, less-camera, but be effective enough.<br><br>**ToneMode:** Grayscale, Sepia, Nega, Pixelation<br>**ColorMode:** Multiply, Fill, Additive, Subtract<br>**BlurMode:** Fast, Medium, Detail<br>**QualityMode:** Fast, Medium, Detail, Custom<br>**Options:** Capture on enable, Blur iterations, Reduction rate, Target texture, Fit size to screen.<br><br>NOTE: Use this component in 'ScreenSpace - Camera' or 'ScreenSpace - Overlay' mode.|<img src="https://user-images.githubusercontent.com/12690315/44078752-4c2e4114-9fe2-11e8-97f0-54d3a36a562e.gif" width="1000px">|
|
||||
|**UIShiny**|Apply shinning effect to a graphic.<br>The effect does not require Mask component or normal map.<br><br>**Options:** Location, Width, Rotation, Softness, Brightness, Highlight|<img src="https://user-images.githubusercontent.com/12690315/41398144-5c2ca126-6ff1-11e8-954b-394b611e2316.gif" width="1000px">|
|
||||
|**UIDissolve**|Apply dissolve effect to a graphic.<br><br>**ColorMode:** Overwrite, Additive, Subtract<br>**Options:** Location, Width, Rotation, Softness, Color|<img src="https://user-images.githubusercontent.com/12690315/41397973-d1038f7e-6ff0-11e8-919f-affb427393ee.gif" width="1000px">|
|
||||
|**UIHsvModifier**|Modify HSV for graphic.<br><br>**Target:** Color, Range<br>**Adjustment:** Hue, Saturation, Value|<img src="https://user-images.githubusercontent.com/12690315/43200006-d6e2bf54-904e-11e8-9f22-0c0f9ce5912f.gif" width="1000px">|
|
||||
|**UITransition Effect**|Apply transition effect with a single channel texture.<br><br>**EffectMode:** Cutoff, Fade|<img src="https://user-images.githubusercontent.com/12690315/44077521-f1b07c82-9fde-11e8-8487-2294c8d8f843.gif" width="1000px">|
|
||||
|
||||
<br><br>
|
||||
##### The following effects can be used with the above components.
|
||||
|
||||
| Component | Features | Screenshot |
|
||||
|-|-|-|
|
||||
|**UIShadow**|Add shadows/outlines to a graphic.<br>Performance is better than the default Shadow/Outline component.<br>See also [Development note](#the-issue-of-default-outline-component).<br><br>**ShadowStyle:** Shadow, Shadow3, Outline, Outline8<br>**Additional Shadows** reduce vertices for multiple Shadows or Outlines.|<img src="https://user-images.githubusercontent.com/12690315/40716994-ca5c13d2-6445-11e8-96d0-25a3ce704e2e.png" width="1000px">|
|
||||
|**UIShadow**|Add shadow/outline to a graphic.<br>Performance is better than the default Shadow/Outline component.<br>See also [Development note](#the-issue-of-default-outline-component).<br><br>**ShadowStyle:** Shadow, Shadow3, Outline, Outline8<br>**Additional Shadows** reduce vertices for multiple Shadows or Outlines.<br>*NOTE: AdditionalShadow is deprecated. Please use multiple `UIShadow` component instead.*|<img src="https://user-images.githubusercontent.com/12690315/40716994-ca5c13d2-6445-11e8-96d0-25a3ce704e2e.png" width="1000px">|
|
||||
|**UIGradient**|Change vertex color as gradient with angle and offset.<br><br>**Direction:** Horizontal, Vertical, Angle, Diagonal<br>**Options:** Offset, Color space|<img src="https://user-images.githubusercontent.com/12690315/40716995-ca87665e-6445-11e8-8233-ec2e21fefd6b.png" width="1000px">|
|
||||
|**UIFlip**|Flip a graphic.<br><br>**Direction:** Horizontal, Vertical, Both|<img src="https://user-images.githubusercontent.com/12690315/40716996-cab1fd7e-6445-11e8-9753-962d23991d86.png" width="1000px">|
|
||||
|
||||
@@ -67,6 +69,7 @@ AnimationClip is supported as a matter of course!
|
||||
|
||||
1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases).
|
||||
1. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu.
|
||||
1. In Unity5.6+, enable `TexCoord1` channel of canvas. See also [Development Note](##note-unity-56).
|
||||
1. Add any effect component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector.
|
||||
1. Enjoy!
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "UIEffect",
|
||||
"version": "2.5.0",
|
||||
"version": "2.8.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mob-sakai/UIEffect.git"
|
||||
|
||||
@@ -2,76 +2,4 @@
|
||||
|
||||
# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
|
||||
# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"
|
||||
|
||||
# Release the project with the following steps:
|
||||
# 1. Update the release version in package.json.
|
||||
# 2. Update "CHANGELOG.md" using "github_changelog_generator-1.15.0.pre.rc".
|
||||
# 3. Commit package.json and CHANGELOG.md.
|
||||
# 4. Merge into master branch.
|
||||
# 5. Export unitypackage.
|
||||
# 6. Release using "gh-release-3.2.0". (Upload unitypackage)
|
||||
|
||||
|
||||
# input release version
|
||||
echo -e ">> Start Github Release:"
|
||||
PACKAGE_NAME=`node -pe 'require("./package.json").name'`
|
||||
echo -e ">> Package name: ${PACKAGE_NAME}"
|
||||
CURRENT_VERSION=`grep -o -e "\"version\".*$" package.json | sed -e "s/\"version\": \"\(.*\)\".*$/\1/"`
|
||||
read -p "[? release version (for current: ${CURRENT_VERSION}): " RELEASE_VERSION
|
||||
[ -z "${RELEASE_VERSION}" ] && exit
|
||||
|
||||
|
||||
# update version in package.json
|
||||
echo -e "\n>> Update version... package.json"
|
||||
git checkout -B release develop
|
||||
sed -i -e "s/\"version\": \(.*\)/\"version\": \"${RELEASE_VERSION}\",/g" package.json
|
||||
|
||||
|
||||
# check unity editor
|
||||
UNITY_VER=`sed -e "s/m_EditorVersion: \(.*\)/\1/g" ProjectSettings/ProjectVersion.txt`
|
||||
UNITY_EDITOR="/Applications/Unity/Hub/Editor/${UNITY_VER}/Unity.app/Contents/MacOS/Unity"
|
||||
echo -e "\n>> Check unity editor... ${UNITY_VER} (${UNITY_EDITOR})"
|
||||
"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`"
|
||||
echo -e ">> OK"
|
||||
|
||||
# generate change log
|
||||
CHANGELOG_GENERATOR_ARG=`grep -o -e ".*git\"$" package.json | sed -e "s/^.*\/\([^\/]*\)\/\([^\/]*\).git.*$/--user \1 --project \2/"`
|
||||
CHANGELOG_GENERATOR_ARG="--future-release v${RELEASE_VERSION} ${CHANGELOG_GENERATOR_ARG}"
|
||||
echo -e "\n>> Generate change log... ${CHANGELOG_GENERATOR_ARG}"
|
||||
github_changelog_generator ${CHANGELOG_GENERATOR_ARG}
|
||||
|
||||
git diff -- CHANGELOG.md
|
||||
read -p "[? is the change log correct? (y/N):" yn
|
||||
case "$yn" in [yY]*) ;; *) exit ;; esac
|
||||
|
||||
|
||||
# commit release files
|
||||
echo -e "\n>> Commit release files..."
|
||||
git add CHANGELOG.md -f
|
||||
git add package.json -f
|
||||
git commit -m "update change log"
|
||||
|
||||
|
||||
# merge and push
|
||||
echo -e "\n>> Merge and push..."
|
||||
git checkout master
|
||||
git merge --no-ff release -m "release $TAG"
|
||||
git branch -D release
|
||||
git push origin master
|
||||
git checkout develop
|
||||
git merge --ff master
|
||||
git push origin develop
|
||||
|
||||
|
||||
# export unitypackage
|
||||
PACKAGE_SRC=`node -pe 'require("./package.json").src'`
|
||||
echo -e "\n>> Export unitypackage... ${PACKAGE_SRC}"
|
||||
"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`" -exportpackage "$PACKAGE_SRC" "$PACKAGE_NAME.unitypackage"
|
||||
echo -e ">> OK"
|
||||
|
||||
|
||||
# upload unitypackage and release on Github
|
||||
gh-release --assets "$PACKAGE_NAME.unitypackage"
|
||||
|
||||
|
||||
echo -e "\n\n>> $PACKAGE_NAME v$RELEASE_VERSION has been successfully released!\n"
|
||||
bash <(curl -sL 'https://gist.github.com/mob-sakai/a883999a32dd8b1927639e46b3cd6801/raw/unity_release.sh')
|
||||