Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a900987f5 | |||
| 974e3e8769 | |||
| 909281c66b | |||
| 75ed355e27 | |||
| a0dd316df6 | |||
| 4f66bbfb4d | |||
| 91d5519356 | |||
| 76be0fc860 | |||
| a7e826c4f9 | |||
| 78fbc9a330 | |||
| abc9a4184c | |||
| 3e2c5c1613 | |||
| cb0e8d283b | |||
| def49c34f5 | |||
| a0ac27291b | |||
| 8388d59045 | |||
| 53db1e6254 | |||
| aa4ec8d9c4 | |||
| e965b9e9ab | |||
| 202601c96d | |||
| 396d06f774 | |||
| 8ad57c828e | |||
| 952a94f50b | |||
| 2540b75349 | |||
| 6b8dc5ec33 | |||
| de918718d0 | |||
| 045db9c3b7 | |||
| 6542543422 | |||
| 3db94e00f8 | |||
| 946217069f | |||
| 51cd6d8525 | |||
| 65457e2636 | |||
| 3eb775dcf5 | |||
| 1af89af2c5 | |||
| f0a76424e6 | |||
| f2753e9a3d | |||
| 91e5be706d | |||
| 8513970e6f | |||
| 3f5a7dcd2d | |||
| a748adf1bd | |||
| 40ff828ff0 | |||
| bdbf293c14 | |||
| 8155f94943 | |||
| 0a99bb7765 | |||
| 6b6ff3e1d8 | |||
| 8cbcd765ed | |||
| 6f6a8c95f8 | |||
| fbc697ce85 | |||
| 9f8f9f3e7a | |||
| 8930b563cb | |||
| b72a1c05c6 | |||
| fc09152b93 | |||
| fa9c53a0d0 | |||
| a959fddd34 | |||
| 32558d4481 | |||
| bbb1f965fd | |||
| b778d02131 | |||
| 365c43e21d | |||
| 31b16329bc | |||
| 7529a7c4cd | |||
| c51b5f34bb | |||
| 63de3742ec | |||
| e9b32e14fd | |||
| f4ea151244 | |||
| fd39abf5a7 | |||
| 27a04ca294 | |||
| 8edf1f1128 | |||
| c5dfc3bd35 | |||
| 372519d01f | |||
| 6be2ab7a4f | |||
| e326bb7753 | |||
| 7a765c32d8 | |||
| b57e98b64c | |||
| eadb477bcd | |||
| 33b1177815 | |||
| 792db85b79 |
@@ -9,7 +9,7 @@ env:
|
||||
# MINIMUM_VERSION: The minimum version of Unity.
|
||||
MINIMUM_VERSION: 2020.3
|
||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.3)"
|
||||
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -0,0 +1,838 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311924, g: 0.38073963, b: 0.3587269, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &134336676
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 134336679}
|
||||
- component: {fileID: 134336678}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &134336678
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 134336676}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &134336679
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 134336676}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &973375176
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 973375179}
|
||||
- component: {fileID: 973375178}
|
||||
- component: {fileID: 973375177}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &973375177
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &973375178
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &973375179
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &986199151
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 986199155}
|
||||
- component: {fileID: 986199152}
|
||||
- component: {fileID: 986199154}
|
||||
- component: {fileID: 986199153}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!223 &986199152
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 134336678}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 27
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &986199153
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &986199154
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!224 &986199155
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1567169362}
|
||||
- {fileID: 1421004027}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1421004026
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1421004027}
|
||||
- component: {fileID: 1421004030}
|
||||
- component: {fileID: 1421004029}
|
||||
- component: {fileID: 1421004028}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1421004027
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 415.4, y: 111.41}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1421004028
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 0.875
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 0.213
|
||||
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.622
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 8
|
||||
m_TransitionRate: 0
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 2800000, guid: 40d1a96251dfd4353a7d28680e56c2e7, type: 3}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionRotation: 45
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.85
|
||||
m_TransitionSoftness: 0.475
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 1
|
||||
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0.5
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1421004029
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 4 Color Gradation
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: cab5405a1d5e24ca7858d78bc295cc25, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 81.94
|
||||
m_fontSizeBase: 81.94
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 100
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &1421004030
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1567169361
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1567169362}
|
||||
- component: {fileID: 1567169365}
|
||||
- component: {fileID: 1567169364}
|
||||
- component: {fileID: 1567169363}
|
||||
- component: {fileID: 1567169366}
|
||||
m_Layer: 5
|
||||
m_Name: Gradation
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1567169362
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1567169363
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1.4142135, g: 1.4142135, b: 1.4142135, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 0}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 11
|
||||
m_GradationColor1: {r: 0.514151, g: 1, b: 0.9449037, a: 1}
|
||||
m_GradationColor2: {r: 0.8476167, g: 1, b: 0.5330188, a: 1}
|
||||
m_GradationColor3: {r: 0.6840595, g: 0.5801887, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 0.63528705, b: 0.6273585, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 0, b: 0, a: 1}
|
||||
key1: {r: 1, g: 0.8571428, b: 0, a: 1}
|
||||
key2: {r: 0.2857144, g: 1, b: 0, a: 0}
|
||||
key3: {r: 0, g: 1, b: 0.57142854, a: 0}
|
||||
key4: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key5: {r: 0.28571415, g: 0, b: 1, a: 0}
|
||||
key6: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key7: {r: 1, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 9830
|
||||
ctime2: 18724
|
||||
ctime3: 28720
|
||||
ctime4: 38165
|
||||
ctime5: 46838
|
||||
ctime6: 56173
|
||||
ctime7: 65535
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 8
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1567169364
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1567169365
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1567169366
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90ac5d06c7b714c29a6b7b3b80e443a7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_CullingMask: 32
|
||||
m_Direction: 0
|
||||
m_Curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.44500732
|
||||
inSlope: 0
|
||||
outSlope: 0.21999359
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.6650009
|
||||
inSlope: 0.21999359
|
||||
outSlope: 1
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_Delay: 0
|
||||
m_Duration: 3
|
||||
m_Interval: 0
|
||||
m_PlayOnEnable: 1
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 3
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9fda278a556f4bd6bf27213319aaf06
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
public class GradationTest : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
|
||||
[SerializeField] private Gradient m_Gradient;
|
||||
|
||||
public void SetGradation()
|
||||
{
|
||||
m_Target.SetGradientKeys(m_Gradient.colorKeys, m_Gradient.alphaKeys, m_Gradient.mode);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 402a2dd4d098a4d708b9f6e7ce0557cd
|
||||
guid: 7c663eb03b2fb4828bc3ade4aff915c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
@@ -38,13 +38,12 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481676, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
@@ -67,9 +66,6 @@ LightmapSettings:
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
@@ -104,7 +100,7 @@ NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
@@ -117,7 +113,7 @@ NavMeshSettings:
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
@@ -174,7 +170,7 @@ MonoBehaviour:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 200, y: 600}
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
@@ -199,7 +195,9 @@ Canvas:
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 1
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -216,16 +214,16 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1299999091}
|
||||
- {fileID: 591404685}
|
||||
- {fileID: 1630816678}
|
||||
- {fileID: 609836417}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &591404684
|
||||
--- !u!1 &598448081
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -233,43 +231,223 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 591404685}
|
||||
- component: {fileID: 591404687}
|
||||
- component: {fileID: 591404686}
|
||||
- component: {fileID: 598448082}
|
||||
- component: {fileID: 598448084}
|
||||
- component: {fileID: 598448083}
|
||||
m_Layer: 5
|
||||
m_Name: Image (1)
|
||||
m_Name: Text (Legacy)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &591404685
|
||||
m_IsActive: 1
|
||||
--- !u!224 &598448082
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 591404684}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_GameObject: {fileID: 598448081}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 320007022}
|
||||
m_RootOrder: 1
|
||||
m_Father: {fileID: 1630816678}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 44.9, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &591404686
|
||||
--- !u!114 &598448083
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 591404684}
|
||||
m_GameObject: {fileID: 598448081}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Button
|
||||
--- !u!222 &598448084
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 598448081}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &609836416
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 609836417}
|
||||
- component: {fileID: 609836421}
|
||||
- component: {fileID: 609836420}
|
||||
- component: {fileID: 609836419}
|
||||
- component: {fileID: 609836418}
|
||||
m_Layer: 5
|
||||
m_Name: Button (Legacy) (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &609836417
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 609836416}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1183657517}
|
||||
m_Father: {fileID: 320007022}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -113.2}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &609836418
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 609836416}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7c663eb03b2fb4828bc3ade4aff915c5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Target: {fileID: 1299999096}
|
||||
m_Gradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 0.2857144, g: 1, b: 0, a: 1}
|
||||
key2: {r: 1, g: 1, b: 1, a: 0}
|
||||
key3: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key4: {r: 1, g: 1, b: 1, a: 0}
|
||||
key5: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 10879
|
||||
ctime1: 21823
|
||||
ctime2: 32768
|
||||
ctime3: 43646
|
||||
ctime4: 54591
|
||||
ctime5: 65535
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 1
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 6
|
||||
m_NumAlphaKeys: 2
|
||||
--- !u!114 &609836419
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 609836416}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 609836420}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 609836418}
|
||||
m_TargetAssemblyTypeName: GradationTest, Assembly-CSharp
|
||||
m_MethodName: SetGradation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &609836420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 609836416}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
@@ -283,8 +461,8 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
@@ -293,13 +471,13 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &591404687
|
||||
--- !u!222 &609836421
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 591404684}
|
||||
m_GameObject: {fileID: 609836416}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1076137586
|
||||
GameObject:
|
||||
@@ -341,9 +519,17 @@ Camera:
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@@ -377,14 +563,93 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1076137586}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1183657516
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1183657517}
|
||||
- component: {fileID: 1183657519}
|
||||
- component: {fileID: 1183657518}
|
||||
m_Layer: 5
|
||||
m_Name: Text (Legacy)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1183657517
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1183657516}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 609836417}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1183657518
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1183657516}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Button
|
||||
--- !u!222 &1183657519
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1183657516}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1299999090
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -418,11 +683,10 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 320007022}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 44.9, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1299999093
|
||||
@@ -470,7 +734,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1299999090}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90ac5d06c7b714c29a6b7b3b80e443a7, type: 3}
|
||||
m_Name:
|
||||
@@ -505,8 +769,12 @@ MonoBehaviour:
|
||||
m_Duration: 1
|
||||
m_Interval: 0
|
||||
m_PlayOnEnable: 1
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &1299999096
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -525,8 +793,10 @@ MonoBehaviour:
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
@@ -538,8 +808,14 @@ MonoBehaviour:
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
@@ -553,8 +829,9 @@ MonoBehaviour:
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowGlow: 0
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 2
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -585,11 +862,22 @@ MonoBehaviour:
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 8
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 1
|
||||
m_GradationScale: 2
|
||||
m_AllowExtendVertex: 1
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyPivot: {x: 0.5, y: 0.5}
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!1 &1303535690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -650,14 +938,191 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1303535690}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1630816677
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1630816678}
|
||||
- component: {fileID: 1630816682}
|
||||
- component: {fileID: 1630816681}
|
||||
- component: {fileID: 1630816680}
|
||||
- component: {fileID: 1630816679}
|
||||
m_Layer: 5
|
||||
m_Name: Button (Legacy)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1630816678
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1630816677}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 598448082}
|
||||
m_Father: {fileID: 320007022}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -78.4}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1630816679
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1630816677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7c663eb03b2fb4828bc3ade4aff915c5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Target: {fileID: 1299999096}
|
||||
m_Gradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 0, b: 0, a: 1}
|
||||
key1: {r: 1, g: 0.8571428, b: 0, a: 1}
|
||||
key2: {r: 0.2857144, g: 1, b: 0, a: 0}
|
||||
key3: {r: 0, g: 1, b: 0.57142854, a: 0}
|
||||
key4: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key5: {r: 0.28571415, g: 0, b: 1, a: 0}
|
||||
key6: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key7: {r: 1, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 9830
|
||||
ctime2: 18724
|
||||
ctime3: 28720
|
||||
ctime4: 38165
|
||||
ctime5: 46838
|
||||
ctime6: 56173
|
||||
ctime7: 65535
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 8
|
||||
m_NumAlphaKeys: 2
|
||||
--- !u!114 &1630816680
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1630816677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1630816681}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1630816679}
|
||||
m_TargetAssemblyTypeName: GradationTest, Assembly-CSharp
|
||||
m_MethodName: SetGradation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &1630816681
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1630816677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1630816682
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1630816677}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1740148341
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -683,9 +1148,8 @@ Light:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740148341}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
serializedVersion: 11
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
@@ -744,11 +1208,19 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740148341}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 320007022}
|
||||
- {fileID: 1076137589}
|
||||
- {fileID: 1740148343}
|
||||
- {fileID: 1303535693}
|
||||
|
||||
|
Before Width: | Height: | Size: 690 KiB |
@@ -252,6 +252,7 @@ MonoBehaviour:
|
||||
m_Target: {fileID: 1567169363}
|
||||
m_UseTargetTransform: 1
|
||||
m_SamplingScale: 1
|
||||
m_AllowToModifyMeshShape: 1
|
||||
--- !u!114 &571623417
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -522,6 +523,7 @@ MonoBehaviour:
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 5
|
||||
m_SamplingIntensity: 0.197
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 3
|
||||
m_TransitionRate: 0.411
|
||||
@@ -533,9 +535,14 @@ MonoBehaviour:
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.071
|
||||
m_TransitionSoftness: 0.401
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
||||
m_TargetRange: 0.118
|
||||
@@ -586,7 +593,15 @@ MonoBehaviour:
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: -0.349
|
||||
m_GradationScale: 0.62374645
|
||||
m_AllowExtendVertex: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1120943173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -706,9 +721,13 @@ MonoBehaviour:
|
||||
m_Delay: 0.5
|
||||
m_Duration: 1
|
||||
m_Interval: 0.5
|
||||
m_PlayOnEnable: 1
|
||||
m_PlayOnEnable: 3
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &1242517206
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -730,6 +749,7 @@ MonoBehaviour:
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 1
|
||||
m_SamplingIntensity: 1
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 3
|
||||
m_TransitionRate: 0.408
|
||||
@@ -741,9 +761,14 @@ MonoBehaviour:
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.074
|
||||
m_TransitionSoftness: 0.27
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
|
||||
m_TransitionColorGlow: 1
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 1
|
||||
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
||||
m_TargetRange: 0.118
|
||||
@@ -794,7 +819,15 @@ MonoBehaviour:
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: -0.349
|
||||
m_GradationScale: 0.62374645
|
||||
m_AllowExtendVertex: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 2
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 6
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1242517207
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -894,6 +927,7 @@ MonoBehaviour:
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
@@ -905,9 +939,14 @@ MonoBehaviour:
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
@@ -958,7 +997,15 @@ MonoBehaviour:
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_AllowExtendVertex: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1567169364
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1039,5 +1086,9 @@ MonoBehaviour:
|
||||
m_Duration: 1
|
||||
m_Interval: 0.5
|
||||
m_PlayOnEnable: 1
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d11887dcfdae4a4faf731ca7777dd28
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,109 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SDF - Outline
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ValidKeywords:
|
||||
- OUTLINE_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.25
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.365625
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 1
|
||||
- _UnderlayOffsetX: 1
|
||||
- _UnderlayOffsetY: -1
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cab5405a1d5e24ca7858d78bc295cc25
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SDF Overlay Mobile
|
||||
m_Shader: {fileID: 4800000, guid: a02a7d8c237544f1962732b55a9aebf1, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskEdgeSoftness: 0.01
|
||||
- _MaskInverse: 0
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _MaskWipeControl: 0.5
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a5cc54c1f12241ff8d794ef8ca1c16e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,108 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SDF Overlay
|
||||
m_Shader: {fileID: 4800000, guid: dd89cf5b9246416f84610a006f916af7, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb2000f2042fb4545b8af94316e74dbc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SSD Mobile
|
||||
m_Shader: {fileID: 4800000, guid: c8d12adcee749c344b8117cf7c7eb912, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskEdgeSoftness: 0.01
|
||||
- _MaskInverse: 0
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _MaskWipeControl: 0.5
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9426c45abd5c54484b10707936c04ade
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,108 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SSD
|
||||
m_Shader: {fileID: 4800000, guid: 14eb328de4b8eb245bb7cea29e4ac00b, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06cd8c04a12a94e6084bc44a7e8454f6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,74 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
internal static class ImportSample
|
||||
{
|
||||
[MenuItem("Development/Import TMP Support V1", false, 2001)]
|
||||
private static void ImportTMPSupportV1()
|
||||
{
|
||||
Run("TextMeshPro Support");
|
||||
}
|
||||
|
||||
[MenuItem("Development/Import TMP Support V2", false, 2002)]
|
||||
private static void ImportTMPSupportV2()
|
||||
{
|
||||
Run("TextMeshPro Support (Unity 6)");
|
||||
}
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
private static void ImportSampleOnLoad()
|
||||
{
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
ImportTMPSupportV2();
|
||||
#else
|
||||
ImportTMPSupportV1();
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void Run(string sample)
|
||||
{
|
||||
var p = new Process()
|
||||
{
|
||||
StartInfo = new ProcessStartInfo()
|
||||
{
|
||||
Arguments = $"import-tmp-support.sh '{sample}'",
|
||||
CreateNoWindow = true,
|
||||
#if UNITY_EDITOR_WIN
|
||||
FileName = @"C:\Program Files (x86)\Git\bin\bash.exe",
|
||||
#else
|
||||
FileName = "/bin/bash",
|
||||
#endif
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardOutput = true,
|
||||
WorkingDirectory = $"{Application.dataPath}/..",
|
||||
UseShellExecute = false
|
||||
},
|
||||
EnableRaisingEvents = true
|
||||
};
|
||||
|
||||
p.Exited += (_, __) =>
|
||||
{
|
||||
var result = new StringBuilder();
|
||||
var stdout = p.StandardOutput.ReadToEnd();
|
||||
result.Append("stdout: ");
|
||||
result.Append(stdout);
|
||||
result.AppendLine();
|
||||
result.Append("stderr: ");
|
||||
result.Append(p.StandardError.ReadToEnd());
|
||||
Debug.Log(result);
|
||||
|
||||
if (p.ExitCode == 0 && stdout.StartsWith("Imported: "))
|
||||
{
|
||||
var path = stdout.Replace("Imported: ", "").Trim();
|
||||
AssetDatabase.ImportAsset(path, ImportAssetOptions.ImportRecursive);
|
||||
}
|
||||
};
|
||||
|
||||
p.Start();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
internal static class TextMeshProSupport
|
||||
{
|
||||
private const string k_Version = "userData: v5.6.0";
|
||||
private const string k_VersionUnity6 = k_Version + " (Unity 6)";
|
||||
|
||||
private static readonly Dictionary<string, string> s_FileGuids = new Dictionary<string, string>()
|
||||
{
|
||||
{ "Hidden-TMP_Bitmap-Mobile-UIEffect.shader.meta", "guid: 63a1dba10bff94661a909d63808a9a3b" },
|
||||
{ "Hidden-TMP_Bitmap-UIEffect.shader.meta", "guid: d1cb940e3804b4adcaf9b22083fadfad" },
|
||||
{ "Hidden-TMP_SDF Overlay-UIEffect.shader.meta", "guid: 03ea49e29b5ad4fbe8e340af208fe8e7" },
|
||||
{ "Hidden-TMP_SDF SSD-UIEffect.shader.meta", "guid: 26b66f9b09b8d4ac6a2790c3fa8b21c1" },
|
||||
{ "Hidden-TMP_SDF-Mobile Overlay-UIEffect.shader.meta", "guid: 16f26337621974eaf998b9857bac39c6" },
|
||||
{ "Hidden-TMP_SDF-Mobile SSD-UIEffect.shader.meta", "guid: 2c69b4dabb5c24ae99889f581c8b556a" },
|
||||
{ "Hidden-TMP_SDF-Mobile-UIEffect.shader.meta", "guid: e65241fa80a374114b3f55ed746c04d9" },
|
||||
{ "Hidden-TMP_SDF-UIEffect.shader.meta", "guid: 935b7be1c88464d2eb87204fdfab5a38" }
|
||||
};
|
||||
|
||||
[MenuItem("Development/TextMeshPro/", false, -40)]
|
||||
private static void _()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("Development/TextMeshPro/List GUID, Version for TMP Samples", false)]
|
||||
private static void ListGuidsAndVersions()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
ForEachMeta(x =>
|
||||
{
|
||||
var (path, guid, version) = x;
|
||||
sb.AppendLine($"{guid},\tversion: {version},\t{Path.GetFileName(path)}");
|
||||
});
|
||||
Debug.Log(sb);
|
||||
}
|
||||
|
||||
[MenuItem("Development/TextMeshPro/Update GUID, Version for TMP Samples", false)]
|
||||
private static void UpdateGuidsAndVersions()
|
||||
{
|
||||
ForEachMeta(x =>
|
||||
{
|
||||
var (path, guid, version) = x;
|
||||
var fileName = Path.GetFileName(path);
|
||||
s_FileGuids.TryGetValue(fileName.Replace("-Unity6", ""), out var expectedGuid);
|
||||
var expectedVersion = path.Contains("-Unity6") ? k_VersionUnity6 : k_Version;
|
||||
|
||||
if (expectedGuid != guid || expectedVersion != version)
|
||||
{
|
||||
Debug.Log($"Update: {fileName}");
|
||||
var meta = File.ReadAllText(path);
|
||||
File.WriteAllText(path, meta.Replace(guid, expectedGuid).Replace(version, expectedVersion));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void ForEachMeta(Action<(string path, string guid, string version)> action)
|
||||
{
|
||||
foreach (var p in Directory.GetFiles("Packages/src/Samples~", "*.shader.meta", SearchOption.AllDirectories))
|
||||
{
|
||||
var fileName = Path.GetFileName(p);
|
||||
if (!fileName.Contains("TMP_")) continue;
|
||||
|
||||
var meta = File.ReadAllText(p);
|
||||
var guid = Regex.Match(meta, @"(guid: \w+)$", RegexOptions.Multiline).Groups[1].Value;
|
||||
var version = Regex.Match(meta, @"(userData: .*)$", RegexOptions.Multiline).Groups[1].Value;
|
||||
|
||||
action((p, guid, version));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09ae172f2711c4f2cafc2417dac00d34
|
||||
guid: 8d415f5270a5d45608931175d5835110
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38bc56dae9c524546aba0a50b4e970af
|
||||
guid: 14bf4da62b8434d7ca6e6a7e8b63e4ea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43c4f102824e943cf859c0d6c966b9fa
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -8,6 +8,68 @@ ShaderVariantCollection:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIEffectShaderVariants
|
||||
m_Shaders:
|
||||
- first: {fileID: 4800000, guid: d1cb940e3804b4adcaf9b22083fadfad, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 63a1dba10bff94661a909d63808a9a3b, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: e65241fa80a374114b3f55ed746c04d9, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_REPLACE EDGE_PLAIN GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_PIXELATION TONE_RETRO UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SHADOW_COLOR_REPLACE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 96246b1ead49a4c5a996fd477bc5a117, type: 3}
|
||||
second:
|
||||
variants:
|
||||
@@ -15,10 +77,6 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: COLOR_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: COLOR_ADDITIVE SAMPLING_BLUR_FAST
|
||||
passType: 0
|
||||
- keywords: COLOR_ADDITIVE SAMPLING_BLUR_FAST UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: COLOR_CONTRAST
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER
|
||||
@@ -29,30 +87,62 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE TARGET_HUE
|
||||
TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
- keywords: COLOR_MULTIPLY DETAIL_MASKING EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
|
||||
SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE TARGET_HUE TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY SHADOW_COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_RGB_SHIFT TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_LUMINANCE
|
||||
passType: 0
|
||||
- keywords: COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: COLOR_REPLACE SAMPLING_BLUR_FAST
|
||||
passType: 0
|
||||
- keywords: COLOR_SUBTRACTIVE
|
||||
passType: 0
|
||||
- keywords: DETAIL_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: DETAIL_MASKING
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: DETAIL_REPLACE
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN SHADOW_COLOR_MULTIPLY_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SAMPLING_EDGE_ALPHA
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SHADOW_COLOR_MULTIPLY_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY
|
||||
TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: EDGE_PLAIN SHADOW_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: EDGE_PLAIN TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_DETAIL
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST TONE_GRAYSCALE
|
||||
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE TONE_GRAYSCALE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_MEDIUM
|
||||
passType: 0
|
||||
@@ -68,8 +158,18 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION TONE_RETRO UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_RGB_SHIFT
|
||||
passType: 0
|
||||
- keywords: SAMPLING_RGB_SHIFT TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: SHADOW_COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: SHADOW_COLOR_REPLACE TRANSITION_COLOR_REPLACE TRANSITION_MELT
|
||||
passType: 0
|
||||
- keywords: TONE_GRAYSCALE
|
||||
passType: 0
|
||||
- keywords: TONE_NEGATIVE
|
||||
@@ -84,6 +184,10 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
|
||||
@@ -94,6 +198,8 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNITY_UI_CLIP_RECT
|
||||
@@ -104,85 +210,29 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: TRANSITION_FADE
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: e65241fa80a374114b3f55ed746c04d9, type: 3}
|
||||
- first: {fileID: 4800000, guid: 03ea49e29b5ad4fbe8e340af208fe8e7, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
|
||||
- first: {fileID: 4800000, guid: 16f26337621974eaf998b9857bac39c6, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: COLOR_ADDITIVE GLOW_ON SAMPLING_BLUR_FAST UNDERLAY_ON
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION TONE_RETRO
|
||||
passType: 0
|
||||
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: c67f821adbb6348a3a21573a25b55de0, type: 3}
|
||||
- first: {fileID: 4800000, guid: 2c69b4dabb5c24ae99889f581c8b556a, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: COLOR_ADDITIVE GLOW_ON SAMPLING_BLUR_FAST UNDERLAY_ON
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION TONE_RETRO
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: d1cb940e3804b4adcaf9b22083fadfad, type: 3}
|
||||
- first: {fileID: 4800000, guid: 26b66f9b09b8d4ac6a2790c3fa8b21c1, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 63a1dba10bff94661a909d63808a9a3b, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
|
||||
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_SHINY
|
||||
passType: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
@@ -200,9 +250,28 @@ MonoBehaviour:
|
||||
m_RuntimePresets:
|
||||
- {fileID: 1645081683573595507, guid: 3b09ad143990c4c8795c6e93760e132a, type: 3}
|
||||
- {fileID: 1645081683573595507, guid: 4f70ff0f1e25b4388b9bcb38d619f7bf, type: 3}
|
||||
m_UseHDRColorPicker: 1
|
||||
m_ShaderVariantCollection: {fileID: -8740588384831342173}
|
||||
m_ShaderVariantRegistry:
|
||||
m_OptionalShaders: []
|
||||
m_OptionalShaders:
|
||||
- key: Hidden/TextMeshPro/Bitmap (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Bitmap (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Distance Field (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Distance Field (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Distance Field Overlay (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Distance Field Overlay (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Distance Field SSD (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Distance Field SSD (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Mobile/Bitmap (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Mobile/Distance Field (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Mobile/Distance Field Overlay (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)
|
||||
- key: Hidden/TextMeshPro/Mobile/Distance Field SSD (SoftMaskable)
|
||||
value: Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)
|
||||
- key: Hidden/UI/Default (SoftMaskable)
|
||||
value: Hidden/UI/Default (UIEffect)
|
||||
m_Asset: {fileID: -8740588384831342173}
|
||||
m_ErrorOnUnregisteredVariant: 0
|
||||
m_UnregisteredVariants: []
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
|
||||
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"com.unity.ide.rider": "3.0.34",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.textmeshpro": "3.0.9",
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "5d0bd14be288153555f975240608e7ee1576b091"
|
||||
"hash": "2045eaab5b485827cef8bf0bb9e1552dce4f8d6d"
|
||||
},
|
||||
"com.coffee.minimal-resource": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "52987fb6e66e7fc48498d8d164c3c8808de4de6b"
|
||||
"hash": "2bd2bf356dd692a39de9db2ff11faaf79fbfaea3"
|
||||
},
|
||||
"com.coffee.nano-monitor": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
@@ -21,7 +21,14 @@
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0"
|
||||
},
|
||||
"hash": "5d0bd14be288153555f975240608e7ee1576b091"
|
||||
"hash": "2045eaab5b485827cef8bf0bb9e1552dce4f8d6d"
|
||||
},
|
||||
"com.coffee.symbolic-linker": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "3c280f1a8f4db5038b881ff07f270efd9638fa31"
|
||||
},
|
||||
"com.coffee.ui-effect": {
|
||||
"version": "file:src",
|
||||
|
||||
@@ -1,3 +1,137 @@
|
||||
## [5.6.2](https://github.com/mob-sakai/UIEffect/compare/5.6.1...5.6.2) (2025-04-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix a potential `ArgumentOutOfRangeException` that could occur when changing the FontAsset in TextMeshPro ([909281c](https://github.com/mob-sakai/UIEffect/commit/909281c66b702d8497e9f847c91b688716b9c6a7)), closes [#327](https://github.com/mob-sakai/UIEffect/issues/327)
|
||||
* Remove unnecessary vertex expansion ([974e3e8](https://github.com/mob-sakai/UIEffect/commit/974e3e8769d456c5cdd8eb1767a7cf57ab4d52fc))
|
||||
* undo now works correctly after clicking the 'Clear' button in the inspector ([75ed355](https://github.com/mob-sakai/UIEffect/commit/75ed355e27faf8962390eb6788e1887ffd1b5f89))
|
||||
|
||||
## [5.6.1](https://github.com/mob-sakai/UIEffect/compare/5.6.0...5.6.1) (2025-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* changes were not correctly marked as dirty when loading presets ([76be0fc](https://github.com/mob-sakai/UIEffect/commit/76be0fc860c27b89235b7fb9a766dcc38b3d9924))
|
||||
|
||||
# [5.6.0](https://github.com/mob-sakai/UIEffect/compare/5.5.3...5.6.0) (2025-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix edge detection ([9462170](https://github.com/mob-sakai/UIEffect/commit/946217069f10714798070481d8576f5470e243db))
|
||||
* fix project settings icon ([202601c](https://github.com/mob-sakai/UIEffect/commit/202601c96d6fb564ee5d6b8868b0ff0a8dba0ba1))
|
||||
* the strength of ColorGlow, TransitionColorGlow, and ShadowColorGlow now changes according to intensity ([aa4ec8d](https://github.com/mob-sakai/UIEffect/commit/aa4ec8d9c449bfe361aa277e25cbb389e0daa983)), closes [#316](https://github.com/mob-sakai/UIEffect/issues/316)
|
||||
* UIEffect with TextMeshPro SubMeshUI appears black in the editor when saving assets ([de91871](https://github.com/mob-sakai/UIEffect/commit/de918718d062979c8e9b4202b6b2ae389ae10bab))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `TransitionAutoPlaySpeed`, `TransitionTexSpeed`, and `EdgeShinyAutoPlaySpeed` are previewed only when the object is selected in edit mode ([952a94f](https://github.com/mob-sakai/UIEffect/commit/952a94f50b3ae4279a48b03d019f341e46b2f5b7)), closes [#319](https://github.com/mob-sakai/UIEffect/issues/319)
|
||||
* add 'Flip' feature ([def49c3](https://github.com/mob-sakai/UIEffect/commit/def49c34f5b963c8b0cce6fb8cace3f7d93b5a1e))
|
||||
* add `Detail Filter` feature ([3e2c5c1](https://github.com/mob-sakai/UIEffect/commit/3e2c5c1613d9a2c08487d94c4eef28f066f2eb7b))
|
||||
* add `EdgeColorGlow` option ([53db1e6](https://github.com/mob-sakai/UIEffect/commit/53db1e62546384f04b9c526df2623c4598dd34bf))
|
||||
* add `onChangeRate` event for UIEffectTweener ([8ad57c8](https://github.com/mob-sakai/UIEffect/commit/8ad57c828ef4f1d7df6dd22c1edb7af3efa04d75)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
|
||||
* add `TransitionTexSpeed` option ([6b8dc5e](https://github.com/mob-sakai/UIEffect/commit/6b8dc5ec338590d909511eba3bb1b2e0ec6627f3))
|
||||
* add a tool that automatically fixes shaders when 'TextMeshPro Essential Resources' are located in a non-default path ([8388d59](https://github.com/mob-sakai/UIEffect/commit/8388d590457755cda0699835b37b5bf0673c4386))
|
||||
* add built-in presets ([3db94e0](https://github.com/mob-sakai/UIEffect/commit/3db94e00f83195ff90d26ee270c7984825fa22b7))
|
||||
* add shaders for TextMeshPro Overlay/SSD ([51cd6d8](https://github.com/mob-sakai/UIEffect/commit/51cd6d8525a12581c8afd4ab5d16e5968e15c8fe))
|
||||
* Allow specifying a preset as the target for `UIEffectReplica` ([cb0e8d2](https://github.com/mob-sakai/UIEffect/commit/cb0e8d283bb8f9085d4910051b5ae0b77368db76))
|
||||
* custom transform for transition and gradation ([045db9c](https://github.com/mob-sakai/UIEffect/commit/045db9c3b79234cd12bdfb4ea52898b7d86240af))
|
||||
* expose color subfields as float-type public properties ([396d06f](https://github.com/mob-sakai/UIEffect/commit/396d06f774e10adee84d06156a7fc8723d986bbd)), closes [#321](https://github.com/mob-sakai/UIEffect/issues/321)
|
||||
* load presets partially and append to existing instance ([6542543](https://github.com/mob-sakai/UIEffect/commit/654254342265fc239804e60a64d01b80076e5e8e))
|
||||
* separate reverse curve for UIEffectTweener ([2540b75](https://github.com/mob-sakai/UIEffect/commit/2540b75349af92f1359433e73ffa3b5400479b02)), closes [#312](https://github.com/mob-sakai/UIEffect/issues/312)
|
||||
* support `SoftMaskForUGUI ` package with `UIEffect` ([65457e2](https://github.com/mob-sakai/UIEffect/commit/65457e263644c36cd772ad1f42fb9fb3f84ab753)), closes [#270](https://github.com/mob-sakai/UIEffect/issues/270)
|
||||
* support UIFlip as v4 compatible component ([e965b9e](https://github.com/mob-sakai/UIEffect/commit/e965b9e9ab33dcfab067542abf2f19bc1d5243fc)), closes [#322](https://github.com/mob-sakai/UIEffect/issues/322)
|
||||
* update demo sample ([abc9a41](https://github.com/mob-sakai/UIEffect/commit/abc9a4184c4aeac85287a882d174f9cdc2c28c04)), closes [#318](https://github.com/mob-sakai/UIEffect/issues/318) [#320](https://github.com/mob-sakai/UIEffect/issues/320)
|
||||
|
||||
## [5.5.3](https://github.com/mob-sakai/UIEffect/compare/5.5.2...5.5.3) (2025-03-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* blur with 'Filled' Image type may cause error ([f0a7642](https://github.com/mob-sakai/UIEffect/commit/f0a76424e690355c101cc2e12183d1a7e77b16c3)), closes [#313](https://github.com/mob-sakai/UIEffect/issues/313)
|
||||
* IL2CPP build fails on older versions of Unity ([1af89af](https://github.com/mob-sakai/UIEffect/commit/1af89af2c58320f67b8d753767b3b4cf905f844d)), closes [#315](https://github.com/mob-sakai/UIEffect/issues/315)
|
||||
|
||||
## [5.5.2](https://github.com/mob-sakai/UIEffect/compare/5.5.1...5.5.2) (2025-02-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `PlayOnEnable.Reverse` in UIEffectTweener does not work ([3f5a7dc](https://github.com/mob-sakai/UIEffect/commit/3f5a7dcd2d8248b9e47fb9d38c083f26b798e063)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
|
||||
* `TransitionFilter` and `GradationMode` do not work correctly when the initial scale is 0 ([bdbf293](https://github.com/mob-sakai/UIEffect/commit/bdbf293c1489c0b248078969b37ec66890620d44)), closes [#311](https://github.com/mob-sakai/UIEffect/issues/311)
|
||||
* component icons will no longer be displayed in the scene view (Unity 2021.2 or later) ([40ff828](https://github.com/mob-sakai/UIEffect/commit/40ff828ff0697dc8f6597cfcf094cc63532a19dd))
|
||||
* fix potential issues ([a748adf](https://github.com/mob-sakai/UIEffect/commit/a748adf1bde5e400fcc84ec902a1438867105f75))
|
||||
* reset time button does not work correctly in the inspector when `UIEffectTweener.direction=Reverse` in the editor ([8513970](https://github.com/mob-sakai/UIEffect/commit/8513970e6f71d393430a573bfb0207428998bee1)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
|
||||
|
||||
## [5.5.1](https://github.com/mob-sakai/UIEffect/compare/5.5.0...5.5.1) (2025-02-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix v4 compatible components ([6f6a8c9](https://github.com/mob-sakai/UIEffect/commit/6f6a8c95f878a290b1c4238cd0519f14febc04b6))
|
||||
* fully visible when the transition rate is set to 1 ([0a99bb7](https://github.com/mob-sakai/UIEffect/commit/0a99bb7765443a84070e19c9ea0096808442932e)), closes [#309](https://github.com/mob-sakai/UIEffect/issues/309)
|
||||
* UIEffect with TextMeshPro appears black in the editor when saving scene ([8cbcd76](https://github.com/mob-sakai/UIEffect/commit/8cbcd765ed9e11c38e3257191c2fc7dcd2c9916e))
|
||||
|
||||
# [5.5.0](https://github.com/mob-sakai/UIEffect/compare/5.4.0...5.5.0) (2025-02-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `GradationMode.Diagonal` with 4 colors ([b72a1c0](https://github.com/mob-sakai/UIEffect/commit/b72a1c05c6d1d7b3c0aa11582d4a97da80d7fce9)), closes [#308](https://github.com/mob-sakai/UIEffect/issues/308)
|
||||
* add built-in presets ([8930b56](https://github.com/mob-sakai/UIEffect/commit/8930b563cb580463e2265483ccd3a42cb84e644b))
|
||||
|
||||
# [5.4.0](https://github.com/mob-sakai/UIEffect/compare/5.3.4...5.4.0) (2025-02-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* gradient color is not updated when calling the `SetGradientKeys` method ([a959fdd](https://github.com/mob-sakai/UIEffect/commit/a959fddd34a93dd0846369938b1cb6be514eee2d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* tweener supports `EdgeMode.Shiny` ([32558d4](https://github.com/mob-sakai/UIEffect/commit/32558d4481de31ed9020c82861dc2a2d8ca7d53c)), closes [#307](https://github.com/mob-sakai/UIEffect/issues/307)
|
||||
|
||||
## [5.3.4](https://github.com/mob-sakai/UIEffect/compare/5.3.3...5.3.4) (2025-02-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* UIEffect v5.3.3 with TextMeshPro is not working in play mode in editor ([365c43e](https://github.com/mob-sakai/UIEffect/commit/365c43e21dcaaff349cf1362f9bd25b7deb163f7)), closes [#306](https://github.com/mob-sakai/UIEffect/issues/306)
|
||||
|
||||
## [5.3.3](https://github.com/mob-sakai/UIEffect/compare/5.3.2...5.3.3) (2025-02-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* when modifying TextMeshPro vertices, element disapear ([7529a7c](https://github.com/mob-sakai/UIEffect/commit/7529a7c4cd8db27a6d3312bce0a6ed6b13e40f35)), closes [#305](https://github.com/mob-sakai/UIEffect/issues/305)
|
||||
|
||||
## [5.3.2](https://github.com/mob-sakai/UIEffect/compare/5.3.1...5.3.2) (2025-02-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* some effects are not working correctly for TextMeshProUGUI in Unity 6 ([63de374](https://github.com/mob-sakai/UIEffect/commit/63de3742ecd7fcdcaa8dcca8dc104c7288291211))
|
||||
|
||||
## [5.3.1](https://github.com/mob-sakai/UIEffect/compare/5.3.0...5.3.1) (2025-01-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* shader keywords for UIEfect are not recognized in Unity 6 ([fd39abf](https://github.com/mob-sakai/UIEffect/commit/fd39abf5a71138919f8feee587576ba187075304)), closes [#301](https://github.com/mob-sakai/UIEffect/issues/301)
|
||||
|
||||
# [5.3.0](https://github.com/mob-sakai/UIEffect/compare/5.2.4...5.3.0) (2025-01-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `SamplingFilter.EdgeAlpha` and `SamplingFilter.EdgeLuminance` now support the `Sampling Width` property for edge width ([33b1177](https://github.com/mob-sakai/UIEffect/commit/33b1177815b935a887c5a8918748cbeafec32b6b))
|
||||
* add `EdgeMode` feature ([eadb477](https://github.com/mob-sakai/UIEffect/commit/eadb477bcd91f8909bfa7b8976241411363ee12c))
|
||||
* add `ResetOnEnable` option for `UIEffectTweener` ([e326bb7](https://github.com/mob-sakai/UIEffect/commit/e326bb77537b921df775646142105a490ae54851)), closes [#299](https://github.com/mob-sakai/UIEffect/issues/299)
|
||||
* add `TransitionAutoSpeed` property ([7a765c3](https://github.com/mob-sakai/UIEffect/commit/7a765c32d87f6dfbdb990d5b3a272dd80696b374))
|
||||
* add `TransitionFilter.Pattern` feature ([b57e98b](https://github.com/mob-sakai/UIEffect/commit/b57e98b64c61a7c7eb3ca97f3bd7e909956ee469))
|
||||
|
||||
## [5.2.4](https://github.com/mob-sakai/UIEffect/compare/5.2.3...5.2.4) (2025-01-26)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Rendering;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
|
||||
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
internal class RemoveSoftMaskableVariantsIfNeeded : IPreprocessShaders
|
||||
{
|
||||
public int callbackOrder => 1;
|
||||
|
||||
// Remove the 'SOFTMASKABLE' variants if 'SoftMaskForUGUI' package is not installed.
|
||||
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
|
||||
{
|
||||
// If the shader is not for UIEffect: skip.
|
||||
if (!shader.name.EndsWith(" (UIEffect)")) return;
|
||||
|
||||
// If the 'SoftMaskForUGUI' package is installed: skip.
|
||||
if (PackageInfo.FindForAssetPath("Packages/com.coffee.softmask-for-ugui/package.json") != null) return;
|
||||
|
||||
// Remove the 'SOFTMASKABLE' variants.
|
||||
var softMaskable = new ShaderKeyword(shader, "SOFTMASKABLE");
|
||||
for (var i = data.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var d = data[i];
|
||||
if (d.shaderKeywordSet.IsEnabled(softMaskable))
|
||||
{
|
||||
data.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e42595bbbad4941a686a82e328aa266b
|
||||
timeCreated: 1487152293
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,8 +12,13 @@ namespace Coffee.UIEffects.Editors
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIEffect), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIEffect2Editor : Editor
|
||||
public class UIEffectEditor : Editor
|
||||
{
|
||||
private class UIEffectEditorSettings : ScriptableSingleton<UIEffectEditorSettings>
|
||||
{
|
||||
public bool m_ExpandOthers = true;
|
||||
}
|
||||
|
||||
private static readonly PropertyInfo s_PiGradient = typeof(SerializedProperty)
|
||||
.GetProperty("gradientValue", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
@@ -35,6 +40,7 @@ namespace Coffee.UIEffects.Editors
|
||||
|
||||
private SerializedProperty _samplingFilter;
|
||||
private SerializedProperty _samplingIntensity;
|
||||
private SerializedProperty _samplingWidth;
|
||||
private SerializedProperty _samplingScale;
|
||||
|
||||
private SerializedProperty _transitionFilter;
|
||||
@@ -42,14 +48,18 @@ namespace Coffee.UIEffects.Editors
|
||||
private SerializedProperty _transitionTex;
|
||||
private SerializedProperty _transitionTexScale;
|
||||
private SerializedProperty _transitionTexOffset;
|
||||
private SerializedProperty _transitionTexSpeed;
|
||||
private SerializedProperty _transitionReverse;
|
||||
private SerializedProperty _transitionRotation;
|
||||
private SerializedProperty _transitionKeepAspectRatio;
|
||||
private SerializedProperty _transitionWidth;
|
||||
private SerializedProperty _transitionSoftness;
|
||||
private SerializedProperty _transitionRange;
|
||||
private SerializedProperty _transitionColorFilter;
|
||||
private SerializedProperty _transitionColor;
|
||||
private SerializedProperty _transitionColorGlow;
|
||||
private SerializedProperty _transitionPatternReverse;
|
||||
private SerializedProperty _transitionAutoPlaySpeed;
|
||||
|
||||
private SerializedProperty _targetMode;
|
||||
private SerializedProperty _targetColor;
|
||||
@@ -75,13 +85,40 @@ namespace Coffee.UIEffects.Editors
|
||||
private SerializedProperty _gradationMode;
|
||||
private SerializedProperty _gradationColor1;
|
||||
private SerializedProperty _gradationColor2;
|
||||
private SerializedProperty _gradationColor3;
|
||||
private SerializedProperty _gradationColor4;
|
||||
private SerializedProperty _gradationGradient;
|
||||
private SerializedProperty _gradationOffset;
|
||||
private SerializedProperty _gradationScale;
|
||||
private SerializedProperty _gradationRotation;
|
||||
|
||||
private bool _expandOthers = true;
|
||||
private SerializedProperty _edgeMode;
|
||||
private SerializedProperty _edgeWidth;
|
||||
private SerializedProperty _edgeColorFilter;
|
||||
private SerializedProperty _edgeColor;
|
||||
private SerializedProperty _edgeColorGlow;
|
||||
private SerializedProperty _edgeShinyRate;
|
||||
private SerializedProperty _edgeShinyWidth;
|
||||
private SerializedProperty _edgeShinyAutoPlaySpeed;
|
||||
private SerializedProperty _patternArea;
|
||||
|
||||
private SerializedProperty _detailFilter;
|
||||
private SerializedProperty _detailIntensity;
|
||||
private SerializedProperty _detailThreshold;
|
||||
private SerializedProperty _detailTex;
|
||||
private SerializedProperty _detailTexScale;
|
||||
private SerializedProperty _detailTexOffset;
|
||||
private SerializedProperty _detailTexSpeed;
|
||||
|
||||
private SerializedProperty _allowToModifyMeshShape;
|
||||
private SerializedProperty _customRoot;
|
||||
private SerializedProperty _flip;
|
||||
|
||||
private static bool expandOthers
|
||||
{
|
||||
set => UIEffectEditorSettings.instance.m_ExpandOthers = value;
|
||||
get => UIEffectEditorSettings.instance.m_ExpandOthers;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -97,6 +134,7 @@ namespace Coffee.UIEffects.Editors
|
||||
|
||||
_samplingFilter = serializedObject.FindProperty("m_SamplingFilter");
|
||||
_samplingIntensity = serializedObject.FindProperty("m_SamplingIntensity");
|
||||
_samplingWidth = serializedObject.FindProperty("m_SamplingWidth");
|
||||
_samplingScale = serializedObject.FindProperty("m_SamplingScale");
|
||||
|
||||
_transitionFilter = serializedObject.FindProperty("m_TransitionFilter");
|
||||
@@ -104,14 +142,18 @@ namespace Coffee.UIEffects.Editors
|
||||
_transitionTex = serializedObject.FindProperty("m_TransitionTex");
|
||||
_transitionTexScale = serializedObject.FindProperty("m_TransitionTexScale");
|
||||
_transitionTexOffset = serializedObject.FindProperty("m_TransitionTexOffset");
|
||||
_transitionTexSpeed = serializedObject.FindProperty("m_TransitionTexSpeed");
|
||||
_transitionReverse = serializedObject.FindProperty("m_TransitionReverse");
|
||||
_transitionRotation = serializedObject.FindProperty("m_TransitionRotation");
|
||||
_transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio");
|
||||
_transitionWidth = serializedObject.FindProperty("m_TransitionWidth");
|
||||
_transitionSoftness = serializedObject.FindProperty("m_TransitionSoftness");
|
||||
_transitionRange = serializedObject.FindProperty("m_TransitionRange");
|
||||
_transitionColorFilter = serializedObject.FindProperty("m_TransitionColorFilter");
|
||||
_transitionColor = serializedObject.FindProperty("m_TransitionColor");
|
||||
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
|
||||
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
|
||||
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
|
||||
|
||||
_targetMode = serializedObject.FindProperty("m_TargetMode");
|
||||
_targetColor = serializedObject.FindProperty("m_TargetColor");
|
||||
@@ -134,15 +176,37 @@ namespace Coffee.UIEffects.Editors
|
||||
_shadowColor = serializedObject.FindProperty("m_ShadowColor");
|
||||
_shadowColorGlow = serializedObject.FindProperty("m_ShadowColorGlow");
|
||||
|
||||
_edgeMode = serializedObject.FindProperty("m_EdgeMode");
|
||||
_edgeWidth = serializedObject.FindProperty("m_EdgeWidth");
|
||||
_edgeColorFilter = serializedObject.FindProperty("m_EdgeColorFilter");
|
||||
_edgeColor = serializedObject.FindProperty("m_EdgeColor");
|
||||
_edgeColorGlow = serializedObject.FindProperty("m_EdgeColorGlow");
|
||||
_edgeShinyRate = serializedObject.FindProperty("m_EdgeShinyRate");
|
||||
_edgeShinyWidth = serializedObject.FindProperty("m_EdgeShinyWidth");
|
||||
_edgeShinyAutoPlaySpeed = serializedObject.FindProperty("m_EdgeShinyAutoPlaySpeed");
|
||||
_patternArea = serializedObject.FindProperty("m_PatternArea");
|
||||
|
||||
_gradationMode = serializedObject.FindProperty("m_GradationMode");
|
||||
_gradationColor1 = serializedObject.FindProperty("m_GradationColor1");
|
||||
_gradationColor2 = serializedObject.FindProperty("m_GradationColor2");
|
||||
_gradationColor3 = serializedObject.FindProperty("m_GradationColor3");
|
||||
_gradationColor4 = serializedObject.FindProperty("m_GradationColor4");
|
||||
_gradationGradient = serializedObject.FindProperty("m_GradationGradient");
|
||||
_gradationOffset = serializedObject.FindProperty("m_GradationOffset");
|
||||
_gradationScale = serializedObject.FindProperty("m_GradationScale");
|
||||
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
|
||||
|
||||
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
|
||||
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
|
||||
_detailThreshold = serializedObject.FindProperty("m_DetailThreshold");
|
||||
_detailTex = serializedObject.FindProperty("m_DetailTex");
|
||||
_detailTexScale = serializedObject.FindProperty("m_DetailTexScale");
|
||||
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
|
||||
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
||||
|
||||
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
|
||||
_customRoot = serializedObject.FindProperty("m_CustomRoot");
|
||||
_flip = serializedObject.FindProperty("m_Flip");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
@@ -173,7 +237,7 @@ namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_colorIntensity);
|
||||
DrawColor(_colorFilter, _color, prevColorFilter, false);
|
||||
DrawColor(_color, (ColorFilter)_colorFilter.intValue, prevColorFilter, false);
|
||||
EditorGUILayout.PropertyField(_colorGlow);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
@@ -186,6 +250,12 @@ namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_samplingIntensity);
|
||||
if (_samplingFilter.intValue == (int)SamplingFilter.EdgeAlpha
|
||||
|| _samplingFilter.intValue == (int)SamplingFilter.EdgeLuminance)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_samplingWidth);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
@@ -199,20 +269,37 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_transitionTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_transitionTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_transitionTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_transitionTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse"));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
if (2 < _transitionFilter.intValue)
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth, EditorGUIUtility.TrTempContent("Pattern Size"));
|
||||
EditorGUILayout.PropertyField(_transitionRange, EditorGUIUtility.TrTempContent("Pattern Range"));
|
||||
EditorGUILayout.PropertyField(_transitionPatternReverse,
|
||||
EditorGUIUtility.TrTempContent("Pattern Reverse"));
|
||||
DrawColor(_transitionColorFilter, _transitionColor, null);
|
||||
}
|
||||
else if (2 < _transitionFilter.intValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth);
|
||||
EditorGUILayout.PropertyField(_transitionSoftness);
|
||||
prevColorFilter = (ColorFilter)_transitionColorFilter.intValue;
|
||||
EditorGUILayout.PropertyField(_transitionColorFilter);
|
||||
DrawColor(_transitionColorFilter, _transitionColor, prevColorFilter);
|
||||
EditorGUILayout.PropertyField(_transitionColorGlow);
|
||||
DrawColor(_transitionColorFilter, _transitionColor, _transitionColorGlow);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionAutoPlaySpeed);
|
||||
if (0 < _transitionFilter.intValue && !Mathf.Approximately(0, _transitionAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
@@ -268,10 +355,7 @@ namespace Coffee.UIEffects.Editors
|
||||
|
||||
EditorGUILayout.PropertyField(_shadowDistance);
|
||||
EditorGUILayout.PropertyField(_shadowIteration);
|
||||
prevColorFilter = (ColorFilter)_shadowColorFilter.intValue;
|
||||
EditorGUILayout.PropertyField(_shadowColorFilter);
|
||||
DrawColor(_shadowColorFilter, _shadowColor, prevColorFilter, false);
|
||||
EditorGUILayout.PropertyField(_shadowColorGlow);
|
||||
DrawColor(_shadowColorFilter, _shadowColor, _shadowColorGlow, false);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
|
||||
@@ -300,22 +384,19 @@ namespace Coffee.UIEffects.Editors
|
||||
case GradationMode.AngleGradient:
|
||||
DrawGradientField(_gradationGradient);
|
||||
break;
|
||||
case GradationMode.Diagonal:
|
||||
DrawColorPickerField("Top", _gradationColor1, _gradationColor2);
|
||||
DrawColorPickerField("Bottom", _gradationColor3, _gradationColor4);
|
||||
break;
|
||||
default:
|
||||
DrawColorPickerField(_gradationColor1);
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), _gradationColor1, true);
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 24;
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
DrawColorPickerField(r, _gradationColor2);
|
||||
DrawColorPickerField(r, _gradationColor2, true);
|
||||
|
||||
r.x += r.width + 4;
|
||||
r.width = 20;
|
||||
// Swap colors
|
||||
if (GUI.Button(r, EditorGUIUtility.IconContent("preaudioloopoff"), "iconbutton"))
|
||||
{
|
||||
(_gradationColor1.colorValue, _gradationColor2.colorValue)
|
||||
= (_gradationColor2.colorValue, _gradationColor1.colorValue);
|
||||
}
|
||||
|
||||
SwapColorsButton(r, _gradationColor1, _gradationColor2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -331,26 +412,102 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Edge Mode
|
||||
DrawSeparator();
|
||||
_expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others");
|
||||
if (_expandOthers)
|
||||
if (DrawHeaderPopup(_edgeMode))
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeWidth);
|
||||
DrawColor(_edgeColorFilter, _edgeColor, _edgeColorGlow);
|
||||
|
||||
if ((EdgeMode)_edgeMode.intValue == EdgeMode.Shiny)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeShinyRate);
|
||||
EditorGUILayout.PropertyField(_edgeShinyWidth);
|
||||
EditorGUILayout.PropertyField(_edgeShinyAutoPlaySpeed);
|
||||
|
||||
if (!Mathf.Approximately(0, _edgeShinyAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_patternArea);
|
||||
}
|
||||
}
|
||||
|
||||
// Detail filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_detailFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if ((DetailFilter)_detailFilter.intValue == DetailFilter.Masking)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailThreshold);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailIntensity);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_detailTex);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_detailTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_detailTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_detailTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_detailTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
DrawSeparator();
|
||||
expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(expandOthers, "Others");
|
||||
if (expandOthers)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_samplingScale);
|
||||
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
|
||||
EditorGUILayout.PropertyField(_customRoot);
|
||||
EditorGUILayout.PropertyField(_flip);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(SerializedProperty color, bool showAlpha = true)
|
||||
private static void DrawColorPickerField(string label, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
var labelWidth = EditorGUIUtility.labelWidth;
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
DrawColorPickerField(r, color, showAlpha);
|
||||
r.width -= 24;
|
||||
EditorGUI.PrefixLabel(new Rect(r.x, r.y, labelWidth, r.height), EditorGUIUtility.TrTempContent(label));
|
||||
|
||||
var indentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
var rPos = new Rect(r.x + labelWidth, r.y, (r.width - labelWidth) / 2, r.height);
|
||||
DrawColorPickerField(rPos, GUIContent.none, color1, true);
|
||||
|
||||
rPos.x += rPos.width;
|
||||
DrawColorPickerField(rPos, GUIContent.none, color2, true);
|
||||
|
||||
// Swap colors button
|
||||
SwapColorsButton(new Rect(r.x + r.width + 4, r.y, 20, 20), color1, color2);
|
||||
EditorGUI.indentLevel = indentLevel;
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha = true)
|
||||
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var label = EditorGUIUtility.TrTempContent(color.displayName);
|
||||
label.tooltip = color.tooltip;
|
||||
DrawColorPickerField(rect, label, color, showAlpha);
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, GUIContent label, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
EditorGUI.showMixedValue = color.hasMultipleDifferentValues;
|
||||
|
||||
@@ -365,8 +522,6 @@ namespace Coffee.UIEffects.Editors
|
||||
private static void DrawGradientField(SerializedProperty gradient)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
var label = EditorGUIUtility.TrTempContent(gradient.displayName);
|
||||
label.tooltip = gradient.tooltip;
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
@@ -380,13 +535,12 @@ namespace Coffee.UIEffects.Editors
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty filter, SerializedProperty color, ColorFilter prevFilter,
|
||||
private static void DrawColor(SerializedProperty color, ColorFilter filter, ColorFilter prevFilter,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
if (filter.intValue == (int)ColorFilter.None)
|
||||
{
|
||||
}
|
||||
else if (filter.intValue == (int)ColorFilter.HsvModifier)
|
||||
if (filter == ColorFilter.None) return;
|
||||
|
||||
if (filter == ColorFilter.HsvModifier)
|
||||
{
|
||||
if (prevFilter != ColorFilter.HsvModifier)
|
||||
{
|
||||
@@ -398,7 +552,7 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("b"), -1f, 1f, "Value");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
|
||||
}
|
||||
else if (filter.intValue == (int)ColorFilter.Contrast)
|
||||
else if (filter == ColorFilter.Contrast)
|
||||
{
|
||||
if (prevFilter != ColorFilter.Contrast)
|
||||
{
|
||||
@@ -416,7 +570,33 @@ namespace Coffee.UIEffects.Editors
|
||||
color.colorValue = Color.white;
|
||||
}
|
||||
|
||||
DrawColorPickerField(color, showAlpha);
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), color, showAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty filter, SerializedProperty color, SerializedProperty glow,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
var prevFilter = (ColorFilter)filter.intValue;
|
||||
EditorGUILayout.PropertyField(filter);
|
||||
if (filter.intValue == (int)ColorFilter.None) return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
DrawColor(color, (ColorFilter)filter.intValue, prevFilter, showAlpha);
|
||||
|
||||
if (glow != null)
|
||||
{
|
||||
EditorGUILayout.PropertyField(glow);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
private static void SwapColorsButton(Rect rect, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
if (GUI.Button(rect, EditorGUIUtility.IconContent("preaudioloopoff"), "iconbutton"))
|
||||
{
|
||||
(color1.colorValue, color2.colorValue) = (color2.colorValue, color1.colorValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,26 +617,38 @@ namespace Coffee.UIEffects.Editors
|
||||
private static void DrawPresetMenu(Object[] targets)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width /= 2;
|
||||
r.width = (r.width - 185) / 2;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Load"), "MiniPopup"))
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
|
||||
DropDownPreset(r, null, p =>
|
||||
{
|
||||
var path = UIEffectProjectSettings.GetPresetPath(preset);
|
||||
menu.AddItem(new GUIContent(path), false, () =>
|
||||
Undo.RecordObjects(targets, "Load UIEffect Preset");
|
||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
|
||||
{
|
||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
|
||||
{
|
||||
t.LoadPreset(preset);
|
||||
});
|
||||
t.LoadPreset(p, false);
|
||||
});
|
||||
}
|
||||
|
||||
menu.DropDown(r);
|
||||
});
|
||||
}
|
||||
|
||||
r.x += r.width;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Append"), "MiniPopup"))
|
||||
{
|
||||
DropDownPreset(r, null, p =>
|
||||
{
|
||||
Undo.RecordObjects(targets, "Append UIEffect Preset");
|
||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), t =>
|
||||
{
|
||||
t.LoadPreset(p, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
r.x += r.width;
|
||||
r.width = 15;
|
||||
GUI.Label(r, GUIContent.none, "BreadcrumbsSeparator");
|
||||
|
||||
r.x += r.width;
|
||||
r.width = 100;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Save As New"), "MiniButton"))
|
||||
{
|
||||
EditorApplication.delayCall += () =>
|
||||
@@ -464,6 +656,45 @@ namespace Coffee.UIEffects.Editors
|
||||
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
|
||||
};
|
||||
}
|
||||
|
||||
r.x += r.width;
|
||||
r.width = 15;
|
||||
GUI.Label(r, GUIContent.none, "BreadcrumbsSeparator");
|
||||
|
||||
r.x += r.width;
|
||||
r.width = 55;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
|
||||
{
|
||||
Undo.RecordObjects(targets, "Clear UIEffect");
|
||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DropDownPreset(Rect r, Predicate<(string path, bool builtin, UIEffect preset)> valid,
|
||||
Action<UIEffect> callback)
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
var separatorAdded = false;
|
||||
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
|
||||
{
|
||||
var (path, builtin) = UIEffectProjectSettings.GetPresetPath(preset);
|
||||
if (valid != null && valid.Invoke((path, builtin, preset)) == false) continue;
|
||||
|
||||
if (builtin)
|
||||
{
|
||||
if (!separatorAdded)
|
||||
{
|
||||
separatorAdded = true;
|
||||
menu.AddSeparator(string.Empty);
|
||||
}
|
||||
|
||||
path = path.Substring(6).Replace(" - ", "/");
|
||||
}
|
||||
|
||||
menu.AddItem(new GUIContent(path), false, x => callback(x as UIEffect), preset);
|
||||
}
|
||||
|
||||
menu.DropDown(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,19 +36,9 @@ namespace Coffee.UIEffects.Editors
|
||||
};
|
||||
_reorderableList.onAddDropdownCallback = (rect, list) =>
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
|
||||
{
|
||||
if (UIEffectProjectSettings.instance.m_RuntimePresets.Contains(preset)) continue;
|
||||
|
||||
var path = UIEffectProjectSettings.GetPresetPath(preset);
|
||||
menu.AddItem(new GUIContent(path), false, x =>
|
||||
{
|
||||
UIEffectProjectSettings.RegisterRuntimePreset(x as UIEffect);
|
||||
}, preset);
|
||||
}
|
||||
|
||||
menu.DropDown(rect);
|
||||
UIEffectEditor.DropDownPreset(rect,
|
||||
x => !x.builtin && !UIEffectProjectSettings.instance.m_RuntimePresets.Contains(x.preset),
|
||||
UIEffectProjectSettings.RegisterRuntimePreset);
|
||||
};
|
||||
|
||||
_isInitialized = true;
|
||||
@@ -82,7 +72,12 @@ namespace Coffee.UIEffects.Editors
|
||||
if (_shaderVariantRegistryEditor == null)
|
||||
{
|
||||
var property = serializedObject.FindProperty("m_ShaderVariantRegistry");
|
||||
_shaderVariantRegistryEditor = new ShaderVariantRegistryEditor(property, "(UIEffect)");
|
||||
_shaderVariantRegistryEditor = new ShaderVariantRegistryEditor(property, "(UIEffect)",
|
||||
() =>
|
||||
{
|
||||
UIEffectProjectSettings.shaderRegistry
|
||||
.RegisterOptionalShaders(UIEffectProjectSettings.instance);
|
||||
});
|
||||
}
|
||||
|
||||
_shaderVariantRegistryEditor.Draw();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
@@ -13,6 +14,8 @@ namespace Coffee.UIEffects.Editors
|
||||
private SerializedProperty _useTargetTransform;
|
||||
private SerializedProperty _samplingScale;
|
||||
private SerializedProperty _allowToModifyMeshShape;
|
||||
private SerializedProperty _flip;
|
||||
private SerializedProperty _customRoot;
|
||||
private Editor _uiEffectEditor;
|
||||
|
||||
private void OnEnable()
|
||||
@@ -21,22 +24,54 @@ namespace Coffee.UIEffects.Editors
|
||||
_useTargetTransform = serializedObject.FindProperty("m_UseTargetTransform");
|
||||
_samplingScale = serializedObject.FindProperty("m_SamplingScale");
|
||||
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
|
||||
_flip = serializedObject.FindProperty("m_Flip");
|
||||
_customRoot = serializedObject.FindProperty("m_CustomRoot");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(_target);
|
||||
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 60;
|
||||
EditorGUI.PropertyField(r, _target);
|
||||
|
||||
// Preset button.
|
||||
r.x += r.width;
|
||||
r.width = 60;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Preset"), "MiniPopup"))
|
||||
{
|
||||
UIEffectEditor.DropDownPreset(r, x => !x.builtin, p =>
|
||||
{
|
||||
_target.objectReferenceValue = p;
|
||||
_target.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
}
|
||||
|
||||
// Preset mode warning.
|
||||
if (_target.objectReferenceValue is UIEffect targetEffect && !targetEffect.gameObject.scene.IsValid())
|
||||
{
|
||||
r = EditorGUILayout.GetControlRect();
|
||||
r.width -= EditorGUIUtility.labelWidth;
|
||||
r.x += EditorGUIUtility.labelWidth;
|
||||
EditorGUI.HelpBox(r, "The target effect is not in the scene. (Preset mode)", MessageType.Warning);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_useTargetTransform);
|
||||
EditorGUI.BeginDisabledGroup(_useTargetTransform.boolValue);
|
||||
EditorGUILayout.PropertyField(_customRoot);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
EditorGUILayout.PropertyField(_samplingScale);
|
||||
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
|
||||
EditorGUILayout.PropertyField(_flip);
|
||||
|
||||
if (_target.objectReferenceValue)
|
||||
{
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
CreateCachedEditor(_target.objectReferenceValue, null, ref _uiEffectEditor);
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
(_uiEffectEditor as UIEffect2Editor)?.DrawProperties();
|
||||
(_uiEffectEditor as UIEffectEditor)?.DrawProperties();
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
@@ -12,13 +12,17 @@ namespace Coffee.UIEffects.Editors
|
||||
private SerializedProperty _cullingMask;
|
||||
private SerializedProperty _direction;
|
||||
private SerializedProperty _curve;
|
||||
private SerializedProperty _separateReverseCurve;
|
||||
private SerializedProperty _reverseCurve;
|
||||
private SerializedProperty _delay;
|
||||
private SerializedProperty _duration;
|
||||
private SerializedProperty _interval;
|
||||
private SerializedProperty _playOnEnable;
|
||||
private SerializedProperty _resetTimeOnEnable;
|
||||
private SerializedProperty _updateMode;
|
||||
private SerializedProperty _wrapMode;
|
||||
private SerializedProperty _onComplete;
|
||||
private SerializedProperty _onChangedRate;
|
||||
private bool _isPlaying = false;
|
||||
private double _lastTime;
|
||||
|
||||
@@ -27,13 +31,17 @@ namespace Coffee.UIEffects.Editors
|
||||
_cullingMask = serializedObject.FindProperty("m_CullingMask");
|
||||
_direction = serializedObject.FindProperty("m_Direction");
|
||||
_curve = serializedObject.FindProperty("m_Curve");
|
||||
_separateReverseCurve = serializedObject.FindProperty("m_SeparateReverseCurve");
|
||||
_reverseCurve = serializedObject.FindProperty("m_ReverseCurve");
|
||||
_playOnEnable = serializedObject.FindProperty("m_PlayOnEnable");
|
||||
_resetTimeOnEnable = serializedObject.FindProperty("m_ResetTimeOnEnable");
|
||||
_delay = serializedObject.FindProperty("m_Delay");
|
||||
_duration = serializedObject.FindProperty("m_Duration");
|
||||
_interval = serializedObject.FindProperty("m_Interval");
|
||||
_wrapMode = serializedObject.FindProperty("m_WrapMode");
|
||||
_updateMode = serializedObject.FindProperty("m_UpdateMode");
|
||||
_onComplete = serializedObject.FindProperty("m_OnComplete");
|
||||
_onChangedRate = serializedObject.FindProperty("m_OnChangedRate");
|
||||
|
||||
EditorApplication.update += UpdateTweeners;
|
||||
}
|
||||
@@ -48,12 +56,30 @@ namespace Coffee.UIEffects.Editors
|
||||
Profiler.BeginSample("(UIE)[UIEffectTweener] OnInspectorGUI");
|
||||
serializedObject.UpdateIfRequiredOrScript();
|
||||
EditorGUILayout.PropertyField(_cullingMask);
|
||||
|
||||
if (0 != (_cullingMask.intValue & (int)UIEffectTweener.CullingMask.Event))
|
||||
{
|
||||
EditorGUILayout.PropertyField(_onChangedRate);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_direction);
|
||||
EditorGUILayout.PropertyField(_curve);
|
||||
|
||||
var pos = EditorGUILayout.GetControlRect();
|
||||
var rect = new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth + 20, pos.height);
|
||||
EditorGUI.PropertyField(rect, _separateReverseCurve);
|
||||
if (_separateReverseCurve.boolValue)
|
||||
{
|
||||
rect.x += rect.width;
|
||||
rect.width = pos.width - rect.width;
|
||||
EditorGUI.PropertyField(rect, _reverseCurve, GUIContent.none);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_delay);
|
||||
EditorGUILayout.PropertyField(_duration);
|
||||
EditorGUILayout.PropertyField(_interval);
|
||||
EditorGUILayout.PropertyField(_playOnEnable);
|
||||
EditorGUILayout.PropertyField(_resetTimeOnEnable);
|
||||
EditorGUILayout.PropertyField(_wrapMode);
|
||||
EditorGUILayout.PropertyField(_updateMode);
|
||||
EditorGUILayout.PropertyField(_onComplete);
|
||||
@@ -74,7 +100,7 @@ namespace Coffee.UIEffects.Editors
|
||||
var rResetTimeButton = new Rect(r.x, r.y, 20, r.height);
|
||||
if (GUI.Button(rResetTimeButton, EditorGUIUtility.IconContent("animation.firstkey"), "IconButton"))
|
||||
{
|
||||
SetTime(0);
|
||||
ResetTime();
|
||||
}
|
||||
|
||||
var rPlayButton = new Rect(r.x + 20, r.y, 20, r.height);
|
||||
@@ -146,6 +172,14 @@ namespace Coffee.UIEffects.Editors
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetTime()
|
||||
{
|
||||
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
||||
{
|
||||
tweener.ResetTime(tweener.direction);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPlaying(bool enable)
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
|
||||
@@ -40,6 +40,7 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
||||
- [Component: UIEffectTweener](#component-uieffecttweener)
|
||||
- [Component: UIEffectReplica](#component-uieffectreplica)
|
||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
|
||||
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
|
||||
- [Usage with Code](#usage-with-code)
|
||||
- [Project Settings](#project-settings)
|
||||
@@ -68,13 +69,16 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
||||
- **UIEffectTweener Component**: A simple tweener component to play, stop, pause, and resume effects.
|
||||
- **AnimationClip support**: Allows control of effect animations using `AnimationClips`.
|
||||
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
|
||||
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
|
||||
|
||||
<br><br>
|
||||
|
||||
## 🎮 Demo
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
|
||||
|
||||
@@ -94,7 +98,7 @@ _This package requires **Unity 2020.3 or later**._
|
||||
```
|
||||
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
|
||||
```
|
||||
openupm add com.coffee.ui-effect@5.0.0
|
||||
openupm add com.coffee.ui-effect@5.6.0
|
||||
```
|
||||
|
||||
### Install via UPM (with Package Manager UI)
|
||||
@@ -103,7 +107,7 @@ _This package requires **Unity 2020.3 or later**._
|
||||
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
|
||||

|
||||
- To update the package, change suffix `#{version}` to the target version.
|
||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.0`
|
||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0`
|
||||
|
||||
### Install via UPM (Manually)
|
||||
|
||||
@@ -118,7 +122,7 @@ _This package requires **Unity 2020.3 or later**._
|
||||
```
|
||||
|
||||
- To update the package, change suffix `#{version}` to the target version.
|
||||
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.0",`
|
||||
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0",`
|
||||
|
||||
### Install as Embedded Package
|
||||
|
||||
@@ -151,6 +155,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
|
||||
// v5
|
||||
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src",
|
||||
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#main",
|
||||
```
|
||||
|
||||
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
||||
@@ -159,7 +164,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
3. All v4 components are obsolete.
|
||||
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
||||
- The `effectArea` property in some components are not supported in v5.
|
||||
- `UIShadow`, `UIGradient`, `UIFlip` components are not supported in v5.
|
||||
- `UIShadow`, `UIGradient` components are not supported in v5.
|
||||
- v4 components can be converted to v5 `UIEffect` component by selecting `Convert To UIEffect` from the context menu.
|
||||

|
||||
|
||||
@@ -183,51 +188,103 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
|
||||
### Component: UIEffect
|
||||
|
||||

|
||||
|
||||
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
|
||||
|
||||

|
||||
|
||||
> [!TIP]
|
||||
> From the top menu, you can load and save the editor presets or clear settings.
|
||||
> For details, refer to the [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect).
|
||||
|
||||
<br>
|
||||
|
||||
#### Tone Filter
|
||||
|
||||
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
|
||||

|
||||
|
||||
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
|
||||

|
||||
- **Tone Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
|
||||
<br>
|
||||
|
||||
#### Color Filter
|
||||
|
||||
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||

|
||||
|
||||
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||

|
||||
- **Color Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Color Glow**: Set the color to glow.
|
||||
|
||||
<br>
|
||||
|
||||
#### Sampling Filter
|
||||
|
||||
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
|
||||

|
||||
|
||||
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
|
||||

|
||||
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Sampling Width**: The width of the sampling effect.
|
||||
|
||||
<br>
|
||||
|
||||
#### Transition Filter
|
||||
|
||||
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`
|
||||

|
||||
|
||||
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
|
||||

|
||||
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Transition Tex**: The texture used for the transition filter.- **Transition Width**: The width where the transition color is applied.
|
||||
- **Transition Tex**: The texture used for the transition filter.
|
||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
|
||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Detail Filter`.
|
||||
- **Transition Width**: The width where the transition color is applied.
|
||||
- **Transition Pattern Range**: The range of the pattern.
|
||||
- **Transition Pattern Reverse**: Reverse the pattern.
|
||||
- **Transition Softness**: The softness of the boundary for the transition color.
|
||||
- **Transition Color Filter**: Specifies the transition color.
|
||||
- **Transition Color**: The color of the transition.
|
||||
- **Transition Color Glow**: Set the transition color to glow.
|
||||
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
|
||||
|
||||
> [!TIP]
|
||||
> **Transition Tex** applies transitions using its alpha channel.
|
||||
> If you use `Scale`, `Offset`, or `Speed`, set `Wrap Mode = Repeat` in the texture import settings.
|
||||
> For details, refer to the textures included in the built-in presets.
|
||||
> 
|
||||
|
||||
<br>
|
||||
|
||||
#### Target Mode
|
||||
|
||||
- **Target Mode**: `None`, `Hue`, `Luminance`
|
||||

|
||||
|
||||
- **Target Mode**: `None`, `Hue`, `Luminance`
|
||||

|
||||
- Restricts the effect application area based on hue or luminance.
|
||||
- **Target Range**: The range of target hue or luminance.
|
||||
- **Target Softness**: The softness of the target boundary.
|
||||
|
||||
<br>
|
||||
|
||||
#### Blend Type
|
||||
|
||||
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
|
||||

|
||||
|
||||
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
|
||||

|
||||
- `Custom` blend type can be set using the `SrcBlend` and `DstBlend` properties.
|
||||
|
||||
<br>
|
||||
|
||||
#### Shadow Mode
|
||||
|
||||
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
|
||||

|
||||
|
||||
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
|
||||

|
||||
- **Shadow Distance**: Distance of the shadow or outline.
|
||||
- **Shadow Iteration**: Number of times the shadow or outline is applied.
|
||||
- **Shadow Color Filter**: Specifies the shadow color.
|
||||
@@ -239,15 +296,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
- **Mirror Offset**: Offset for the mirrored image.
|
||||
- **Mirror Scale**: Scale of the mirrored image.
|
||||
|
||||
<br>
|
||||
|
||||
#### Gradation Mode
|
||||
|
||||
- **Gradation Mode**: `None`, `Horizontal Gradient`, `Horizontal`, `Vertical Gradient`, `Vertical`, `Radial Fast`, `Radial Detail`, `Diagonal To Right Bottom`, `Diagonal To Right Top`, `Diagonal To Left Bottom`, `Angle`, `Angle Gradient`
|
||||

|
||||
|
||||
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `RadialFast`, `RadialDetail`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
|
||||

|
||||
- **Gradation Gradient**: The gradient of the gradation.
|
||||
- **Gradation Color 1**: The first color of the gradation.
|
||||
- **Gradation Color 2**: The second color of the gradation.
|
||||
- **Gradation Offset**: The offset of the gradation range.
|
||||
- **Gradation Scale**: The scale of the gradation range.
|
||||
- **Gradation Rotation**: The rotation of the gradation range.
|
||||
- **Gradation Rotation**: The rotation of the gradation range (`Angle` or `AngleGradient`).
|
||||
|
||||
> [!TIP]
|
||||
> `Horizontal Gradient` and `Vertical Gradient` divide the mesh horizontally or vertically and apply a gradient.
|
||||
@@ -256,30 +318,85 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
> It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape.
|
||||
> `Gradation Gradient` has two modes, `Blend` and `Fixed`.
|
||||
|
||||
<br>
|
||||
|
||||
#### Edge Mode
|
||||
|
||||

|
||||
|
||||
- **Edge Mode**: `None`, `Plain`, `Shiny`
|
||||

|
||||
- **Edge Width**: The width of the edge.
|
||||
- **Edge Color Filter**: Specifies the edge color.
|
||||
- **Edge Color**: The color of the edge.
|
||||
- **Edge Color Glow**: Set the shadow color to glow.
|
||||
- **Edge Shiny Width**: The width of the edge shiny.
|
||||
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny (using shader side `_Time`).
|
||||
|
||||
<br>
|
||||
|
||||
#### Detail Filter
|
||||
|
||||

|
||||
|
||||
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Replace`, `MuliplyAdditive`
|
||||

|
||||
- **Detail Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Detail Threshold** (`Masking` only): The minimum and maximum alpha values used for masking. The larger the gap
|
||||
between these values, the stronger the softness effect.
|
||||
- **Detail Tex**: The texture used for the transition filter.
|
||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**: Additional properties for the texture.
|
||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Transition Filter`.
|
||||
|
||||
<br>
|
||||
|
||||
#### Others
|
||||
|
||||

|
||||
|
||||
- **Sampling Scale**: The referencing scale during sampling.
|
||||
- Larger values are suitable for high-resolution textures.
|
||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||
- **Custom Root**: Use the custom transform for some effects.
|
||||
- **Flip**:
|
||||
- `Nothing`
|
||||
- `Horizontal`
|
||||
- `Vertical`
|
||||
- `Effect`: Flip with the effect.
|
||||
- `Shadow`: Flip with the shadow.
|
||||

|
||||
|
||||
> [!TIP]
|
||||
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
|
||||
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
|
||||
> By specifying `Custom Root`, you can refer to the specified transform.
|
||||
|
||||
<br><br>
|
||||
|
||||
### Component: UIEffectTweener
|
||||
|
||||

|
||||

|
||||
|
||||
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
|
||||
|
||||
- **Culling Mask**: `Tone`, `Color`, `Sampling`, `Transition`
|
||||
- **Culling Mask**: `Tone`, `Color`, `Sampling`, `Transition`, `GradiationOffset`, `GradiationRotation`, `EdgeShiny`, `Event`
|
||||
- **OnChangeRate** (`Event` only): A event that is triggered when the tweening rate changes.
|
||||
- **Direction**: `Forward (0.0 -> 1.0)`, `Reverse (1.0 -> 0.0)`
|
||||
- **Curve**: The curve of the animation.
|
||||
- **Separate Reverse Curve**: If enabled, `Reverse Curve` will be used for the reverse direction.
|
||||
- **Reverse Curve**: The curve of the reverse animation.
|
||||
- **Delay**: The delay time before starting the animation.
|
||||
- **Duration**: The duration of the animation.
|
||||
- **Interval**: The interval time between the animation.
|
||||
- **Play On Enable**: `None`, `Forward`, `Reverse`, `Keep Direction`
|
||||
- Play the animation automatically when the component is enabled.
|
||||
- If `None` is selected, the animation will not play automatically. You can play it using the `Play`, `PlayForward` or `PlayReverse` method.
|
||||
- **Wrap Mode**: `Once`, `Loop`, `PingPongOnce`, `PingPongLoop`
|
||||
- **Reset Time On Enable**: Reset the tweening time when the component is enabled.
|
||||
- **Wrap Mode**:
|
||||
- `Once`: delay -> duration(0-1) -> onComplete
|
||||
- `Loop`: delay -> duration(0-1) -> interval -> ...
|
||||
- `PingPongOnce`: delay -> duration(0-1) -> interval -> duration(1-0) -> onComplete
|
||||
- `PingPongLoop`: delay -> duration(0-1) -> interval -> duration(1-0) -> interval -> ...
|
||||
- **Update Mode**: `Normal`, `UnscaledTime`, `Manual`
|
||||
- **On Complete**: A event that is triggered when the animation is completed.
|
||||
|
||||
@@ -289,15 +406,24 @@ You can preview the animation using the seek bar and play button.
|
||||
|
||||
### Component: UIEffectReplica
|
||||
|
||||

|
||||

|
||||
|
||||
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
|
||||
|
||||
- **Target**: The target `UIEffect` component to replicate.
|
||||
- **Use Target Transform**: Use the target's transform for some effects.
|
||||
> [!TIP]
|
||||
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
|
||||
- **Use Target Transform**: Use the target's transform for some effects.
|
||||

|
||||
- **Custom Root**: Use the custom transform for some effects.
|
||||
- **Sampling Scale**: Override the sampling scale.
|
||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||

|
||||
- **Flip**:
|
||||
- `Nothing`
|
||||
- `Horizontal`
|
||||
- `Vertical`
|
||||
- `Effect`: Flip the effect.
|
||||
- `Shadow`: Flip the shadow.
|
||||
|
||||
<br><br>
|
||||
|
||||
@@ -327,15 +453,34 @@ Alternatively, you can manually import the resources by following these steps:
|
||||
> `TextMeshPro Support` may change with updates to the UIEffect package.
|
||||
> If issues occur, try importing it again.
|
||||
|
||||
> [!TIP]
|
||||
> If you have moved `TMPro_Properties.cginc` and `TMPro.cginc` from their default install path
|
||||
> (`Assets/TextMesh Pro/Shaders/...`), you will need to manually update the paths in the shaders under
|
||||
> `TextMeshPro Support` or `TextMeshPro Support (Unity 6)`.
|
||||
|
||||
<br><br>
|
||||
|
||||
### Usage with SoftMaskForUGUI
|
||||
|
||||

|
||||
|
||||
[SoftMaskForUGUI](https://github.com/mob-sakai/SoftMaskForUGUI) is a package that allows you to create soft masks for UI elements.
|
||||
|
||||
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.6.0+)`.
|
||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||
Click the `Import` button.
|
||||
|
||||
<br><br>
|
||||
|
||||
### Runtime/Editor Preset for UIEffect
|
||||
|
||||

|
||||

|
||||
|
||||
You can create and use presets for `UIEffect` components.
|
||||
- In the `UIEffect` component inspector, click "Save As" button to save the current settings as an editor preset.
|
||||
- Click "Load" button to apply an editor preset.
|
||||
|
||||
- Click the `Load` button to apply an editor preset.
|
||||
> Click the `Append` button to load only non-default settings from the editor preset.
|
||||
- Click the `Save As New` button to save the current settings as an editor preset.
|
||||
- In the [Project Settings](#project-settings), you can register saved editor presets as runtime presets.
|
||||
- Runtime presets can be loaded using the `UIEffect.LoadPreset(presetName)` method.
|
||||
|
||||
@@ -402,6 +547,10 @@ You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings
|
||||
- **Error On Unregistered Variant**: If enabled, an error will be displayed when an unregistered shader variant is used.
|
||||
- The shader variant will be automatically added to the `Unregistered Variants` list.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> - The setting file is usually saved in `Assets/ProjectSettings/UIEffectProjectSettings.asset`. Include this file in your version control system.
|
||||
> - The setting file is automatically added as a preloaded asset in `ProjectSettings/ProjectSettings.asset`.
|
||||
|
||||
<br><br>
|
||||
|
||||
### :warning: Limitations
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine.Rendering;
|
||||
using System;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
@@ -46,7 +47,8 @@ namespace Coffee.UIEffects
|
||||
Shiny = 4,
|
||||
Mask = 5,
|
||||
Melt = 6,
|
||||
Burn = 7
|
||||
Burn = 7,
|
||||
Pattern = 8
|
||||
}
|
||||
|
||||
public enum BlendType
|
||||
@@ -76,19 +78,53 @@ namespace Coffee.UIEffects
|
||||
Mirror
|
||||
}
|
||||
|
||||
public enum EdgeMode
|
||||
{
|
||||
None = 0,
|
||||
Plain,
|
||||
Shiny
|
||||
}
|
||||
|
||||
public enum PatternArea
|
||||
{
|
||||
All = 0,
|
||||
Inner = 1,
|
||||
Edge = 2
|
||||
}
|
||||
|
||||
public enum GradationMode
|
||||
{
|
||||
None = 0,
|
||||
Horizontal,
|
||||
HorizontalGradient,
|
||||
Vertical,
|
||||
VerticalGradient,
|
||||
RadialFast,
|
||||
RadialDetail,
|
||||
DiagonalToRightBottom,
|
||||
DiagonalToLeftBottom,
|
||||
Angle,
|
||||
AngleGradient
|
||||
Horizontal = 1,
|
||||
HorizontalGradient = 2,
|
||||
Vertical = 3,
|
||||
VerticalGradient = 4,
|
||||
RadialFast = 5,
|
||||
RadialDetail = 6,
|
||||
Diagonal = 11,
|
||||
DiagonalToRightBottom = 7,
|
||||
DiagonalToLeftBottom = 8,
|
||||
Angle = 9,
|
||||
AngleGradient = 10
|
||||
}
|
||||
|
||||
public enum DetailFilter
|
||||
{
|
||||
None = 0,
|
||||
Masking = 1,
|
||||
Multiply = 2,
|
||||
Additive = 3,
|
||||
Replace = 4,
|
||||
MultiplyAdditive = 5
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum Flip
|
||||
{
|
||||
Horizontal = 1 << 0,
|
||||
Vertical = 1 << 1,
|
||||
Effect = 1 << 2,
|
||||
Shadow = 1 << 3
|
||||
}
|
||||
|
||||
internal static class BlendTypeConverter
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Coffee.UIEffectInternal
|
||||
target.enabled = false;
|
||||
|
||||
// Find MonoScript of the specified component.
|
||||
foreach (var script in Resources.FindObjectsOfTypeAll<MonoScript>())
|
||||
foreach (var script in MonoImporter.GetAllRuntimeMonoScripts())
|
||||
{
|
||||
if (script.GetClass() != typeof(T))
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -110,10 +111,11 @@ namespace Coffee.UIEffectInternal
|
||||
dst.Clear();
|
||||
for (var i = 0; i < vertexCount; i++)
|
||||
{
|
||||
dst.AddVert(positions[i], colors[i], uv0[i], uv1[i], normals[i], tangents[i]);
|
||||
dst.AddVert(positions.GetOrDefault(i), colors.GetOrDefault(i), uv0.GetOrDefault(i), uv1.GetOrDefault(i),
|
||||
normals.GetOrDefault(i), tangents.GetOrDefault(i));
|
||||
}
|
||||
|
||||
for (var i = 0; i < indexCount; i += 3)
|
||||
for (var i = 0; i < indexCount - 2; i += 3)
|
||||
{
|
||||
dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]);
|
||||
}
|
||||
@@ -126,5 +128,12 @@ namespace Coffee.UIEffectInternal
|
||||
InternalListPool<Color32>.Return(ref colors);
|
||||
InternalListPool<int>.Return(ref indices);
|
||||
}
|
||||
|
||||
private static T GetOrDefault<T>(this List<T> self, int index)
|
||||
{
|
||||
return 0 <= index && index < self.Count
|
||||
? self[index]
|
||||
: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
public class CgincPathSync : AssetPostprocessor
|
||||
{
|
||||
private static string[] s_ShaderNames = null;
|
||||
private static string s_CgincPattern = null;
|
||||
|
||||
public static void RegisterShaders(string cgincPattern, string[] shaderNames)
|
||||
{
|
||||
s_CgincPattern = cgincPattern;
|
||||
s_ShaderNames = shaderNames;
|
||||
UpdateTmpCgincPath();
|
||||
}
|
||||
|
||||
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
|
||||
{
|
||||
UpdateTmpCgincPath();
|
||||
}
|
||||
|
||||
private static void UpdateTmpCgincPath()
|
||||
{
|
||||
if (s_CgincPattern == null || s_ShaderNames == null || s_ShaderNames.Length == 0) return;
|
||||
|
||||
AssetDatabase.StartAssetEditing();
|
||||
string[] cgincs = null;
|
||||
foreach (var shaderName in s_ShaderNames)
|
||||
{
|
||||
var shader = Shader.Find(shaderName);
|
||||
if (!shader) continue;
|
||||
|
||||
var hasCgincError = ShaderUtil.GetShaderMessages(shader)
|
||||
.Any(x => Regex.IsMatch(x.message, $"Couldn't open include file.*{s_CgincPattern}"));
|
||||
if (!hasCgincError) continue;
|
||||
|
||||
cgincs = cgincs ?? AssetDatabase.FindAssets("t:ShaderInclude")
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
.Where(x => Regex.IsMatch(x, s_CgincPattern))
|
||||
.ToArray();
|
||||
|
||||
UpdateTmpCgincPath(shader, cgincs);
|
||||
}
|
||||
|
||||
AssetDatabase.StopAssetEditing();
|
||||
}
|
||||
|
||||
private static void UpdateTmpCgincPath(Shader shader, string[] cgincs)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(shader);
|
||||
var text = File.ReadAllText(path);
|
||||
var hash = text.GetHashCode();
|
||||
|
||||
foreach (var cginc in cgincs)
|
||||
{
|
||||
var file = Path.GetFileName(cginc);
|
||||
text = Regex.Replace(text, $"#include.*\"[^\"]*{file}\"", $"#include \"{cginc}\"",
|
||||
RegexOptions.Multiline);
|
||||
}
|
||||
|
||||
if (hash == text.GetHashCode()) return;
|
||||
|
||||
Debug.Log($"Update Shader: '{path}'");
|
||||
File.WriteAllText(path, text, Encoding.UTF8);
|
||||
AssetDatabase.ImportAsset(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b39275b24ae5648d5a67a308a9127e81
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
[Serializable]
|
||||
public struct MinMax01
|
||||
{
|
||||
[SerializeField]
|
||||
private float m_Min;
|
||||
|
||||
[SerializeField]
|
||||
private float m_Max;
|
||||
|
||||
public MinMax01(float min, float max)
|
||||
{
|
||||
m_Min = Mathf.Clamp01(Mathf.Min(min, max));
|
||||
m_Max = Mathf.Clamp01(Mathf.Max(min, max));
|
||||
}
|
||||
|
||||
public float min
|
||||
{
|
||||
get => m_Min;
|
||||
set
|
||||
{
|
||||
m_Min = Mathf.Clamp01(value);
|
||||
m_Max = Mathf.Max(value, m_Max);
|
||||
}
|
||||
}
|
||||
|
||||
public float max
|
||||
{
|
||||
get => m_Max;
|
||||
set
|
||||
{
|
||||
m_Max = Mathf.Clamp01(value);
|
||||
m_Min = Mathf.Min(value, m_Min);
|
||||
}
|
||||
}
|
||||
|
||||
public float average => (m_Max + m_Min) * 0.5f;
|
||||
|
||||
public bool Approximately(MinMax01 other)
|
||||
{
|
||||
return Mathf.Approximately(m_Min, other.m_Min) && Mathf.Approximately(m_Max, other.m_Max);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomPropertyDrawer(typeof(MinMax01))]
|
||||
public class MinMaxRangeDrawer : PropertyDrawer
|
||||
{
|
||||
private const float k_NumWidth = 50;
|
||||
private const float k_Space = 5;
|
||||
private SerializedProperty _max;
|
||||
private SerializedProperty _min;
|
||||
|
||||
private static bool IsSingleLine(GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.wideMode || label == null || string.IsNullOrEmpty(label.text);
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return IsSingleLine(label) ? 18 : 36;
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, prop);
|
||||
|
||||
if (_min == null)
|
||||
{
|
||||
prop.Next(true);
|
||||
_min = prop.Copy();
|
||||
prop.Next(true);
|
||||
_max = prop.Copy();
|
||||
}
|
||||
|
||||
if (IsSingleLine(label))
|
||||
{
|
||||
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
var indent = (EditorGUI.indentLevel + 1) * 15f;
|
||||
position = new Rect(position.x + indent, position.y + 18, position.width - indent, 16);
|
||||
}
|
||||
|
||||
var min = _min.floatValue;
|
||||
var max = _max.floatValue;
|
||||
if (Draw(position, ref min, ref max))
|
||||
{
|
||||
_min.floatValue = min;
|
||||
_max.floatValue = max;
|
||||
}
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
public static bool Draw(Rect position, ref float minValue, ref float maxValue)
|
||||
{
|
||||
var indentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var rect = new Rect(position.x, position.y, k_NumWidth, position.height);
|
||||
minValue = Mathf.Clamp(EditorGUI.FloatField(rect, minValue), 0, maxValue);
|
||||
|
||||
rect.x += rect.width + k_Space;
|
||||
rect.width = position.width - k_NumWidth * 2 - k_Space * 2;
|
||||
EditorGUI.MinMaxSlider(rect, ref minValue, ref maxValue, 0, 1);
|
||||
|
||||
rect.x += rect.width + k_Space;
|
||||
rect.width = k_NumWidth;
|
||||
maxValue = Mathf.Clamp(EditorGUI.FloatField(rect, maxValue), minValue, 1);
|
||||
|
||||
EditorGUI.indentLevel = indentLevel;
|
||||
return EditorGUI.EndChangeCheck();
|
||||
}
|
||||
|
||||
public static bool DrawLayout(GUIContent label, ref float minValue, ref float maxValue)
|
||||
{
|
||||
Rect position;
|
||||
if (IsSingleLine(label))
|
||||
{
|
||||
position = EditorGUILayout.GetControlRect(true, 18f);
|
||||
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
}
|
||||
else
|
||||
{
|
||||
position = EditorGUILayout.GetControlRect(true, 36f);
|
||||
EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
var indent = (EditorGUI.indentLevel + 1) * 15f;
|
||||
position = new Rect(position.x + indent, position.y + 18, position.width - indent, 16);
|
||||
}
|
||||
|
||||
return Draw(position, ref minValue, ref maxValue);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dacf9fb8cdb9a4a62a74b629d84cabd3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,11 +3,16 @@ using System.Diagnostics;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
#if UNITY_EDITOR && UNITY_2021_2_OR_NEWER
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
using UnityEditor.SceneManagement;
|
||||
#elif UNITY_EDITOR
|
||||
#else
|
||||
using UnityEditor.Experimental.SceneManagement;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
@@ -72,5 +77,56 @@ namespace Coffee.UIEffectInternal
|
||||
|
||||
public static bool isBatchOrBuilding => Application.isBatchMode || BuildPipeline.isBuildingPlayer;
|
||||
#endif
|
||||
|
||||
[Conditional("UNITY_EDITOR")]
|
||||
public static void QueuePlayerLoopUpdate()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if !UNITY_2021_2_OR_NEWER
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
[Conditional("UNITY_EDITOR")]
|
||||
internal class IconAttribute : Attribute
|
||||
{
|
||||
private readonly string _path;
|
||||
|
||||
public IconAttribute(string path)
|
||||
{
|
||||
_path = path;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private static Action<Object, Texture2D> s_SetIconForObject = typeof(EditorGUIUtility)
|
||||
.GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic)
|
||||
.CreateDelegate(typeof(Action<Object, Texture2D>), null) as Action<Object, Texture2D>;
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
private static void InitializeOnLoadMethod()
|
||||
{
|
||||
if (Misc.isBatchOrBuilding) return;
|
||||
|
||||
var types = TypeCache.GetTypesWithAttribute<IconAttribute>();
|
||||
var scripts = MonoImporter.GetAllRuntimeMonoScripts();
|
||||
foreach (var type in types)
|
||||
{
|
||||
var script = scripts.FirstOrDefault(x => x.GetClass() == type);
|
||||
if (!script) continue;
|
||||
|
||||
var path = type.GetCustomAttribute<IconAttribute>()?._path;
|
||||
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(path);
|
||||
if (!icon) continue;
|
||||
|
||||
s_SetIconForObject(script, icon);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
[Conditional("UNITY_EDITOR")]
|
||||
public sealed class PowerRangeAttribute : PropertyAttribute
|
||||
{
|
||||
public readonly float min;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.PackageManager.UI;
|
||||
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
internal static class ShaderSampleImporter
|
||||
{
|
||||
private static (string shaderName, string sampleName, string version)[] s_Samples;
|
||||
private static (string guid, string fileName)[] s_DeprecatedShaders;
|
||||
private static readonly Dictionary<string, string> s_SampleNames = new Dictionary<string, string>();
|
||||
private static readonly Dictionary<string, string> s_ShaderAliases = new Dictionary<string, string>();
|
||||
|
||||
public static void RegisterShaderSamples((string shaderName, string sampleName, string version)[] samples)
|
||||
{
|
||||
if (IsBatchOrBuilding()) return;
|
||||
|
||||
// Collect sample names.
|
||||
s_Samples = samples;
|
||||
foreach (var (shaderName, sampleName, _) in samples)
|
||||
{
|
||||
s_SampleNames[shaderName] = sampleName;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RegisterShaderAliases((string, string)[] aliases)
|
||||
{
|
||||
foreach (var (from, to) in aliases)
|
||||
{
|
||||
s_ShaderAliases[from] = to;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RegisterDeprecatedShaders((string, string)[] deprecatedShaders)
|
||||
{
|
||||
if (IsBatchOrBuilding()) return;
|
||||
|
||||
s_DeprecatedShaders = deprecatedShaders;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Import the sample containing the requested shader.
|
||||
/// If choice 'Import' is selected, the sample is imported.
|
||||
/// If choice 'Skip in this session' is selected, the sample is skipped in this session.
|
||||
/// </summary>
|
||||
public static bool ImportShaderIfSelected(string shaderName)
|
||||
{
|
||||
if (IsBatchOrBuilding()) return false;
|
||||
|
||||
if (s_ShaderAliases.TryGetValue(shaderName, out var alias))
|
||||
{
|
||||
shaderName = alias;
|
||||
}
|
||||
|
||||
// Find sample name.
|
||||
if (s_SampleNames.TryGetValue(shaderName, out var sampleName))
|
||||
{
|
||||
var message = $"Import the sample '{sampleName}' to use the shader '{shaderName}'.";
|
||||
return ImportSampleIfSelected(sampleName, message);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool ImportSampleIfSelected(string sampleName, string message)
|
||||
{
|
||||
if (IsBatchOrBuilding()) return false;
|
||||
if (!s_SampleNames.ContainsValue(sampleName)) return false;
|
||||
|
||||
// Find package info.
|
||||
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderSampleImporter).Assembly);
|
||||
if (pInfo == null) return false;
|
||||
|
||||
// Find sample. If not found (resolvedPath == null), skip.
|
||||
var sample = Sample.FindByPackage(pInfo.name, pInfo.version)
|
||||
.FirstOrDefault(x => x.displayName == sampleName);
|
||||
if (sample.resolvedPath == null) return false;
|
||||
|
||||
// Import the sample if selected.
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
var selected = EditorUtility.DisplayDialog($"Import {sampleName}", message, "Import", "Cancel");
|
||||
if (!selected) return false;
|
||||
}
|
||||
|
||||
// Remove the imported sample name from the list.
|
||||
foreach (var shaderName in s_SampleNames.Keys.ToArray())
|
||||
{
|
||||
if (s_SampleNames[shaderName] != sampleName) continue;
|
||||
s_SampleNames.Remove(shaderName);
|
||||
DeleteShader(shaderName);
|
||||
}
|
||||
|
||||
// Import the sample in the next frame.
|
||||
EditorApplication.delayCall += () => sample.Import(Sample.ImportOptions.OverridePreviousImports);
|
||||
return true;
|
||||
}
|
||||
|
||||
private static string GetVersion(string shaderName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(shaderName)) return null;
|
||||
|
||||
var shader = Shader.Find(shaderName);
|
||||
if (!shader) return null;
|
||||
|
||||
var path = AssetDatabase.GetAssetPath(shader);
|
||||
if (string.IsNullOrEmpty(path)) return null;
|
||||
|
||||
return AssetImporter.GetAtPath(path).userData;
|
||||
}
|
||||
|
||||
private static void DeleteShader(string shaderName)
|
||||
{
|
||||
var shader = Shader.Find(shaderName);
|
||||
if (shader)
|
||||
{
|
||||
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(shader));
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsBatchOrBuilding()
|
||||
{
|
||||
return Application.isBatchMode || BuildPipeline.isBuildingPlayer;
|
||||
}
|
||||
|
||||
public static void Update()
|
||||
{
|
||||
if (s_Samples == null || IsBatchOrBuilding()) return;
|
||||
|
||||
// Find package info.
|
||||
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderSampleImporter).Assembly);
|
||||
if (pInfo == null) return;
|
||||
|
||||
// Find sample. If not found (resolvedPath == null), skip.
|
||||
var sample = Sample.FindByPackage(pInfo.name, pInfo.version).FirstOrDefault();
|
||||
if (sample.resolvedPath == null) return;
|
||||
|
||||
// Update the sample.
|
||||
foreach (var (shaderName, sampleName, version) in s_Samples)
|
||||
{
|
||||
if (string.IsNullOrEmpty(version)) continue;
|
||||
if (!s_SampleNames.ContainsValue(sampleName)) continue;
|
||||
|
||||
// If the shader exist and the version is different, add the sample to the update list.
|
||||
var currentVersion = GetVersion(shaderName);
|
||||
if (currentVersion != null && currentVersion != version && ImportSampleIfSelected(sampleName, null))
|
||||
{
|
||||
Debug.Log($"Updating '{sampleName}' to use the package '{pInfo.displayName} v{pInfo.version}'.");
|
||||
}
|
||||
}
|
||||
|
||||
// Remove deprecated shaders.
|
||||
foreach (var (guid, fileName) in s_DeprecatedShaders)
|
||||
{
|
||||
var path = AssetDatabase.GUIDToAssetPath(guid);
|
||||
if (!string.IsNullOrEmpty(path) && Path.GetFileName(path) == fileName)
|
||||
{
|
||||
AssetDatabase.DeleteAsset(path);
|
||||
}
|
||||
}
|
||||
|
||||
s_Samples = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 763d620015bc94d7ab423f3b42aabf1e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -8,7 +8,6 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using UnityEditor.PackageManager.UI;
|
||||
using UnityEditorInternal;
|
||||
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
|
||||
using Object = UnityEngine.Object;
|
||||
@@ -63,6 +62,7 @@ namespace Coffee.UIEffectInternal
|
||||
#endif
|
||||
|
||||
public ShaderVariantCollection shaderVariantCollection => m_Asset;
|
||||
public Func<string, bool> onShaderRequested;
|
||||
|
||||
public Shader FindOptionalShader(Shader shader,
|
||||
string requiredName,
|
||||
@@ -78,16 +78,16 @@ namespace Coffee.UIEffectInternal
|
||||
return Shader.Find(optionalShaderName);
|
||||
}
|
||||
|
||||
// The shader has
|
||||
if (shader.name.Contains(requiredName))
|
||||
// The shader has required name.
|
||||
var shaderName = shader.name;
|
||||
if (shaderName.Contains(requiredName))
|
||||
{
|
||||
_cachedOptionalShaders[id] = shader.name;
|
||||
_cachedOptionalShaders[id] = shaderName;
|
||||
return shader;
|
||||
}
|
||||
|
||||
// Find optional shader.
|
||||
Shader optionalShader;
|
||||
var shaderName = shader.name;
|
||||
foreach (var pair in m_OptionalShaders)
|
||||
{
|
||||
if (pair.key != shaderName) continue;
|
||||
@@ -100,7 +100,7 @@ namespace Coffee.UIEffectInternal
|
||||
}
|
||||
|
||||
// Find optional shader by format.
|
||||
optionalShaderName = string.Format(format, shader.name);
|
||||
optionalShaderName = string.Format(format, shaderName);
|
||||
optionalShader = Shader.Find(optionalShaderName);
|
||||
if (optionalShader)
|
||||
{
|
||||
@@ -109,7 +109,10 @@ namespace Coffee.UIEffectInternal
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
ImportFromSample(optionalShaderName);
|
||||
if (onShaderRequested?.Invoke(optionalShaderName) ?? false)
|
||||
{
|
||||
return Shader.Find(defaultOptionalShaderName);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Find default optional shader.
|
||||
@@ -119,83 +122,67 @@ namespace Coffee.UIEffectInternal
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private readonly HashSet<StringPair> _logVariants = new HashSet<StringPair>();
|
||||
private readonly Dictionary<string, string> _sampleNames = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Import the sample containing the requested shader.
|
||||
/// If choice 'Import' is selected, the sample is imported.
|
||||
/// If choice 'Skip in this session' is selected, the sample is skipped in this session.
|
||||
/// </summary>
|
||||
public void ImportFromSample(string shaderName)
|
||||
{
|
||||
if (Misc.isBatchOrBuilding) return;
|
||||
|
||||
// Find sample name.
|
||||
if (_sampleNames.TryGetValue(shaderName, out var sampleName))
|
||||
{
|
||||
// Find package info.
|
||||
var pInfo = PackageInfo.FindForAssembly(typeof(ShaderVariantRegistry).Assembly);
|
||||
if (pInfo == null) return;
|
||||
|
||||
// Find sample. If not found (resolvedPath == null), skip.
|
||||
var sample = Sample.FindByPackage(pInfo.name, pInfo.version)
|
||||
.FirstOrDefault(x => x.displayName == sampleName);
|
||||
if (sample.resolvedPath == null) return;
|
||||
|
||||
// Import the sample if selected.
|
||||
var importSelected = EditorUtility.DisplayDialog($"Import {sampleName}",
|
||||
$"Import '{sampleName}' to use the shader '{shaderName}'", "Import", "Cancel");
|
||||
if (importSelected)
|
||||
{
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
sample.Import();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearCache()
|
||||
{
|
||||
_cachedOptionalShaders.Clear();
|
||||
}
|
||||
|
||||
public void RegisterSamples((string shaderName, string sampleName)[] samples)
|
||||
/// <summary>
|
||||
/// Register all optional shaders associated with the package.
|
||||
/// If the shader file has a comment "// [OptionalShader] {packageName}: {shaderName}", it will be registered.
|
||||
/// </summary>
|
||||
public void RegisterOptionalShaders(Object owner)
|
||||
{
|
||||
foreach (var (shaderName, sampleName) in samples)
|
||||
var shaderPaths = ShaderUtil.GetAllShaderInfo()
|
||||
.Select(s => AssetDatabase.GetAssetPath(Shader.Find(s.name)))
|
||||
.Where(path => !string.IsNullOrEmpty(path) && path.EndsWith(".shader"))
|
||||
.ToArray();
|
||||
foreach (var path in shaderPaths)
|
||||
{
|
||||
_sampleNames[shaderName] = sampleName;
|
||||
RegisterOptionalShaders(owner, path);
|
||||
}
|
||||
}
|
||||
|
||||
public void InitializeIfNeeded(Object owner, string optionalName)
|
||||
/// <summary>
|
||||
/// Register optional shaders associated with the package.
|
||||
/// If the shader file has a comment "// [OptionalShader] {packageName}: {shaderName}", it will be registered.
|
||||
/// </summary>
|
||||
private void RegisterOptionalShaders(Object owner, string path)
|
||||
{
|
||||
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] InitializeIfNeeded");
|
||||
if (!File.Exists(path) || !path.EndsWith(".shader")) return;
|
||||
|
||||
var packageName = PackageInfo.FindForAssembly(typeof(ShaderVariantRegistry).Assembly)?.name;
|
||||
if (string.IsNullOrEmpty(packageName)) return;
|
||||
|
||||
// Register optional shader names by shader comment.
|
||||
if (!string.IsNullOrEmpty(optionalName))
|
||||
var pattern = $"// \\[OptionalShader\\] {packageName}: (.*)$";
|
||||
var registeredKeys = new HashSet<string>(m_OptionalShaders.Select(x => x.key));
|
||||
var keys = File.ReadLines(path)
|
||||
.Take(10)
|
||||
.Select(line => Regex.Match(line, pattern))
|
||||
.Where(match => match.Success && registeredKeys.Add(match.Groups[1].Value))
|
||||
.Select(match => match.Groups[1].Value)
|
||||
.ToArray();
|
||||
if (0 < keys.Length)
|
||||
{
|
||||
var optionalShaders = ShaderUtil.GetAllShaderInfo()
|
||||
.Where(s => s.name.Contains(optionalName))
|
||||
.Select(s => (s.name, path: AssetDatabase.GetAssetPath(Shader.Find(s.name))))
|
||||
.Where(x => !string.IsNullOrEmpty(x.path))
|
||||
.SelectMany(x =>
|
||||
{
|
||||
return File.ReadLines(x.path)
|
||||
.Take(10)
|
||||
.Where(line => line.Contains($"OptionalShader@{optionalName}"))
|
||||
.Select(line => Regex.Match(line, @":\s*(.*)$"))
|
||||
.Where(match => match.Success)
|
||||
.Select(match => new StringPair() { key = match.Groups[1].Value, value = x.name });
|
||||
})
|
||||
.Where(pair => m_OptionalShaders.All(x => x.key != pair.key))
|
||||
.ToArray();
|
||||
if (0 < optionalShaders.Length)
|
||||
// Find shader.
|
||||
var shader = AssetDatabase.LoadAssetAtPath<Shader>(path);
|
||||
if (!shader) return;
|
||||
|
||||
var shaderName = shader.name;
|
||||
foreach (var key in keys)
|
||||
{
|
||||
m_OptionalShaders.AddRange(optionalShaders);
|
||||
EditorUtility.SetDirty(owner);
|
||||
m_OptionalShaders.Add(new StringPair() { key = key, value = shaderName });
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(owner);
|
||||
}
|
||||
}
|
||||
|
||||
public void InitializeIfNeeded(Object owner)
|
||||
{
|
||||
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] InitializeIfNeeded");
|
||||
|
||||
if (!m_Asset && AssetDatabase.IsMainAsset(owner))
|
||||
{
|
||||
@@ -286,7 +273,7 @@ namespace Coffee.UIEffectInternal
|
||||
private Editor _editor;
|
||||
private bool _expand;
|
||||
|
||||
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName)
|
||||
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName, Action onFindOptions)
|
||||
{
|
||||
var so = property.serializedObject;
|
||||
var optionalShaders = property.FindPropertyRelative("m_OptionalShaders");
|
||||
@@ -302,8 +289,14 @@ namespace Coffee.UIEffectInternal
|
||||
EditorGUIUtility.TrTextContent($"Optional Shaders {optionName}",
|
||||
"Specify optional shaders explicitly."));
|
||||
|
||||
var rButton = new Rect(rect.x + rect.width - 80, rect.y, 80, rect.height - 4);
|
||||
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
|
||||
var rButton1 = new Rect(rect.x + rect.width - 150, rect.y, 90, rect.height - 4);
|
||||
if (GUI.Button(rButton1, "Find Options", EditorStyles.miniButton))
|
||||
{
|
||||
onFindOptions?.Invoke();
|
||||
}
|
||||
|
||||
var rButton2 = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
|
||||
if (GUI.Button(rButton2, "Clear All", EditorStyles.miniButton))
|
||||
{
|
||||
optionalShaders.ClearArray();
|
||||
}
|
||||
@@ -346,7 +339,7 @@ namespace Coffee.UIEffectInternal
|
||||
var rLabel = new Rect(rect.x + 20, rect.y, 200, rect.height);
|
||||
EditorGUI.LabelField(rLabel, "Unregistered Shader Variants");
|
||||
|
||||
var rButton = new Rect(rect.x + rect.width - 80, rect.y, 80, rect.height - 4);
|
||||
var rButton = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
|
||||
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
|
||||
{
|
||||
unregisteredVariants.ClearArray();
|
||||
@@ -438,9 +431,10 @@ namespace Coffee.UIEffectInternal
|
||||
Editor.CreateCachedEditor(collection, null, ref editor);
|
||||
editor.serializedObject.Update();
|
||||
var shaders = editor.serializedObject.FindProperty("m_Shaders");
|
||||
var drawShaderEntry = s_MiDrawShaderEntry?.CreateDelegate(typeof(Action<int>), editor) as Action<int>;
|
||||
for (var i = 0; i < shaders.arraySize; i++)
|
||||
{
|
||||
s_MiDrawShaderEntry.Invoke(editor, new object[] { i });
|
||||
drawShaderEntry?.Invoke(i);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
@@ -5,7 +5,7 @@ MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
@@ -6,9 +6,6 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.Profiling;
|
||||
using UnityEngine.UI;
|
||||
using UnityEditor;
|
||||
#if TMP_ENABLE
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
[assembly: InternalsVisibleTo("UIEffect")]
|
||||
[assembly: InternalsVisibleTo("Coffee.UIEffect.Editor")]
|
||||
@@ -19,16 +16,17 @@ namespace Coffee.UIEffects
|
||||
[DisallowMultipleComponent]
|
||||
public abstract class UIEffectBase : UIBehaviour, IMeshModifier, IMaterialModifier, ICanvasRaycastFilter
|
||||
{
|
||||
private static readonly VertexHelper s_VertexHelper = new VertexHelper();
|
||||
private static Mesh s_Mesh;
|
||||
|
||||
private static readonly InternalObjectPool<UIEffectContext> s_ContextPool =
|
||||
new InternalObjectPool<UIEffectContext>(() => new UIEffectContext(), x => true, x => x.Reset());
|
||||
|
||||
private Graphic _graphic;
|
||||
private Material _material;
|
||||
private UIEffectContext _context;
|
||||
private Action _onBeforeCanvasRebuild;
|
||||
private bool _canModifyMesh;
|
||||
private Matrix4x4 _prevTransformHash;
|
||||
|
||||
public Material effectMaterial => _material;
|
||||
public Graphic graphic => _graphic ? _graphic : _graphic = GetComponent<Graphic>();
|
||||
public virtual uint effectId => (uint)GetInstanceID();
|
||||
public virtual float actualSamplingScale => 1;
|
||||
@@ -50,17 +48,16 @@ namespace Coffee.UIEffects
|
||||
|
||||
public virtual RectTransform transitionRoot => transform as RectTransform;
|
||||
|
||||
public virtual Flip flip
|
||||
{
|
||||
get => 0;
|
||||
set { }
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
#if TMP_ENABLE
|
||||
if (graphic is TextMeshProUGUI)
|
||||
{
|
||||
_prevLossyScaleY = transform.lossyScale.y;
|
||||
Canvas.willRenderCanvases += CheckSDFScaleForTMP;
|
||||
UIExtraCallbacks.onScreenSizeChanged += SetVerticesDirtyForTMP;
|
||||
}
|
||||
#endif
|
||||
|
||||
_onBeforeCanvasRebuild ??= OnBeforeCanvasRebuild;
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild += _onBeforeCanvasRebuild;
|
||||
UpdateContext(context);
|
||||
SetMaterialDirty();
|
||||
SetVerticesDirty();
|
||||
@@ -68,10 +65,10 @@ namespace Coffee.UIEffects
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
#if TMP_ENABLE
|
||||
Canvas.willRenderCanvases -= CheckSDFScaleForTMP;
|
||||
UIExtraCallbacks.onScreenSizeChanged -= SetVerticesDirtyForTMP;
|
||||
#endif
|
||||
if (_onBeforeCanvasRebuild != null)
|
||||
{
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild -= _onBeforeCanvasRebuild;
|
||||
}
|
||||
|
||||
MaterialRepository.Release(ref _material);
|
||||
SetMaterialDirty();
|
||||
@@ -80,9 +77,19 @@ namespace Coffee.UIEffects
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
_onBeforeCanvasRebuild = null;
|
||||
_graphic = null;
|
||||
s_ContextPool.Return(ref _context);
|
||||
}
|
||||
|
||||
protected virtual void OnBeforeCanvasRebuild()
|
||||
{
|
||||
if (!_canModifyMesh && CanModifyMesh())
|
||||
{
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public void ModifyMesh(Mesh mesh)
|
||||
{
|
||||
}
|
||||
@@ -91,7 +98,23 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (!isActiveAndEnabled || context == null) return;
|
||||
|
||||
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
|
||||
_canModifyMesh = CanModifyMesh();
|
||||
if (_canModifyMesh)
|
||||
{
|
||||
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape, flip);
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanModifyMesh()
|
||||
{
|
||||
// The transitionRoot is same as the transform => true.
|
||||
var root = transitionRoot;
|
||||
if (transform == root) return true;
|
||||
|
||||
// The transitionRoot is not visible => false.
|
||||
var scale1 = root.lossyScale;
|
||||
var scale2 = transform.lossyScale;
|
||||
return !Mathf.Approximately(scale1.x * scale1.y * scale2.x * scale2.y, 0);
|
||||
}
|
||||
|
||||
public virtual Material GetModifiedMaterial(Material baseMaterial)
|
||||
@@ -119,7 +142,8 @@ namespace Coffee.UIEffects
|
||||
Profiler.EndSample();
|
||||
}
|
||||
|
||||
ApplyContextToMaterial();
|
||||
_material.CopyPropertiesFromMaterial(baseMaterial);
|
||||
ApplyContextToMaterial(_material);
|
||||
Profiler.EndSample();
|
||||
return _material;
|
||||
}
|
||||
@@ -128,20 +152,18 @@ namespace Coffee.UIEffects
|
||||
protected override void OnValidate()
|
||||
{
|
||||
UpdateContext(context);
|
||||
ApplyContextToMaterial();
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Reset()
|
||||
{
|
||||
OnValidate();
|
||||
}
|
||||
|
||||
internal virtual void SetEnablePreviewIfSelected(GameObject[] selection)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override void OnRectTransformDimensionsChange()
|
||||
@@ -159,27 +181,11 @@ namespace Coffee.UIEffects
|
||||
|
||||
public virtual void SetVerticesDirty()
|
||||
{
|
||||
#if TMP_ENABLE
|
||||
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||
{
|
||||
if (isActiveAndEnabled)
|
||||
{
|
||||
OnTMPChanged(textMeshProUGUI);
|
||||
}
|
||||
else if (0 < textMeshProUGUI.textInfo?.meshInfo?.Length
|
||||
&& 0 < textMeshProUGUI.textInfo.meshInfo[0].vertexCount)
|
||||
{
|
||||
textMeshProUGUI.UpdateVertexData();
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (graphic)
|
||||
{
|
||||
graphic.SetVerticesDirty();
|
||||
#if UNITY_EDITOR
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
#endif
|
||||
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, enabled);
|
||||
Misc.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,145 +194,44 @@ namespace Coffee.UIEffects
|
||||
if (graphic)
|
||||
{
|
||||
graphic.SetMaterialDirty();
|
||||
#if UNITY_EDITOR
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
#endif
|
||||
Misc.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void UpdateContext(UIEffectContext c);
|
||||
|
||||
public virtual void ApplyContextToMaterial()
|
||||
protected bool CheckTransformChangedWith(Transform root)
|
||||
{
|
||||
if (!isActiveAndEnabled || context == null) return;
|
||||
var sensitivity = UIEffectProjectSettings.transformSensitivity;
|
||||
return root
|
||||
&& root != transform
|
||||
&& transform.HasChanged(root, ref _prevTransformHash, sensitivity);
|
||||
}
|
||||
|
||||
context.ApplyToMaterial(_material, actualSamplingScale);
|
||||
internal void ReleaseMaterial()
|
||||
{
|
||||
MaterialRepository.Release(ref _material);
|
||||
}
|
||||
|
||||
internal abstract void UpdateContext(UIEffectContext c);
|
||||
|
||||
public virtual void ApplyContextToMaterial(Material material)
|
||||
{
|
||||
if (!isActiveAndEnabled || context == null || !material) return;
|
||||
|
||||
context.ApplyToMaterial(material, actualSamplingScale);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UIEffectProjectSettings.shaderRegistry.RegisterVariant(_material, "UI > UIEffect");
|
||||
if (!EditorApplication.isPlaying)
|
||||
Profiler.BeginSample("(Editor/UIE)[UIEffect] ApplyContextToMaterial Post Process");
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
SetEnablePreviewIfSelected(Selection.gameObjects);
|
||||
Misc.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
UIEffectProjectSettings.shaderRegistry.RegisterVariant(material, "UI > UIEffect");
|
||||
Profiler.EndSample();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if TMP_ENABLE
|
||||
#if UNITY_EDITOR
|
||||
[InitializeOnLoadMethod]
|
||||
#else
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
#endif
|
||||
private static void InitializeOnLoad()
|
||||
{
|
||||
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
|
||||
{
|
||||
if (obj is TextMeshProUGUI textMeshProUGUI)
|
||||
{
|
||||
OnTMPChanged(textMeshProUGUI);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void OnTMPChanged(TextMeshProUGUI textMeshProUGUI)
|
||||
{
|
||||
if (!textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect)) return;
|
||||
if (!effect || !effect.isActiveAndEnabled) return;
|
||||
|
||||
if (!s_Mesh)
|
||||
{
|
||||
s_Mesh = new Mesh();
|
||||
s_Mesh.MarkDynamic();
|
||||
}
|
||||
|
||||
var target = effect is UIEffect uiEffect
|
||||
? uiEffect
|
||||
: effect is UIEffectReplica parentReplica
|
||||
? parentReplica.target
|
||||
: null;
|
||||
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
|
||||
var modifiers = InternalListPool<IMeshModifier>.Rent();
|
||||
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
|
||||
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
|
||||
{
|
||||
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
|
||||
s_VertexHelper.Clear();
|
||||
meshInfo.mesh.CopyTo(s_VertexHelper, meshInfo.vertexCount, meshInfo.vertexCount * 6 / 4);
|
||||
if (i == 0)
|
||||
{
|
||||
textMeshProUGUI.GetComponents(modifiers);
|
||||
foreach (var modifier in modifiers)
|
||||
{
|
||||
modifier.ModifyMesh(s_VertexHelper);
|
||||
}
|
||||
|
||||
s_VertexHelper.FillMesh(s_Mesh);
|
||||
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
|
||||
}
|
||||
else if (i - 1 < subMeshes.Count)
|
||||
{
|
||||
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
|
||||
if (!target || !subMeshUI) break;
|
||||
|
||||
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
|
||||
replica.target = target;
|
||||
|
||||
subMeshUI.GetComponents(modifiers);
|
||||
foreach (var modifier in modifiers)
|
||||
{
|
||||
modifier.ModifyMesh(s_VertexHelper);
|
||||
}
|
||||
|
||||
s_VertexHelper.FillMesh(s_Mesh);
|
||||
replica.ApplyContextToMaterial();
|
||||
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InternalListPool<IMeshModifier>.Return(ref modifiers);
|
||||
InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
|
||||
s_Mesh.Clear(false);
|
||||
}
|
||||
|
||||
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material, int start)
|
||||
{
|
||||
var count = subMeshes.Count;
|
||||
for (var j = 0; j < count; j++)
|
||||
{
|
||||
var s = subMeshes[(j + start + count) % count];
|
||||
if (s.sharedMaterial == material) return s;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void SetVerticesDirtyForTMP()
|
||||
{
|
||||
if (graphic && graphic.isActiveAndEnabled)
|
||||
{
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckSDFScaleForTMP()
|
||||
{
|
||||
var lossyScaleY = transform.lossyScale.y;
|
||||
if (Mathf.Approximately(_prevLossyScaleY, lossyScaleY)) return;
|
||||
|
||||
_prevLossyScaleY = lossyScaleY;
|
||||
if (graphic is TextMeshProUGUI textMeshProUGUI && graphic.isActiveAndEnabled)
|
||||
{
|
||||
OnTMPChanged(textMeshProUGUI);
|
||||
}
|
||||
}
|
||||
|
||||
private float _prevLossyScaleY;
|
||||
#endif
|
||||
|
||||
public abstract void SetRate(float rate, UIEffectTweener.CullingMask cullingMask);
|
||||
public abstract bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera);
|
||||
}
|
||||
|
||||
@@ -20,22 +20,39 @@ namespace Coffee.UIEffects
|
||||
private static readonly int s_ColorIntensity = Shader.PropertyToID("_ColorIntensity");
|
||||
private static readonly int s_ColorGlow = Shader.PropertyToID("_ColorGlow");
|
||||
private static readonly int s_SamplingIntensity = Shader.PropertyToID("_SamplingIntensity");
|
||||
private static readonly int s_SamplingWidth = Shader.PropertyToID("_SamplingWidth");
|
||||
private static readonly int s_SamplingScale = Shader.PropertyToID("_SamplingScale");
|
||||
private static readonly int s_TransitionRate = Shader.PropertyToID("_TransitionRate");
|
||||
private static readonly int s_TransitionReverse = Shader.PropertyToID("_TransitionReverse");
|
||||
private static readonly int s_TransitionTex = Shader.PropertyToID("_TransitionTex");
|
||||
private static readonly int s_TransitionTex_ST = Shader.PropertyToID("_TransitionTex_ST");
|
||||
private static readonly int s_TransitionTex_Speed = Shader.PropertyToID("_TransitionTex_Speed");
|
||||
private static readonly int s_TransitionWidth = Shader.PropertyToID("_TransitionWidth");
|
||||
private static readonly int s_TransitionSoftness = Shader.PropertyToID("_TransitionSoftness");
|
||||
private static readonly int s_TransitionRange = Shader.PropertyToID("_TransitionRange");
|
||||
private static readonly int s_TransitionColorFilter = Shader.PropertyToID("_TransitionColorFilter");
|
||||
private static readonly int s_TransitionColor = Shader.PropertyToID("_TransitionColor");
|
||||
private static readonly int s_TransitionColorGlow = Shader.PropertyToID("_TransitionColorGlow");
|
||||
private static readonly int s_TransitionPatternReverse = Shader.PropertyToID("_TransitionPatternReverse");
|
||||
private static readonly int s_TransitionAutoPlaySpeed = Shader.PropertyToID("_TransitionAutoPlaySpeed");
|
||||
private static readonly int s_TargetColor = Shader.PropertyToID("_TargetColor");
|
||||
private static readonly int s_TargetRange = Shader.PropertyToID("_TargetRange");
|
||||
private static readonly int s_TargetSoftness = Shader.PropertyToID("_TargetSoftness");
|
||||
private static readonly int s_ShadowColor = Shader.PropertyToID("_ShadowColor");
|
||||
private static readonly int s_ShadowBlurIntensity = Shader.PropertyToID("_ShadowBlurIntensity");
|
||||
private static readonly int s_ShadowColorGlow = Shader.PropertyToID("_ShadowColorGlow");
|
||||
private static readonly int s_EdgeWidth = Shader.PropertyToID("_EdgeWidth");
|
||||
private static readonly int s_EdgeColor = Shader.PropertyToID("_EdgeColor");
|
||||
private static readonly int s_EdgeColorGlow = Shader.PropertyToID("_EdgeColorGlow");
|
||||
private static readonly int s_EdgeShinyAutoPlaySpeed = Shader.PropertyToID("_EdgeShinyAutoPlaySpeed");
|
||||
private static readonly int s_EdgeShinyRate = Shader.PropertyToID("_EdgeShinyRate");
|
||||
private static readonly int s_EdgeShinyWidth = Shader.PropertyToID("_EdgeShinyWidth");
|
||||
private static readonly int s_PatternArea = Shader.PropertyToID("_PatternArea");
|
||||
private static readonly int s_DetailIntensity = Shader.PropertyToID("_DetailIntensity");
|
||||
private static readonly int s_DetailThreshold = Shader.PropertyToID("_DetailThreshold");
|
||||
private static readonly int s_DetailTex = Shader.PropertyToID("_DetailTex");
|
||||
private static readonly int s_DetailTex_ST = Shader.PropertyToID("_DetailTex_ST");
|
||||
private static readonly int s_DetailTex_Speed = Shader.PropertyToID("_DetailTex_Speed");
|
||||
|
||||
private static readonly string[] s_ToneKeywords =
|
||||
{
|
||||
@@ -81,7 +98,8 @@ namespace Coffee.UIEffects
|
||||
"TRANSITION_SHINY",
|
||||
"TRANSITION_MASK",
|
||||
"TRANSITION_MELT",
|
||||
"TRANSITION_BURN"
|
||||
"TRANSITION_BURN",
|
||||
"TRANSITION_PATTERN"
|
||||
};
|
||||
|
||||
private static readonly string[] s_TransitionColorKeywords =
|
||||
@@ -117,6 +135,36 @@ namespace Coffee.UIEffects
|
||||
"SHADOW_COLOR_CONTRAST"
|
||||
};
|
||||
|
||||
private static readonly string[] s_EdgeKeywords =
|
||||
{
|
||||
"",
|
||||
"EDGE_PLAIN",
|
||||
"EDGE_SHINY"
|
||||
};
|
||||
|
||||
private static readonly string[] s_EdgeColorKeywords =
|
||||
{
|
||||
"",
|
||||
"EDGE_COLOR_MULTIPLY",
|
||||
"EDGE_COLOR_ADDITIVE",
|
||||
"EDGE_COLOR_SUBTRACTIVE",
|
||||
"EDGE_COLOR_REPLACE",
|
||||
"EDGE_COLOR_MULTIPLY_LUMINANCE",
|
||||
"EDGE_COLOR_MULTIPLY_ADDITIVE",
|
||||
"EDGE_COLOR_HSV_MODIFIER",
|
||||
"EDGE_COLOR_CONTRAST"
|
||||
};
|
||||
|
||||
private static readonly string[] s_DetailKeywords =
|
||||
{
|
||||
"",
|
||||
"DETAIL_MASKING",
|
||||
"DETAIL_MULTIPLY",
|
||||
"DETAIL_ADDITIVE",
|
||||
"DETAIL_REPLACE",
|
||||
"DETAIL_MULTIPLY_ADDITIVE"
|
||||
};
|
||||
|
||||
private static readonly Vector2[][] s_ShadowVectors = new[]
|
||||
{
|
||||
Array.Empty<Vector2>(), // None
|
||||
@@ -142,6 +190,7 @@ namespace Coffee.UIEffects
|
||||
|
||||
public SamplingFilter samplingFilter = SamplingFilter.None;
|
||||
public float samplingIntensity = 0.5f;
|
||||
public float samplingWidth;
|
||||
|
||||
public TransitionFilter transitionFilter = TransitionFilter.None;
|
||||
public float transitionRate = 0.5f;
|
||||
@@ -149,13 +198,17 @@ namespace Coffee.UIEffects
|
||||
public Texture transitionTex;
|
||||
public Vector2 transitionTexScale = new Vector2(1, 1);
|
||||
public Vector2 transitionTexOffset = new Vector2(0, 0);
|
||||
public Vector2 transitionTexSpeed = new Vector2(0, 0);
|
||||
public float transitionRotation = 0;
|
||||
public bool transitionKeepAspectRatio = true;
|
||||
public float transitionWidth = 0.2f;
|
||||
public float transitionSoftness = 0.2f;
|
||||
public MinMax01 transitionRange = new MinMax01(0, 1);
|
||||
public ColorFilter transitionColorFilter = ColorFilter.MultiplyAdditive;
|
||||
public Color transitionColor = new Color(0f, 0.5f, 1.0f, 1.0f);
|
||||
public bool transitionColorGlow;
|
||||
public bool transitionPatternReverse;
|
||||
public float transitionAutoPlaySpeed;
|
||||
|
||||
public TargetMode targetMode = TargetMode.None;
|
||||
public Color targetColor = Color.white;
|
||||
@@ -175,22 +228,47 @@ namespace Coffee.UIEffects
|
||||
public Color shadowColor;
|
||||
public bool shadowColorGlow;
|
||||
|
||||
public EdgeMode edgeMode;
|
||||
public float edgeShinyRate;
|
||||
public float edgeWidth;
|
||||
public ColorFilter edgeColorFilter;
|
||||
public Color edgeColor;
|
||||
public bool edgeColorGlow;
|
||||
public float edgeShinyWidth;
|
||||
public float edgeShinyAutoPlaySpeed;
|
||||
public PatternArea patternArea;
|
||||
|
||||
public GradationMode gradationMode;
|
||||
public Color gradationColor1;
|
||||
public Color gradationColor2;
|
||||
public Color gradationColor3;
|
||||
public Color gradationColor4;
|
||||
public Gradient gradationGradient;
|
||||
public float gradationOffset;
|
||||
public float gradationScale;
|
||||
public float gradationRotation;
|
||||
private List<float> _keyTimes;
|
||||
|
||||
public bool willModifyMaterial => samplingFilter != SamplingFilter.None
|
||||
|| transitionFilter != TransitionFilter.None
|
||||
|| toneFilter != ToneFilter.None
|
||||
public DetailFilter detailFilter;
|
||||
public float detailIntensity;
|
||||
public MinMax01 detailThreshold;
|
||||
public Texture detailTex;
|
||||
public Vector2 detailTexScale = new Vector2(1, 1);
|
||||
public Vector2 detailTexOffset = new Vector2(0, 0);
|
||||
public Vector2 detailTexSpeed = new Vector2(0, 0);
|
||||
|
||||
public bool willModifyMaterial => toneFilter != ToneFilter.None
|
||||
|| colorFilter != ColorFilter.None
|
||||
|| samplingFilter != SamplingFilter.None
|
||||
|| transitionFilter != TransitionFilter.None
|
||||
|| srcBlendMode != BlendMode.One
|
||||
|| dstBlendMode != BlendMode.OneMinusSrcAlpha
|
||||
|| shadowMode != ShadowMode.None;
|
||||
|| shadowMode != ShadowMode.None
|
||||
|| edgeMode != EdgeMode.None
|
||||
|| detailFilter != DetailFilter.None;
|
||||
|
||||
public bool willModifyVertex => willModifyMaterial
|
||||
|| gradationMode != GradationMode.None;
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
@@ -211,6 +289,7 @@ namespace Coffee.UIEffects
|
||||
|
||||
samplingFilter = preset.samplingFilter;
|
||||
samplingIntensity = preset.samplingIntensity;
|
||||
samplingWidth = preset.samplingWidth;
|
||||
|
||||
transitionFilter = preset.transitionFilter;
|
||||
transitionRate = preset.transitionRate;
|
||||
@@ -218,13 +297,17 @@ namespace Coffee.UIEffects
|
||||
transitionTex = preset.transitionTex;
|
||||
transitionTexScale = preset.transitionTexScale;
|
||||
transitionTexOffset = preset.transitionTexOffset;
|
||||
transitionTexSpeed = preset.transitionTexSpeed;
|
||||
transitionKeepAspectRatio = preset.transitionKeepAspectRatio;
|
||||
transitionRotation = preset.transitionRotation;
|
||||
transitionWidth = preset.transitionWidth;
|
||||
transitionSoftness = preset.transitionSoftness;
|
||||
transitionRange = preset.transitionRange;
|
||||
transitionColor = preset.transitionColor;
|
||||
transitionColorFilter = preset.transitionColorFilter;
|
||||
transitionColorGlow = preset.transitionColorGlow;
|
||||
transitionPatternReverse = preset.transitionPatternReverse;
|
||||
transitionAutoPlaySpeed = preset.transitionAutoPlaySpeed;
|
||||
|
||||
targetMode = preset.targetMode;
|
||||
targetColor = preset.targetColor;
|
||||
@@ -244,13 +327,33 @@ namespace Coffee.UIEffects
|
||||
shadowColor = preset.shadowColor;
|
||||
shadowColorGlow = preset.shadowColorGlow;
|
||||
|
||||
edgeMode = preset.edgeMode;
|
||||
edgeShinyRate = preset.edgeShinyRate;
|
||||
edgeWidth = preset.edgeWidth;
|
||||
edgeColorFilter = preset.edgeColorFilter;
|
||||
edgeColor = preset.edgeColor;
|
||||
edgeColorGlow = preset.edgeColorGlow;
|
||||
edgeShinyAutoPlaySpeed = preset.edgeShinyAutoPlaySpeed;
|
||||
edgeShinyWidth = preset.edgeShinyWidth;
|
||||
patternArea = preset.patternArea;
|
||||
|
||||
gradationMode = preset.gradationMode;
|
||||
gradationColor1 = preset.gradationColor1;
|
||||
gradationColor2 = preset.gradationColor2;
|
||||
gradationColor3 = preset.gradationColor3;
|
||||
gradationColor4 = preset.gradationColor4;
|
||||
gradationGradient = preset.gradationGradient;
|
||||
gradationOffset = preset.gradationOffset;
|
||||
gradationScale = preset.gradationScale;
|
||||
gradationRotation = preset.gradationRotation;
|
||||
|
||||
detailFilter = preset.detailFilter;
|
||||
detailIntensity = preset.detailIntensity;
|
||||
detailThreshold = preset.detailThreshold;
|
||||
detailTex = preset.detailTex;
|
||||
detailTexScale = preset.detailTexScale;
|
||||
detailTexOffset = preset.detailTexOffset;
|
||||
detailTexSpeed = preset.detailTexSpeed;
|
||||
}
|
||||
|
||||
public void SetGradationDirty()
|
||||
@@ -275,19 +378,24 @@ namespace Coffee.UIEffects
|
||||
material.SetInt(s_ColorGlow, colorGlow ? 1 : 0);
|
||||
|
||||
material.SetFloat(s_SamplingIntensity, Mathf.Clamp01(samplingIntensity));
|
||||
material.SetFloat(s_SamplingWidth, samplingWidth);
|
||||
material.SetFloat(s_SamplingScale, actualSamplingScale);
|
||||
|
||||
material.SetFloat(s_TransitionRate, Mathf.Clamp01(transitionRate));
|
||||
material.SetInt(s_TransitionReverse, transitionReverse ? 1 : 0);
|
||||
material.SetTexture(s_TransitionTex, transitionTex);
|
||||
material.SetTexture(s_TransitionTex, transitionFilter != 0 ? transitionTex : null);
|
||||
material.SetVector(s_TransitionTex_ST,
|
||||
new Vector4(transitionTexScale.x, transitionTexScale.y,
|
||||
transitionTexOffset.x, transitionTexOffset.y));
|
||||
material.SetVector(s_TransitionTex_Speed, transitionTexSpeed);
|
||||
material.SetFloat(s_TransitionWidth, Mathf.Clamp01(transitionWidth));
|
||||
material.SetFloat(s_TransitionSoftness, Mathf.Clamp01(transitionSoftness));
|
||||
material.SetVector(s_TransitionRange, new Vector2(transitionRange.min, transitionRange.max));
|
||||
material.SetInt(s_TransitionColorFilter, (int)transitionColorFilter);
|
||||
material.SetColor(s_TransitionColor, transitionColor);
|
||||
material.SetInt(s_TransitionColorGlow, transitionColorGlow ? 1 : 0);
|
||||
material.SetInt(s_TransitionPatternReverse, transitionPatternReverse ? 1 : 0);
|
||||
material.SetFloat(s_TransitionAutoPlaySpeed, transitionAutoPlaySpeed);
|
||||
|
||||
material.SetColor(s_TargetColor, targetColor);
|
||||
material.SetFloat(s_TargetRange, Mathf.Clamp01(targetRange));
|
||||
@@ -308,6 +416,22 @@ namespace Coffee.UIEffects
|
||||
material.SetColor(s_ShadowColor, shadowColor);
|
||||
material.SetInt(s_ShadowColorGlow, shadowColorGlow ? 1 : 0);
|
||||
|
||||
material.SetFloat(s_EdgeWidth, Mathf.Clamp01(edgeWidth));
|
||||
material.SetColor(s_EdgeColor, edgeColor);
|
||||
material.SetInt(s_EdgeColorGlow, edgeColorGlow ? 1 : 0);
|
||||
material.SetFloat(s_EdgeShinyRate, Mathf.Clamp01(edgeShinyRate));
|
||||
material.SetFloat(s_EdgeShinyWidth, Mathf.Clamp01(edgeShinyWidth));
|
||||
material.SetFloat(s_EdgeShinyAutoPlaySpeed, edgeShinyAutoPlaySpeed);
|
||||
material.SetInt(s_PatternArea, edgeMode != EdgeMode.None ? (int)patternArea : 0);
|
||||
|
||||
material.SetFloat(s_DetailIntensity, Mathf.Clamp01(detailIntensity));
|
||||
material.SetVector(s_DetailThreshold, new Vector2(detailThreshold.min, detailThreshold.max));
|
||||
material.SetTexture(s_DetailTex, detailFilter != 0 ? detailTex : null);
|
||||
material.SetVector(s_DetailTex_ST,
|
||||
new Vector4(detailTexScale.x, detailTexScale.y,
|
||||
detailTexOffset.x, detailTexOffset.y));
|
||||
material.SetVector(s_DetailTex_Speed, detailTexSpeed);
|
||||
|
||||
SetKeyword(material, s_ToneKeywords, (int)toneFilter);
|
||||
SetKeyword(material, s_ColorKeywords, (int)colorFilter);
|
||||
SetKeyword(material, s_SamplingKeywords, (int)samplingFilter);
|
||||
@@ -319,11 +443,7 @@ namespace Coffee.UIEffects
|
||||
case TransitionFilter.Cutoff:
|
||||
SetKeyword(material, s_TransitionColorKeywords, (int)ColorFilter.None);
|
||||
break;
|
||||
case TransitionFilter.Dissolve:
|
||||
case TransitionFilter.Shiny:
|
||||
case TransitionFilter.Mask:
|
||||
case TransitionFilter.Melt:
|
||||
case TransitionFilter.Burn:
|
||||
default:
|
||||
SetKeyword(material, s_TransitionColorKeywords, (int)transitionColorFilter);
|
||||
break;
|
||||
}
|
||||
@@ -338,11 +458,34 @@ namespace Coffee.UIEffects
|
||||
break;
|
||||
}
|
||||
|
||||
SetKeyword(material, s_EdgeKeywords, (int)edgeMode);
|
||||
|
||||
switch (edgeMode)
|
||||
{
|
||||
case EdgeMode.None:
|
||||
SetKeyword(material, s_EdgeColorKeywords, (int)ColorFilter.None);
|
||||
break;
|
||||
default:
|
||||
SetKeyword(material, s_EdgeColorKeywords, (int)edgeColorFilter);
|
||||
break;
|
||||
}
|
||||
|
||||
SetKeyword(material, s_DetailKeywords, (int)detailFilter);
|
||||
|
||||
SetKeyword(material, s_TargetKeywords, (int)targetMode);
|
||||
|
||||
Profiler.EndSample();
|
||||
}
|
||||
|
||||
public void SetEnablePreview(bool enable, Material material)
|
||||
{
|
||||
if (!material) return;
|
||||
material.SetVector(s_TransitionTex_Speed, enable ? (Vector4)transitionTexSpeed : Vector4.zero);
|
||||
material.SetVector(s_DetailTex_Speed, enable ? (Vector4)detailTexSpeed : Vector4.zero);
|
||||
material.SetFloat(s_TransitionAutoPlaySpeed, enable ? transitionAutoPlaySpeed : 0);
|
||||
material.SetFloat(s_EdgeShinyAutoPlaySpeed, enable ? edgeShinyAutoPlaySpeed : 0);
|
||||
}
|
||||
|
||||
private static void SetKeyword(Material material, string[] keywords, int index)
|
||||
{
|
||||
for (var i = 0; i < keywords.Length; i++)
|
||||
@@ -358,15 +501,21 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh, bool canModifyShape)
|
||||
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh,
|
||||
bool canModifyShape, Flip flip)
|
||||
{
|
||||
var processor = ContextProcessor.FindProcessor(graphic);
|
||||
var isText = processor.IsText(graphic);
|
||||
processor.OnPreModifyMesh(graphic);
|
||||
// Apply flip (without effect).
|
||||
ApplyFlipWithoutEffect(vh, flip);
|
||||
|
||||
var count = vh.currentIndexCount;
|
||||
if (!willModifyVertex || count == 0) return;
|
||||
|
||||
var effectProxy = GraphicProxy.Find(graphic);
|
||||
var isText = effectProxy.IsText(graphic);
|
||||
effectProxy.OnPreModifyMesh(graphic);
|
||||
|
||||
var verts = s_WorkingVertices;
|
||||
var expandSize = GetExpandSize(canModifyShape);
|
||||
var count = vh.currentIndexCount;
|
||||
var expandSize = effectProxy.ModifyExpandSize(graphic, GetExpandSize(canModifyShape));
|
||||
|
||||
// Get the rectangle to calculate the normalized position.
|
||||
vh.GetUIVertexStream(verts);
|
||||
@@ -380,8 +529,12 @@ namespace Coffee.UIEffects
|
||||
if (transitionRoot)
|
||||
{
|
||||
rect = transitionRoot.rect;
|
||||
rectMatrix = transitionRoot.worldToLocalMatrix
|
||||
* graphic.transform.localToWorldMatrix;
|
||||
if (transitionRoot != graphic.transform)
|
||||
{
|
||||
rectMatrix = transitionRoot.worldToLocalMatrix
|
||||
* graphic.transform.localToWorldMatrix;
|
||||
}
|
||||
|
||||
rot *= Matrix4x4.Scale(new Vector3(1 / multiplier, 1 / multiplier, 1))
|
||||
* rectMatrix;
|
||||
}
|
||||
@@ -391,10 +544,15 @@ namespace Coffee.UIEffects
|
||||
rot *= Matrix4x4.Scale(new Vector3(multiplier, multiplier, 1));
|
||||
}
|
||||
|
||||
if (transitionKeepAspectRatio && transitionTex)
|
||||
var normalizeTex = transitionTex
|
||||
? transitionTex
|
||||
: detailTex
|
||||
? detailTex
|
||||
: null;
|
||||
if (transitionKeepAspectRatio && normalizeTex)
|
||||
{
|
||||
var center = rect.center;
|
||||
var aspectRatio = (float)transitionTex.width / transitionTex.height;
|
||||
var aspectRatio = (float)normalizeTex.width / normalizeTex.height;
|
||||
if (rect.width < rect.height)
|
||||
{
|
||||
rect.width = rect.height * aspectRatio;
|
||||
@@ -424,8 +582,11 @@ namespace Coffee.UIEffects
|
||||
// Apply gradation.
|
||||
ApplyGradation(verts, transitionRoot.rect, rectMatrix, canModifyShape);
|
||||
|
||||
// Apply flip (with effect).
|
||||
ApplyFlipWithEffect(verts, flip);
|
||||
|
||||
// Apply shadow.
|
||||
ApplyShadow(transitionRoot, verts);
|
||||
ApplyShadow(verts, transitionRoot, flip);
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(verts);
|
||||
@@ -449,6 +610,9 @@ namespace Coffee.UIEffects
|
||||
case GradationMode.Vertical:
|
||||
GradientUtil.DoVerticalGradient(verts, a, b, offset, scale, rect, m);
|
||||
break;
|
||||
case GradationMode.Diagonal:
|
||||
GradientUtil.DoDiagonal(verts, a, b, gradationColor3, gradationColor4, offset, scale, rect, m);
|
||||
break;
|
||||
case GradationMode.DiagonalToRightBottom:
|
||||
GradientUtil.DoDiagonalGradientToRightBottom(verts, a, b, offset, scale, rect, m);
|
||||
break;
|
||||
@@ -537,54 +701,84 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyShadow(RectTransform transitionRoot, List<UIVertex> verts)
|
||||
private void ApplyShadow(List<UIVertex> verts, RectTransform transitionRoot, Flip flip)
|
||||
{
|
||||
var distance = shadowDistance;
|
||||
if (distance == Vector2.zero) return;
|
||||
|
||||
if ((flip & Flip.Shadow) != 0)
|
||||
{
|
||||
distance.x = (flip & Flip.Horizontal) != 0 ? -distance.x : distance.x;
|
||||
distance.y = (flip & Flip.Vertical) != 0 ? -distance.y : distance.y;
|
||||
}
|
||||
|
||||
switch (shadowMode)
|
||||
{
|
||||
case ShadowMode.Shadow:
|
||||
case ShadowMode.Shadow3:
|
||||
case ShadowMode.Outline:
|
||||
case ShadowMode.Outline8:
|
||||
ShadowUtil.DoShadow(verts, s_ShadowVectors[(int)shadowMode], shadowDistance, shadowIteration,
|
||||
ShadowUtil.DoShadow(verts, s_ShadowVectors[(int)shadowMode], distance, shadowIteration,
|
||||
shadowFade);
|
||||
break;
|
||||
case ShadowMode.Mirror:
|
||||
ShadowUtil.DoMirror(verts, shadowDistance, shadowMirrorScale, shadowFade, transitionRoot);
|
||||
ShadowUtil.DoMirror(verts, distance, shadowMirrorScale, shadowFade, transitionRoot);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 GetExpandSize(bool canModifyShape)
|
||||
private static void ApplyFlipWithoutEffect(VertexHelper vh, Flip flip)
|
||||
{
|
||||
if (!canModifyShape) return Vector2.zero;
|
||||
if ((flip & Flip.Effect) != 0) return;
|
||||
|
||||
var expandSize = Vector2.zero;
|
||||
var flipHorizontal = 0 != (flip & Flip.Horizontal);
|
||||
var flipVertical = 0 != (flip & Flip.Vertical);
|
||||
if (!flipHorizontal && !flipVertical) return;
|
||||
|
||||
UIVertexUtil.Flip(vh, flipHorizontal, flipVertical);
|
||||
}
|
||||
|
||||
private static void ApplyFlipWithEffect(List<UIVertex> verts, Flip flip)
|
||||
{
|
||||
if ((flip & Flip.Effect) == 0) return;
|
||||
|
||||
var flipHorizontal = 0 != (flip & Flip.Horizontal);
|
||||
var flipVertical = 0 != (flip & Flip.Vertical);
|
||||
if (!flipHorizontal && !flipVertical) return;
|
||||
|
||||
UIVertexUtil.Flip(verts, flipHorizontal, flipVertical);
|
||||
}
|
||||
|
||||
private Vector4 GetExpandSize(bool canModifyShape)
|
||||
{
|
||||
if (!canModifyShape) return Vector4.zero;
|
||||
|
||||
var expandSize = Vector4.zero;
|
||||
switch (samplingFilter)
|
||||
{
|
||||
case SamplingFilter.BlurFast:
|
||||
expandSize.x += 10;
|
||||
expandSize.y += 10;
|
||||
expandSize += Vector4.one * 10;
|
||||
break;
|
||||
case SamplingFilter.BlurMedium:
|
||||
expandSize.x += 15;
|
||||
expandSize.y += 15;
|
||||
expandSize += Vector4.one * 15;
|
||||
break;
|
||||
case SamplingFilter.BlurDetail:
|
||||
expandSize.x += 20;
|
||||
expandSize.y += 20;
|
||||
expandSize += Vector4.one * 20;
|
||||
break;
|
||||
case SamplingFilter.RgbShift:
|
||||
expandSize.x += 40;
|
||||
expandSize.y += 40;
|
||||
expandSize.z += 40;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (transitionFilter)
|
||||
{
|
||||
case TransitionFilter.Melt:
|
||||
case TransitionFilter.Burn:
|
||||
expandSize.y += 40;
|
||||
break;
|
||||
case TransitionFilter.Burn:
|
||||
expandSize.w += 40;
|
||||
break;
|
||||
}
|
||||
|
||||
return expandSize;
|
||||
|
||||
@@ -72,62 +72,117 @@ namespace Coffee.UIEffects
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
#if UNITY_EDITOR
|
||||
SetupSamplesForShaderVariantRegistry();
|
||||
m_ShaderVariantRegistry.ClearCache();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private const string k_PresetDir = "UIEffectPresets";
|
||||
private const string k_PresetSaveDir = "Assets/ProjectSettings/" + k_PresetDir;
|
||||
private const string k_PresetPathPattern = "/" + k_PresetDir + "/(.*).prefab$";
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
private static void InitializeOnLoadMethod()
|
||||
{
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
const string tmpSupport = "TextMeshPro Support (Unity 6)";
|
||||
const string version = "v5.6.0 (Unity 6)";
|
||||
#else
|
||||
const string tmpSupport = "TextMeshPro Support";
|
||||
const string version = "v5.6.0";
|
||||
#endif
|
||||
ShaderSampleImporter.RegisterShaderSamples(new[]
|
||||
{
|
||||
// TextMeshPro Support/TextMeshPro Support (Unity 6)
|
||||
("Hidden/TextMeshPro/Distance Field SSD (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Distance Field Overlay (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Bitmap (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Distance Field (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version)
|
||||
});
|
||||
ShaderSampleImporter.RegisterShaderAliases(new[]
|
||||
{
|
||||
("Hidden/Hidden/TextMeshPro/Distance Field SSD (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field SSD (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field SSD (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Distance Field Overlay (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field Overlay (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field Overlay (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Bitmap (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Bitmap (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Mobile/Bitmap (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Distance Field (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field (UIEffect)"),
|
||||
("Hidden/Hidden/TextMeshPro/Mobile/Distance Field (SoftMaskable) (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)")
|
||||
});
|
||||
ShaderSampleImporter.RegisterDeprecatedShaders(new[]
|
||||
{
|
||||
// Old shaders.
|
||||
("367310b4ca95c4b00a2215568f1af735", "Hidden-TMP_Bitmap-Mobile-UIEffect-Unity6.shader"),
|
||||
("490fe6c46146140cca8766a31c9dfc0c", "Hidden-TMP_Bitmap-UIEffect-Unity6.shader"),
|
||||
("b875fa74fa43a4c48a44634d5f3e6d3d", "Hidden-TMP_SDF-Mobile-UIEffect-Unity6.shader"),
|
||||
("c67f821adbb6348a3a21573a25b55de0", "Hidden-TMP_SDF-UIEffect-Unity6.shader")
|
||||
});
|
||||
EditorApplication.update += ShaderSampleImporter.Update;
|
||||
|
||||
CgincPathSync.RegisterShaders("/(TMPro|TMPro_Properties).cginc", new[]
|
||||
{
|
||||
"Hidden/TextMeshPro/Distance Field (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field SSD (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field SSD (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field Overlay (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field Overlay (UIEffect)",
|
||||
"Hidden/TextMeshPro/Bitmap (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)",
|
||||
"Hidden/TextMeshPro/Distance Field (UIEffect)",
|
||||
"Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)"
|
||||
});
|
||||
|
||||
Selection.selectionChanged += () =>
|
||||
{
|
||||
if (Application.isPlaying || Misc.isBatchOrBuilding) return;
|
||||
|
||||
var selection = Selection.gameObjects;
|
||||
foreach (var c in FindAll())
|
||||
{
|
||||
if (!c || !c.isActiveAndEnabled) continue;
|
||||
c.SetEnablePreviewIfSelected(selection);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<UIEffectBase> FindAll()
|
||||
{
|
||||
return Misc.FindObjectsOfType<UIEffectBase>()
|
||||
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>());
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_ShaderVariantRegistry.onShaderRequested = ShaderSampleImporter.ImportShaderIfSelected;
|
||||
m_ShaderVariantRegistry.ClearCache();
|
||||
}
|
||||
|
||||
protected override void OnCreateAsset()
|
||||
{
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this);
|
||||
m_ShaderVariantRegistry.RegisterOptionalShaders(this);
|
||||
}
|
||||
|
||||
protected override void OnInitialize()
|
||||
{
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this);
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this, "(UIEffect)");
|
||||
}
|
||||
|
||||
private void SetupSamplesForShaderVariantRegistry()
|
||||
{
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
const string tmpSupport = "TextMeshPro Support (Unity 6)";
|
||||
#else
|
||||
const string tmpSupport = "TextMeshPro Support";
|
||||
#endif
|
||||
m_ShaderVariantRegistry.RegisterSamples(new[]
|
||||
{
|
||||
("Hidden/TextMeshPro/Bitmap (UIEffect)", tmpSupport),
|
||||
("Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)", tmpSupport),
|
||||
("Hidden/TextMeshPro/Distance Field (UIEffect)", tmpSupport),
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport)
|
||||
});
|
||||
}
|
||||
|
||||
private void Refresh()
|
||||
{
|
||||
m_ShaderVariantRegistry.ClearCache();
|
||||
MaterialRepository.Clear();
|
||||
foreach (var c in Misc.FindObjectsOfType<UIEffectBase>()
|
||||
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>()))
|
||||
{
|
||||
c.SetMaterialDirty();
|
||||
}
|
||||
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
m_ShaderVariantRegistry.InitializeIfNeeded(this);
|
||||
m_ShaderVariantRegistry.RegisterOptionalShaders(this);
|
||||
}
|
||||
|
||||
internal static UIEffect[] LoadEditorPresets()
|
||||
@@ -135,6 +190,7 @@ namespace Coffee.UIEffects
|
||||
var dirs = AssetDatabase.FindAssets(k_PresetDir + " t:folder")
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
.Where(x => Path.GetFileName(x) == k_PresetDir)
|
||||
.OrderBy(x => x.StartsWith("Packages/com.coffee.ui-effect/"))
|
||||
.ToArray();
|
||||
return AssetDatabase.FindAssets("t:prefab", dirs)
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
@@ -170,20 +226,48 @@ namespace Coffee.UIEffects
|
||||
return new PreloadedProjectSettingsProvider("Project/UI/UI Effect");
|
||||
}
|
||||
|
||||
internal static string GetPresetPath(UIEffect preset)
|
||||
internal static (string path, bool builtin) GetPresetPath(UIEffect preset)
|
||||
{
|
||||
var assetPath = AssetDatabase.GetAssetPath(preset);
|
||||
var builtin = assetPath.StartsWith("Packages/com.coffee.ui-effect/");
|
||||
var m = Regex.Match(assetPath, k_PresetPathPattern);
|
||||
return m.Success ? m.Groups[1].Value : Path.GetFileNameWithoutExtension(assetPath);
|
||||
return (m.Success ? m.Groups[1].Value : Path.GetFileNameWithoutExtension(assetPath), builtin);
|
||||
}
|
||||
|
||||
private class Postprocessor : AssetPostprocessor
|
||||
{
|
||||
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
|
||||
private static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] ___, string[] ____)
|
||||
{
|
||||
if (Misc.isBatchOrBuilding) return;
|
||||
|
||||
instance.Refresh();
|
||||
// Register optional shaders when shaders are imported.
|
||||
if (imported.Concat(deleted).Any(path => path.EndsWith(".shader")))
|
||||
{
|
||||
MaterialRepository.Clear();
|
||||
|
||||
// Refresh
|
||||
if (hasInstance)
|
||||
{
|
||||
shaderRegistry.ClearCache();
|
||||
shaderRegistry.RegisterOptionalShaders(instance);
|
||||
}
|
||||
|
||||
// Refresh all UIEffect instances.
|
||||
foreach (var c in FindAll())
|
||||
{
|
||||
c.ReleaseMaterial();
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh all UIEffect instances.
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
foreach (var c in FindAll())
|
||||
{
|
||||
c.SetMaterialDirty();
|
||||
c.SetVerticesDirty();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@ using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
||||
public class UIEffectReplica : UIEffectBase
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
@@ -15,8 +16,13 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
protected bool m_AllowToModifyMeshShape = true;
|
||||
|
||||
[SerializeField]
|
||||
protected RectTransform m_CustomRoot = null;
|
||||
|
||||
[SerializeField]
|
||||
protected Flip m_Flip = 0;
|
||||
|
||||
private UIEffect _currentTarget;
|
||||
private Matrix4x4 _prevTransformHash;
|
||||
|
||||
public UIEffect target
|
||||
{
|
||||
@@ -42,6 +48,17 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public RectTransform customRoot
|
||||
{
|
||||
get => m_CustomRoot;
|
||||
set
|
||||
{
|
||||
if (m_CustomRoot == value) return;
|
||||
m_CustomRoot = value;
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public float samplingScale
|
||||
{
|
||||
get => m_SamplingScale;
|
||||
@@ -54,38 +71,83 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public bool allowToModifyMeshShape
|
||||
{
|
||||
get => m_AllowToModifyMeshShape;
|
||||
set
|
||||
{
|
||||
if (m_AllowToModifyMeshShape == value) return;
|
||||
m_AllowToModifyMeshShape = value;
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public override Flip flip
|
||||
{
|
||||
get => m_Flip;
|
||||
set
|
||||
{
|
||||
if (m_Flip == value) return;
|
||||
m_Flip = value;
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
|
||||
|
||||
public override bool canModifyShape => m_AllowToModifyMeshShape;
|
||||
|
||||
public override uint effectId => target ? target.effectId : 0;
|
||||
public override UIEffectContext context => target && target.isActiveAndEnabled ? target.context : null;
|
||||
|
||||
public override RectTransform transitionRoot => useTargetTransform && target
|
||||
public override UIEffectContext context
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!target) return null;
|
||||
if (!isTargetInScene) return base.context;
|
||||
|
||||
return target.isActiveAndEnabled ? target.context : null;
|
||||
}
|
||||
}
|
||||
|
||||
public override RectTransform transitionRoot => useTargetTransform && isTargetInScene
|
||||
? target.transitionRoot
|
||||
: transform as RectTransform;
|
||||
: m_CustomRoot
|
||||
? m_CustomRoot
|
||||
: transform as RectTransform;
|
||||
|
||||
private bool isTargetInScene => target && target.gameObject.scene.IsValid();
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
RefreshTarget(target);
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild += SetVerticesDirtyIfTransformChanged;
|
||||
CheckTransform();
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
RefreshTarget(null);
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild -= SetVerticesDirtyIfTransformChanged;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
_currentTarget = null;
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnValidate()
|
||||
{
|
||||
RefreshTarget(target);
|
||||
base.OnValidate();
|
||||
}
|
||||
|
||||
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
|
||||
{
|
||||
if (!isTargetInScene) return;
|
||||
target.SetEnablePreviewIfSelected(selection);
|
||||
}
|
||||
#endif
|
||||
|
||||
private void RefreshTarget(UIEffect newTarget)
|
||||
@@ -96,22 +158,44 @@ namespace Coffee.UIEffects
|
||||
_currentTarget.replicas.Remove(this);
|
||||
}
|
||||
|
||||
_currentTarget = newTarget;
|
||||
if (_currentTarget)
|
||||
if (newTarget)
|
||||
{
|
||||
_currentTarget.replicas.Add(this);
|
||||
_currentTarget = newTarget;
|
||||
if (isTargetInScene)
|
||||
{
|
||||
_currentTarget.replicas.Add(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_currentTarget = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateContext(UIEffectContext c)
|
||||
protected override void OnBeforeCanvasRebuild()
|
||||
{
|
||||
base.OnBeforeCanvasRebuild();
|
||||
|
||||
if (useTargetTransform && isTargetInScene && CheckTransformChangedWith(target.transform))
|
||||
{
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ApplyContextToMaterial()
|
||||
internal override void UpdateContext(UIEffectContext c)
|
||||
{
|
||||
if (!isActiveAndEnabled || !target || !target.isActiveAndEnabled) return;
|
||||
if (target && !isTargetInScene)
|
||||
{
|
||||
target.UpdateContext(c);
|
||||
}
|
||||
}
|
||||
|
||||
base.ApplyContextToMaterial();
|
||||
public override void ApplyContextToMaterial(Material material)
|
||||
{
|
||||
if (!isActiveAndEnabled || !target) return;
|
||||
if (isTargetInScene && !target.isActiveAndEnabled) return;
|
||||
|
||||
base.ApplyContextToMaterial(material);
|
||||
}
|
||||
|
||||
public override void SetRate(float rate, UIEffectTweener.CullingMask mask)
|
||||
@@ -120,23 +204,9 @@ namespace Coffee.UIEffects
|
||||
|
||||
public override bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
|
||||
{
|
||||
return !target || target.IsRaycastLocationValid(sp, eventCamera);
|
||||
}
|
||||
if (!isActiveAndEnabled || !isTargetInScene) return true;
|
||||
|
||||
private bool CheckTransform()
|
||||
{
|
||||
return useTargetTransform
|
||||
&& target
|
||||
&& transform.HasChanged(target.transform, ref _prevTransformHash,
|
||||
UIEffectProjectSettings.transformSensitivity);
|
||||
}
|
||||
|
||||
private void SetVerticesDirtyIfTransformChanged()
|
||||
{
|
||||
if (CheckTransform())
|
||||
{
|
||||
SetVerticesDirty();
|
||||
}
|
||||
return target.IsRaycastLocationValid(sp, eventCamera);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
using System;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
||||
[ExecuteAlways]
|
||||
[RequireComponent(typeof(UIEffectBase))]
|
||||
public class UIEffectTweener : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
public class TweenerEvent : UnityEvent<float>
|
||||
{
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum CullingMask
|
||||
{
|
||||
@@ -17,7 +24,9 @@ namespace Coffee.UIEffects
|
||||
Sampling = 1 << 2,
|
||||
Transition = 1 << 3,
|
||||
GradiationOffset = 1 << 5,
|
||||
GradiationRotation = 1 << 6
|
||||
GradiationRotation = 1 << 6,
|
||||
EdgeShiny = 1 << 8,
|
||||
Event = 1 << 31
|
||||
}
|
||||
|
||||
public enum UpdateMode
|
||||
@@ -51,7 +60,9 @@ namespace Coffee.UIEffects
|
||||
|
||||
[Tooltip("The culling mask of the tween.")]
|
||||
[SerializeField]
|
||||
private CullingMask m_CullingMask = (CullingMask)(-1);
|
||||
private CullingMask m_CullingMask = CullingMask.Tone | CullingMask.Color | CullingMask.Sampling |
|
||||
CullingMask.Transition | CullingMask.GradiationOffset |
|
||||
CullingMask.GradiationRotation | CullingMask.EdgeShiny;
|
||||
|
||||
[Tooltip("The direction of the tween.")]
|
||||
[SerializeField]
|
||||
@@ -61,6 +72,13 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
private AnimationCurve m_Curve = AnimationCurve.Linear(0, 0, 1, 1);
|
||||
|
||||
[SerializeField]
|
||||
private bool m_SeparateReverseCurve;
|
||||
|
||||
[Tooltip("The curve to tween the properties.")]
|
||||
[SerializeField]
|
||||
private AnimationCurve m_ReverseCurve = AnimationCurve.Linear(0, 0, 1, 1);
|
||||
|
||||
[Tooltip("The delay in seconds before the tween starts.")]
|
||||
[SerializeField]
|
||||
[Range(0f, 10)]
|
||||
@@ -81,6 +99,10 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
private PlayOnEnable m_PlayOnEnable = PlayOnEnable.Forward;
|
||||
|
||||
[Tooltip("Reset the tweening time when the component is enabled.")]
|
||||
[SerializeField]
|
||||
private bool m_ResetTimeOnEnable = true;
|
||||
|
||||
[Tooltip("The wrap mode of the tween.\n" +
|
||||
" Once: Clamp the tween value (not loop).\n" +
|
||||
" Loop: Loop the tween value.\n" +
|
||||
@@ -100,6 +122,10 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
private UnityEvent m_OnComplete = new UnityEvent();
|
||||
|
||||
[Tooltip("Event to invoke when the rate was changed.")]
|
||||
[SerializeField]
|
||||
private TweenerEvent m_OnChangedRate = new TweenerEvent();
|
||||
|
||||
private bool _isPaused;
|
||||
private float _rate = -1;
|
||||
private float _time;
|
||||
@@ -142,8 +168,38 @@ namespace Coffee.UIEffects
|
||||
_rate = value;
|
||||
|
||||
if (!target || cullingMask == 0) return;
|
||||
var evaluatedRate = m_Curve.Evaluate(_rate);
|
||||
|
||||
var currentCurve = curve;
|
||||
if (separateReverseCurve)
|
||||
{
|
||||
switch (wrapMode)
|
||||
{
|
||||
case WrapMode.Once:
|
||||
case WrapMode.Loop:
|
||||
if (direction == Direction.Reverse)
|
||||
{
|
||||
currentCurve = reverseCurve;
|
||||
}
|
||||
|
||||
break;
|
||||
case WrapMode.PingPongOnce:
|
||||
case WrapMode.PingPongLoop:
|
||||
if (delay + duration + interval <= _time)
|
||||
{
|
||||
currentCurve = reverseCurve;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var evaluatedRate = currentCurve.Evaluate(_rate);
|
||||
target.SetRate(evaluatedRate, cullingMask);
|
||||
|
||||
if (0 != (cullingMask & CullingMask.Event))
|
||||
{
|
||||
onChangedRate.Invoke(evaluatedRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,11 +276,13 @@ namespace Coffee.UIEffects
|
||||
set => m_PlayOnEnable = value;
|
||||
}
|
||||
|
||||
[Obsolete("UIEffectTweener.restartOnEnable has been deprecated. Use UIEffectTweener.playOnEnable instead")]
|
||||
public bool restartOnEnable
|
||||
/// <summary>
|
||||
/// Reset the tweening time when the component is enabled..
|
||||
/// </summary>
|
||||
public bool resetTimeOnEnable
|
||||
{
|
||||
get => m_PlayOnEnable != PlayOnEnable.Forward;
|
||||
set => m_PlayOnEnable = value ? PlayOnEnable.None : PlayOnEnable.Forward;
|
||||
get => m_ResetTimeOnEnable;
|
||||
set => m_ResetTimeOnEnable = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -261,11 +319,28 @@ namespace Coffee.UIEffects
|
||||
set => m_Curve = value;
|
||||
}
|
||||
|
||||
public bool separateReverseCurve
|
||||
{
|
||||
get => m_SeparateReverseCurve;
|
||||
set => m_SeparateReverseCurve = value;
|
||||
}
|
||||
|
||||
public AnimationCurve reverseCurve
|
||||
{
|
||||
get => m_ReverseCurve;
|
||||
set => m_ReverseCurve = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event to invoke when the tween has completed.
|
||||
/// </summary>
|
||||
public UnityEvent onComplete => m_OnComplete;
|
||||
|
||||
/// <summary>
|
||||
/// Event to invoke when the rate was changed.
|
||||
/// </summary>
|
||||
public TweenerEvent onChangedRate => m_OnChangedRate;
|
||||
|
||||
/// <summary>
|
||||
/// Is the tween playing?
|
||||
/// </summary>
|
||||
@@ -303,13 +378,13 @@ namespace Coffee.UIEffects
|
||||
switch (playOnEnable)
|
||||
{
|
||||
case PlayOnEnable.KeepDirection:
|
||||
Play();
|
||||
Play(resetTimeOnEnable);
|
||||
break;
|
||||
case PlayOnEnable.Forward:
|
||||
PlayForward();
|
||||
PlayForward(resetTimeOnEnable);
|
||||
break;
|
||||
case PlayOnEnable.Reverse:
|
||||
PlayReverse();
|
||||
PlayReverse(resetTimeOnEnable);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -336,9 +411,14 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (resetTime)
|
||||
{
|
||||
ResetTime();
|
||||
ResetTime(direction);
|
||||
}
|
||||
|
||||
Play();
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
_isPaused = false;
|
||||
|
||||
if (!isTweening)
|
||||
@@ -347,15 +427,14 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public void Play()
|
||||
public void PlayForward(bool resetTime)
|
||||
{
|
||||
ResetTime();
|
||||
_isPaused = false;
|
||||
|
||||
if (!isTweening)
|
||||
if (resetTime)
|
||||
{
|
||||
m_OnComplete.Invoke();
|
||||
ResetTime(Direction.Forward);
|
||||
}
|
||||
|
||||
PlayForward();
|
||||
}
|
||||
|
||||
public void PlayForward()
|
||||
@@ -369,6 +448,16 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayReverse(bool resetTime)
|
||||
{
|
||||
if (resetTime)
|
||||
{
|
||||
ResetTime(Direction.Reverse);
|
||||
}
|
||||
|
||||
PlayReverse();
|
||||
}
|
||||
|
||||
public void PlayReverse()
|
||||
{
|
||||
direction = Direction.Reverse;
|
||||
@@ -396,6 +485,18 @@ namespace Coffee.UIEffects
|
||||
SetTime(0);
|
||||
}
|
||||
|
||||
public void ResetTime(Direction dir)
|
||||
{
|
||||
if (dir == Direction.Forward)
|
||||
{
|
||||
SetTime(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTime(totalTime - 0.0001f);
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"UIEffectTweener.Restart has been deprecated. Use UIEffectTweener.ResetTime instead (UnityUpgradable) -> ResetTime")]
|
||||
public void Restart()
|
||||
|
||||
@@ -5,7 +5,7 @@ MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if TMP_ENABLE
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class ContextProcessor
|
||||
{
|
||||
private static readonly List<ContextProcessor> s_Processors = new List<ContextProcessor>()
|
||||
{
|
||||
new ContextProcessor(),
|
||||
#if TMP_ENABLE
|
||||
new TmpContextProcessor(),
|
||||
#endif
|
||||
};
|
||||
|
||||
public static void RegisterProcessor(ContextProcessor processor)
|
||||
{
|
||||
// Register only once.
|
||||
foreach (var p in s_Processors)
|
||||
{
|
||||
if (p.GetType() == processor.GetType()) return;
|
||||
}
|
||||
|
||||
s_Processors.Add(processor);
|
||||
}
|
||||
|
||||
public static ContextProcessor FindProcessor(Graphic graphic)
|
||||
{
|
||||
for (var i = s_Processors.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var p = s_Processors[i];
|
||||
if (p.IsValid(graphic)) return p;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is valid for this processor.
|
||||
/// </summary>
|
||||
protected virtual bool IsValid(Graphic graphic)
|
||||
{
|
||||
return graphic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is a text.
|
||||
/// </summary>
|
||||
public virtual bool IsText(Graphic graphic)
|
||||
{
|
||||
return graphic is Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before modifying the mesh.
|
||||
/// </summary>
|
||||
public virtual void OnPreModifyMesh(Graphic graphic)
|
||||
{
|
||||
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
|
||||
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
|
||||
UIEffectContext.onModifyVertex = s_OnModifyVertex;
|
||||
|
||||
var canvas = graphic.canvas;
|
||||
if (canvas)
|
||||
{
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
|
||||
null;
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
{
|
||||
vt.uv0.z -= 8;
|
||||
vt.uv0.w -= 8;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
{
|
||||
vt.uv0.z = normalizedX;
|
||||
vt.uv0.w = normalizedY;
|
||||
vt.uv1 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
}
|
||||
|
||||
#if TMP_ENABLE
|
||||
internal class TmpContextProcessor : ContextProcessor
|
||||
{
|
||||
protected override bool IsValid(Graphic graphic)
|
||||
{
|
||||
if (!graphic) return false;
|
||||
if (graphic is TextMeshProUGUI) return true;
|
||||
if (graphic is TMP_SubMeshUI sub)
|
||||
{
|
||||
// If TMP_SubMeshUI is used for text
|
||||
return !sub.spriteAsset
|
||||
|| sub.sharedMaterial != sub.spriteAsset.material;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is a text.
|
||||
/// </summary>
|
||||
public override bool IsText(Graphic graphic)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before modifying the mesh.
|
||||
/// </summary>
|
||||
public override void OnPreModifyMesh(Graphic graphic)
|
||||
{
|
||||
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
|
||||
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
|
||||
UIEffectContext.onModifyVertex = s_OnModifyVertex;
|
||||
|
||||
var canvas = graphic.canvas;
|
||||
if (canvas)
|
||||
{
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord2;
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
null;
|
||||
#else
|
||||
(vt, a, b, t) =>
|
||||
{
|
||||
// TMP 3.x uses packed UV
|
||||
vt.uv1.x = PackUV(Vector2.Lerp(UnpackUV(a.uv1.x), UnpackUV(b.uv1.x), t));
|
||||
return vt;
|
||||
|
||||
static float PackUV(Vector2 input)
|
||||
{
|
||||
return (int)(input.x * 511) * 4096 + (int)(input.y * 511);
|
||||
}
|
||||
|
||||
static Vector2 UnpackUV(float input)
|
||||
{
|
||||
return new Vector2(input / 4096 / 511, input % 4096 / 511);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
{
|
||||
vt.uv1.z -= 8;
|
||||
vt.uv1.w -= 8;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
{
|
||||
vt.uv1.z = normalizedX;
|
||||
vt.uv1.w = normalizedY;
|
||||
vt.uv2 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -159,6 +159,21 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoDiagonal(List<UIVertex> verts, Color a, Color b, Color c, Color d, float offset,
|
||||
float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x);
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y);
|
||||
var tx = Mathf.Clamp01(offset + (x - 0.5f) * scale + 0.5f);
|
||||
var ty = Mathf.Clamp01(offset + (0.5f - y) * scale + 0.5f);
|
||||
vt.color *= Color.Lerp(Color.Lerp(a, b, tx), Color.Lerp(c, d, tx), ty);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoDiagonalGradientToRightBottom(List<UIVertex> verts, Color a, Color b, float offset,
|
||||
float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class GraphicProxy
|
||||
{
|
||||
private static readonly List<GraphicProxy> s_Proxies = new List<GraphicProxy>()
|
||||
{
|
||||
new GraphicProxy()
|
||||
};
|
||||
|
||||
public static void Register(GraphicProxy proxy)
|
||||
{
|
||||
// Register only once.
|
||||
foreach (var p in s_Proxies)
|
||||
{
|
||||
if (p.GetType() == proxy.GetType()) return;
|
||||
}
|
||||
|
||||
s_Proxies.Add(proxy);
|
||||
}
|
||||
|
||||
public static GraphicProxy Find(Graphic graphic)
|
||||
{
|
||||
if (!graphic) return null;
|
||||
|
||||
for (var i = s_Proxies.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var p = s_Proxies[i];
|
||||
if (p.IsValid(graphic)) return p;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is valid for this proxy.
|
||||
/// </summary>
|
||||
protected virtual bool IsValid(Graphic graphic)
|
||||
{
|
||||
return graphic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is a text.
|
||||
/// </summary>
|
||||
public virtual bool IsText(Graphic graphic)
|
||||
{
|
||||
return graphic is Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before modifying the mesh.
|
||||
/// </summary>
|
||||
public virtual void OnPreModifyMesh(Graphic graphic)
|
||||
{
|
||||
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
|
||||
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
|
||||
UIEffectContext.onModifyVertex = s_OnModifyVertex;
|
||||
|
||||
var canvas = graphic.canvas;
|
||||
if (canvas)
|
||||
{
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetVerticesDirty(Graphic graphic, bool enabled)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Vector4 ModifyExpandSize(Graphic graphic, Vector4 expandSize)
|
||||
{
|
||||
return expandSize;
|
||||
}
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
|
||||
null;
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
{
|
||||
vt.uv0.z -= 8;
|
||||
vt.uv0.w -= 8;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
{
|
||||
vt.uv0.z = normalizedX;
|
||||
vt.uv0.w = normalizedY;
|
||||
vt.uv1 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6f31259f929a47bf9cbd8f1b921327e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
internal class ImageProxy : GraphicProxy
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[InitializeOnLoadMethod]
|
||||
#endif
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void InitializeOnLoad()
|
||||
{
|
||||
Register(new ImageProxy());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is valid for this proxy.
|
||||
/// </summary>
|
||||
protected override bool IsValid(Graphic graphic)
|
||||
{
|
||||
if (!graphic) return false;
|
||||
if (graphic is Image) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is a text.
|
||||
/// </summary>
|
||||
public override bool IsText(Graphic graphic)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Vector4 ModifyExpandSize(Graphic graphic, Vector4 expandSize)
|
||||
{
|
||||
if (graphic is Image image
|
||||
&& image.type == Image.Type.Filled
|
||||
&& image.fillMethod == Image.FillMethod.Radial360
|
||||
&& image.fillAmount <= 0.5f)
|
||||
{
|
||||
expandSize[(image.fillOrigin + (image.fillClockwise ? 2 : 0)) % 4] = 0;
|
||||
|
||||
if (image.fillAmount <= 0.25f)
|
||||
{
|
||||
expandSize[(image.fillOrigin + 3) % 4] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return expandSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cddfadaf298c14befb49972983c16f2d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,309 @@
|
||||
#if TMP_ENABLE
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
internal class TmpProxy : GraphicProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// Check if the graphic is valid for this proxy.
|
||||
/// </summary>
|
||||
protected override bool IsValid(Graphic graphic)
|
||||
{
|
||||
if (!graphic) return false;
|
||||
if (graphic is TextMeshProUGUI) return true;
|
||||
if (graphic is TMP_SubMeshUI sub)
|
||||
{
|
||||
// If TMP_SubMeshUI is used for text
|
||||
return !sub.spriteAsset
|
||||
|| sub.sharedMaterial != sub.spriteAsset.material;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the graphic is a text.
|
||||
/// </summary>
|
||||
public override bool IsText(Graphic graphic)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before modifying the mesh.
|
||||
/// </summary>
|
||||
public override void OnPreModifyMesh(Graphic graphic)
|
||||
{
|
||||
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
|
||||
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
|
||||
UIEffectContext.onModifyVertex = s_OnModifyVertex;
|
||||
|
||||
var canvas = graphic.canvas;
|
||||
if (canvas)
|
||||
{
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord2;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetVerticesDirty(Graphic graphic, bool enabled)
|
||||
{
|
||||
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
OnChangeText(textMeshProUGUI);
|
||||
}
|
||||
else if (0 < textMeshProUGUI.textInfo?.meshInfo?.Length
|
||||
&& 0 < textMeshProUGUI.textInfo.meshInfo[0].vertexCount)
|
||||
{
|
||||
textMeshProUGUI.UpdateVertexData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
null;
|
||||
#else
|
||||
(vt, a, b, t) =>
|
||||
{
|
||||
// TMP 3.x uses packed UV
|
||||
vt.uv1.x = PackUV(Vector2.Lerp(UnpackUV(a.uv1.x), UnpackUV(b.uv1.x), t));
|
||||
return vt;
|
||||
|
||||
static float PackUV(Vector2 input)
|
||||
{
|
||||
return (int)(input.x * 511) * 4096 + (int)(input.y * 511);
|
||||
}
|
||||
|
||||
static Vector2 UnpackUV(float input)
|
||||
{
|
||||
return new Vector2(input / 4096 / 511, input % 4096 / 511);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
{
|
||||
vt.uv1.z -= 8;
|
||||
vt.uv1.w -= 8;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
{
|
||||
vt.uv1.z = normalizedX;
|
||||
vt.uv1.w = normalizedY;
|
||||
vt.uv2 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static Mesh s_Mesh;
|
||||
private static readonly VertexHelper s_VertexHelper = new VertexHelper();
|
||||
private static readonly HashSet<TextMeshProUGUI> s_ChangedInstances = new HashSet<TextMeshProUGUI>();
|
||||
private static readonly HashSet<TextMeshProUGUI> s_RegisteredInstances = new HashSet<TextMeshProUGUI>();
|
||||
private static readonly Dictionary<int, float> s_SdfScaleCache = new Dictionary<int, float>();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[InitializeOnLoadMethod]
|
||||
#endif
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void InitializeOnLoad()
|
||||
{
|
||||
s_ChangedInstances.Clear();
|
||||
s_RegisteredInstances.Clear();
|
||||
s_SdfScaleCache.Clear();
|
||||
Register(new TmpProxy());
|
||||
|
||||
// When the text is changed, add it to the changed list
|
||||
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
|
||||
{
|
||||
if (obj is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||
{
|
||||
s_ChangedInstances.Add(textMeshProUGUI);
|
||||
}
|
||||
});
|
||||
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild += () =>
|
||||
{
|
||||
// Check SDF scale (lossyScale.y) change
|
||||
var toRemove = InternalListPool<TextMeshProUGUI>.Rent();
|
||||
foreach (var textMeshProUGUI in s_RegisteredInstances)
|
||||
{
|
||||
if (textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||
{
|
||||
var id = textMeshProUGUI.GetHashCode();
|
||||
var lossyScaleY = textMeshProUGUI.transform.lossyScale.y;
|
||||
|
||||
// If the scale has changed, add to the changed list
|
||||
if (s_SdfScaleCache.TryGetValue(id, out var prev) && !Mathf.Approximately(prev, lossyScaleY))
|
||||
{
|
||||
OnChangeText(textMeshProUGUI);
|
||||
}
|
||||
|
||||
// Update the scale cache
|
||||
s_SdfScaleCache[id] = textMeshProUGUI.transform.lossyScale.y;
|
||||
}
|
||||
// Remove destroyed objects later
|
||||
else if (!ReferenceEquals(textMeshProUGUI, null))
|
||||
{
|
||||
toRemove.Add(textMeshProUGUI);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove destroyed objects
|
||||
foreach (var textMeshProUGUI in toRemove)
|
||||
{
|
||||
s_SdfScaleCache.Remove(textMeshProUGUI.GetHashCode());
|
||||
s_RegisteredInstances.Remove(textMeshProUGUI);
|
||||
}
|
||||
|
||||
InternalListPool<TextMeshProUGUI>.Return(ref toRemove);
|
||||
};
|
||||
|
||||
// Modify the changed TMP mesh
|
||||
UIExtraCallbacks.onAfterCanvasRebuild += () =>
|
||||
{
|
||||
foreach (var textMeshProUGUI in s_ChangedInstances)
|
||||
{
|
||||
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
|
||||
ModifyMesh(textMeshProUGUI);
|
||||
}
|
||||
|
||||
s_ChangedInstances.Clear();
|
||||
};
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneSaved += _ =>
|
||||
{
|
||||
foreach (var textMeshProUGUI in s_RegisteredInstances)
|
||||
{
|
||||
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
|
||||
if (textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect) && effect.isActiveAndEnabled)
|
||||
{
|
||||
effect.ReleaseMaterial();
|
||||
effect.SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
|
||||
Misc.QueuePlayerLoopUpdate();
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void OnChangeText(Object obj)
|
||||
{
|
||||
if (obj is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||
{
|
||||
s_ChangedInstances.Add(textMeshProUGUI);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
|
||||
{
|
||||
if (!s_Mesh)
|
||||
{
|
||||
s_Mesh = new Mesh();
|
||||
s_Mesh.MarkDynamic();
|
||||
}
|
||||
|
||||
s_RegisteredInstances.Add(textMeshProUGUI);
|
||||
var effect = textMeshProUGUI.GetComponent<UIEffectBase>();
|
||||
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
|
||||
var modifiers = InternalListPool<IMeshModifier>.Rent();
|
||||
var subModifiers = InternalListPool<IMeshModifier>.Rent();
|
||||
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
|
||||
textMeshProUGUI.GetComponents(modifiers);
|
||||
|
||||
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
|
||||
{
|
||||
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
|
||||
s_VertexHelper.Clear();
|
||||
meshInfo.mesh.CopyTo(s_VertexHelper, meshInfo.vertexCount, meshInfo.vertexCount * 6 / 4);
|
||||
if (i == 0)
|
||||
{
|
||||
foreach (var modifier in modifiers)
|
||||
{
|
||||
modifier.ModifyMesh(s_VertexHelper);
|
||||
}
|
||||
|
||||
s_VertexHelper.FillMesh(s_Mesh);
|
||||
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
|
||||
}
|
||||
else if (i - 1 < subMeshes.Count)
|
||||
{
|
||||
foreach (var modifier in modifiers)
|
||||
{
|
||||
if (modifier is UIEffectBase) continue;
|
||||
modifier.ModifyMesh(s_VertexHelper);
|
||||
}
|
||||
|
||||
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
|
||||
if (!subMeshUI) break;
|
||||
|
||||
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
|
||||
if (effect is UIEffect pEffect && pEffect.isActiveAndEnabled)
|
||||
{
|
||||
replica.target = pEffect;
|
||||
replica.useTargetTransform = true;
|
||||
replica.customRoot = null;
|
||||
replica.flip = pEffect.flip;
|
||||
}
|
||||
else if (effect is UIEffectReplica pReplica && pReplica.isActiveAndEnabled)
|
||||
{
|
||||
replica.target = pReplica.target;
|
||||
replica.useTargetTransform = pReplica.useTargetTransform;
|
||||
replica.customRoot = pReplica.customRoot;
|
||||
replica.flip = pReplica.flip;
|
||||
}
|
||||
else
|
||||
{
|
||||
replica.target = null;
|
||||
replica.customRoot = null;
|
||||
}
|
||||
|
||||
subMeshUI.GetComponents(subModifiers);
|
||||
foreach (var modifier in subModifiers)
|
||||
{
|
||||
modifier.ModifyMesh(s_VertexHelper);
|
||||
}
|
||||
|
||||
s_VertexHelper.FillMesh(s_Mesh);
|
||||
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
|
||||
InternalListPool<IMeshModifier>.Return(ref modifiers);
|
||||
InternalListPool<IMeshModifier>.Return(ref subModifiers);
|
||||
s_Mesh.Clear(false);
|
||||
}
|
||||
|
||||
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material, int start)
|
||||
{
|
||||
var count = subMeshes.Count;
|
||||
for (var j = 0; j < count; j++)
|
||||
{
|
||||
var s = subMeshes[(j + start + count) % count];
|
||||
if (s.sharedMaterial == material) return s;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2ffc93dc93f34027ad9bfdbfd61caae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
@@ -9,6 +10,31 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
public static Func<UIVertex, UIVertex, UIVertex, float, UIVertex> onLerpVertex;
|
||||
|
||||
public static void Flip(List<UIVertex> verts, bool horizontal, bool vertical)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var pos = vt.position;
|
||||
vt.position = new Vector3(horizontal ? -pos.x : pos.x, vertical ? -pos.y : pos.y);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Flip(VertexHelper vh, bool horizontal, bool vertical)
|
||||
{
|
||||
var count = vh.currentVertCount;
|
||||
var vt = default(UIVertex);
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vt, i);
|
||||
var pos = vt.position;
|
||||
vt.position = new Vector3(horizontal ? -pos.x : pos.x, vertical ? -pos.y : pos.y);
|
||||
vh.SetUIVertex(vt, i);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ExpandCapacity(List<UIVertex> verts, int multiplier)
|
||||
{
|
||||
var capacity = Mathf.NextPowerOfTwo(verts.Count * multiplier);
|
||||
@@ -18,56 +44,62 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public static void Expand(List<UIVertex> verts, int start, int bundleSize, Vector2 expandSize, Rect bounds)
|
||||
public static void Expand(List<UIVertex> verts, int start, int bundleSize, Vector4 expandSize, Rect bounds)
|
||||
{
|
||||
if (expandSize == Vector2.zero) return;
|
||||
if (expandSize == Vector4.zero) return;
|
||||
|
||||
// Quad (6 vertices)
|
||||
for (var j = 0; j < bundleSize; j += 6)
|
||||
for (var j = 0; j < bundleSize; j += 3)
|
||||
{
|
||||
var size = default(Vector3);
|
||||
var extendPos = default(Vector3);
|
||||
var extendUV = default(Vector3);
|
||||
var posLB = verts[start + j + 1].position;
|
||||
var posRT = verts[start + j + 4].position;
|
||||
var willExpand = bundleSize == 6 // Text or simple quad
|
||||
|| !bounds.Contains(posLB)
|
||||
|| !bounds.Contains(posRT); // Outer 9-sliced quad
|
||||
if (willExpand)
|
||||
if (bounds.Contains(verts[start + j + 0].position)
|
||||
&& bounds.Contains(verts[start + j + 1].position)
|
||||
&& bounds.Contains(verts[start + j + 2].position))
|
||||
{
|
||||
var uvLB = verts[start + j + 1].uv0;
|
||||
var uvRT = verts[start + j + 4].uv0;
|
||||
var posCenter = (posLB + posRT) / 2;
|
||||
var uvCenter = (uvLB + uvRT) / 2;
|
||||
size = posLB - posRT;
|
||||
size.x = 1 + expandSize.x / Mathf.Abs(size.x);
|
||||
size.y = 1 + expandSize.y / Mathf.Abs(size.y);
|
||||
size.z = 1;
|
||||
extendPos = posCenter - Vector3.Scale(size, posCenter);
|
||||
extendUV = uvCenter - Vector4.Scale(size, uvCenter);
|
||||
continue;
|
||||
}
|
||||
|
||||
GetBounds(verts, start + j, 3, out var posBounds, out var uvBounds);
|
||||
var posCenter = (Vector4)posBounds.center;
|
||||
posCenter.z = posCenter.x;
|
||||
posCenter.w = posCenter.y;
|
||||
var uvCenter = (Vector4)uvBounds.center;
|
||||
uvCenter.z = uvCenter.x;
|
||||
uvCenter.w = uvCenter.y;
|
||||
var size = (Vector4)posBounds.size;
|
||||
size.z = 1 + expandSize.z / Mathf.Abs(size.x);
|
||||
size.w = 1 + expandSize.w / Mathf.Abs(size.y);
|
||||
size.x = 1 + expandSize.x / Mathf.Abs(size.x);
|
||||
size.y = 1 + expandSize.y / Mathf.Abs(size.y);
|
||||
var extendPos = posCenter - Vector4.Scale(size, posCenter);
|
||||
var extendUV = uvCenter - Vector4.Scale(size, uvCenter);
|
||||
|
||||
// Set vertex position, uv, uvMask and local normalized position.
|
||||
for (var k = 0; k < 6; k++)
|
||||
for (var k = 0; k < 3; k++)
|
||||
{
|
||||
var vt = verts[start + j + k];
|
||||
var pos = vt.position;
|
||||
var uv0 = vt.uv0;
|
||||
|
||||
// Expand edge vertex
|
||||
if (willExpand)
|
||||
if (pos.x < bounds.xMin)
|
||||
{
|
||||
if (pos.x < bounds.xMin || bounds.xMax < pos.x)
|
||||
{
|
||||
pos.x = pos.x * size.x + extendPos.x;
|
||||
uv0.x = uv0.x * size.x + extendUV.x;
|
||||
}
|
||||
pos.x = pos.x * size.x + extendPos.x;
|
||||
uv0.x = uv0.x * size.x + extendUV.x;
|
||||
}
|
||||
else if (bounds.xMax < pos.x)
|
||||
{
|
||||
pos.x = pos.x * size.z + extendPos.z;
|
||||
uv0.x = uv0.x * size.z + extendUV.z;
|
||||
}
|
||||
|
||||
if (pos.y < bounds.yMin || bounds.yMax < pos.y)
|
||||
{
|
||||
pos.y = pos.y * size.y + extendPos.y;
|
||||
uv0.y = uv0.y * size.y + extendUV.y;
|
||||
}
|
||||
if (pos.y < bounds.yMin)
|
||||
{
|
||||
pos.y = pos.y * size.y + extendPos.y;
|
||||
uv0.y = uv0.y * size.y + extendUV.y;
|
||||
}
|
||||
else if (bounds.yMax < pos.y)
|
||||
{
|
||||
pos.y = pos.y * size.w + extendPos.w;
|
||||
uv0.y = uv0.y * size.w + extendUV.w;
|
||||
}
|
||||
|
||||
vt.position = pos;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b679dead51ca64e93a87fbd98e1dbaf5
|
||||
guid: c679ad076c9fb4c5193ee414faf2a60e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -31,6 +31,7 @@ RectTransform:
|
||||
- {fileID: 3451362614172717415}
|
||||
- {fileID: 5553160781519274839}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -70,6 +71,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3775897659628443270}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -132,8 +134,11 @@ MonoBehaviour:
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
@@ -144,8 +149,14 @@ MonoBehaviour:
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
@@ -157,8 +168,54 @@ MonoBehaviour:
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowEffectOnOrigin: 0
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &5537784035359440648
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -200,9 +257,13 @@ MonoBehaviour:
|
||||
m_Delay: 0
|
||||
m_Duration: 1
|
||||
m_Interval: 0.5
|
||||
m_RestartOnEnable: 1
|
||||
m_PlayOnEnable: 1
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 3
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &6720690739041738997
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -216,7 +277,7 @@ GameObject:
|
||||
- component: {fileID: 603320123414190803}
|
||||
- component: {fileID: 3769011095332248825}
|
||||
m_Layer: 5
|
||||
m_Name: Label
|
||||
m_Name: TITLE
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -235,6 +296,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3775897659628443270}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9379b7b2236ab4c0e9f8d9f7db9936a8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,159 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dee1cb6c2ee294c6087ea9d89d368417
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 31, y: 31, z: 31, w: 31}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 4
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 2775f4bfe28684615aa97cccf30fd220
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 689e34b70ff3a41529576dfcd61ce296
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIEffect_PatternAndEdge : MonoBehaviour
|
||||
{
|
||||
private UIEffect[] _effects;
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
{
|
||||
_effects = GetComponentsInChildren<UIEffect>();
|
||||
}
|
||||
|
||||
public void SetTransitionWidth(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.transitionWidth = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTransitionRotation(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.transitionRotation = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTransitionAutoSpeed(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.transitionAutoPlaySpeed = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetEdgeWidth(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.edgeWidth = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetShinyWidth(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.edgeShinyWidth = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetShinySpeed(float value)
|
||||
{
|
||||
foreach (var effect in _effects)
|
||||
{
|
||||
effect.edgeShinyAutoPlaySpeed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e095cc53c91de44459b0fda6a14d0eff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(UIEffectTweener))]
|
||||
public class UIEffectTweenerControl : MonoBehaviour
|
||||
public class UIEffect_TweenerControler : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Text m_Info;
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cf1917f21f7940b3973d424c9049152
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,159 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 098475820cf634867a339bb9af940722
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 42 KiB |
@@ -0,0 +1,159 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1851730bef7524e58b285a364983e21e
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,159 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9617fea85692e4f5fb65fb2ddd4496ce
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,70 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!687078895 &4343727234628468602
|
||||
SpriteAtlas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIEffect_Demo
|
||||
m_EditorData:
|
||||
serializedVersion: 2
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 1
|
||||
compressionQuality: 50
|
||||
maxTextureSize: 2048
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
readable: 0
|
||||
crunchedCompression: 0
|
||||
sRGB: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
m_BuildTarget: DefaultTexturePlatform
|
||||
m_MaxTextureSize: 2048
|
||||
m_ResizeAlgorithm: 0
|
||||
m_TextureFormat: -1
|
||||
m_TextureCompression: 1
|
||||
m_CompressionQuality: 50
|
||||
m_CrunchedCompression: 0
|
||||
m_AllowsAlphaSplitting: 0
|
||||
m_Overridden: 0
|
||||
m_AndroidETC2FallbackOverride: 0
|
||||
m_ForceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 0
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
packables:
|
||||
- {fileID: 102900000, guid: 4cf1917f21f7940b3973d424c9049152, type: 3}
|
||||
bindAsDefault: 1
|
||||
isAtlasV2: 0
|
||||
cachedData: {fileID: 0}
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_PackedSprites:
|
||||
- {fileID: 21300000, guid: 2ee815c0807434e9091770d1c6cdc70b, type: 3}
|
||||
- {fileID: 21300000, guid: 098475820cf634867a339bb9af940722, type: 3}
|
||||
- {fileID: 21300000, guid: 03b5a015427324a419a5ddbd5d5a6551, type: 3}
|
||||
- {fileID: 21300000, guid: e822d767ed19641dcaf9831e1c8a742a, type: 3}
|
||||
- {fileID: 21300000, guid: 9617fea85692e4f5fb65fb2ddd4496ce, type: 3}
|
||||
- {fileID: 21300000, guid: 1851730bef7524e58b285a364983e21e, type: 3}
|
||||
- {fileID: 21300000, guid: be1fa55f69843fb4aaf4d0ff56004fba, type: 3}
|
||||
m_PackedSpriteNamesToIndex:
|
||||
- UIEffect_I_am_Unity-Chan-256
|
||||
- UIEffect_Badge_Checked
|
||||
- UIEffect_Showcase_Art
|
||||
- UIEffect_I_am_Unity-Chan-512
|
||||
- UIEffect_Badge_Police
|
||||
- UIEffect_Badge_Level
|
||||
- UIEffect_FlatCornered_64
|
||||
m_RenderDataMap: {}
|
||||
m_Tag: UIEffect_Demo
|
||||
m_IsVariant: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 855c67a9aa5494a5eb7dab6da5100e95
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 325 B |
@@ -0,0 +1,171 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be1fa55f69843fb4aaf4d0ff56004fba
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 16, y: 16, z: 16, w: 16}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Windows Store Apps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
After Width: | Height: | Size: 54 KiB |