Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 126748eee6 | |||
| 417e92ceba | |||
| 154fbef0fa | |||
| 240ac6b206 | |||
| ff9055471a | |||
| 86c74e77c4 | |||
| 1332f805ff | |||
| 50c0e475ca | |||
| 7be2bf463d | |||
| 8d906a7836 | |||
| 587ff28e91 | |||
| 8ba8ada3f2 | |||
| d877a9f4c1 | |||
| fd1e9bcaf2 | |||
| 78f7c2f789 | |||
| 8b00091539 | |||
| 95500b6c73 | |||
| ab952812d6 | |||
| aa0bf72bd4 | |||
| 76f1478523 | |||
| afbfcdd40c | |||
| c34c2ec0c2 | |||
| da6651ae65 | |||
| 255d600275 | |||
| d359086ed4 | |||
| 6e8aaf36f0 | |||
| 27629cdd7c | |||
| bb2efc0790 | |||
| d41d1ad21f | |||
| 739ae50549 | |||
| 3ca1214233 | |||
| fb75fd4817 | |||
| 2c1d857119 | |||
| e856b0b939 | |||
| 6cbb793d8d | |||
| 485e2df9fc | |||
| 4a49e9a8b2 | |||
| af0ae7bdf7 | |||
| d1fa0d143f | |||
| 55a7f27204 | |||
| ff824c2341 | |||
| 014bba3f56 | |||
| f533d02977 | |||
| 8bb782c90a | |||
| 2617f77c6a | |||
| 1f4427c3d5 | |||
| 2dcb7f7e86 | |||
| 0a4229907d | |||
| dbf8ae00f5 | |||
| cacb9fde45 | |||
| 9d980961d6 |
@@ -34,6 +34,7 @@ jobs:
|
|||||||
working_directory: Packages/src
|
working_directory: Packages/src
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
@semantic-release/changelog
|
@semantic-release/changelog
|
||||||
|
@semantic-release/exec
|
||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
@@ -8,17 +8,28 @@ run-name: 🧪 Test URP (${{ github.event.pull_request.title || github.ref_name
|
|||||||
env:
|
env:
|
||||||
# MINIMUM_VERSION: The minimum version of Unity.
|
# MINIMUM_VERSION: The minimum version of Unity.
|
||||||
MINIMUM_VERSION: 6000.0
|
MINIMUM_VERSION: 6000.0
|
||||||
|
MAXIMUM_VERSION:
|
||||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||||
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
||||||
|
IGNORE_ALPHA: false
|
||||||
|
IGNORE_BETA: false
|
||||||
PROJECT_PATH: UIEffectURP
|
PROJECT_PATH: UIEffectURP
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
unityVersions:
|
||||||
|
description: 'Specify the Unity versions to test. (eg. [ "2019.4.41f2", "2020.3.15f2" ])'
|
||||||
|
required: false
|
||||||
|
default: '[ "6000.0.0f1", "6000.1.0f1" ]'
|
||||||
usePeriodVersions:
|
usePeriodVersions:
|
||||||
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
|
description: 'Use the period versions (.0f1, .10f1, 20f1, ...).'
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
|
overrideFindOptions:
|
||||||
|
description: 'Specify options for unity-changeset. (eg. --ignore-alpha --max 2020.3 )'
|
||||||
|
required: false
|
||||||
|
default: '--min 6000.0 --max 9999.9 --ignore-alpha --ignore-beta'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
@@ -60,9 +71,27 @@ jobs:
|
|||||||
id: setup
|
id: setup
|
||||||
run: |
|
run: |
|
||||||
echo "==== Target Unity Versions ===="
|
echo "==== Target Unity Versions ===="
|
||||||
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch --ignore-alpha --min ${MINIMUM_VERSION}`
|
|
||||||
|
# Check if specific Unity versions are provided via inputs (for workflow_dispatch)
|
||||||
|
if [ -n "${{ inputs.unityVersions }}" ]; then
|
||||||
|
echo "* Using specified Unity versions" | tee $GITHUB_OUTPUT
|
||||||
|
echo 'unityVersions=${{ inputs.unityVersions }}' | tee $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Formulate find options based on inputs and environment variables
|
||||||
|
FIND_OPTIONS=""
|
||||||
|
[ "${{ env.IGNORE_ALPHA }}" = "true" ] && FIND_OPTIONS+=" --ignore-alpha"
|
||||||
|
[ "${{ env.IGNORE_BETA }}" = "true" ] && FIND_OPTIONS+=" --ignore-beta"
|
||||||
|
[ -n "${{ env.MINIMUM_VERSION }}" ] && FIND_OPTIONS+=" --min ${MINIMUM_VERSION}"
|
||||||
|
[ -n "${{ env.MAXIMUM_VERSION }}" ] && FIND_OPTIONS+=" --max ${MAXIMUM_VERSION}"
|
||||||
|
[ -n "${{ inputs.overrideFindOptions }}" ] && FIND_OPTIONS="${inputs.overrideFindOptions}"
|
||||||
|
echo "find options: $FIND_OPTIONS"
|
||||||
|
|
||||||
|
# Find the latest Unity versions if no specific versions are provided
|
||||||
|
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch $FIND_OPTIONS`
|
||||||
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
||||||
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions --ignore-alpha --min ${MINIMUM_VERSION} --grep '0f'`
|
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions $FIND_OPTIONS --grep '0f'`
|
||||||
else
|
else
|
||||||
ADDITIONAL_VERSIONS=[]
|
ADDITIONAL_VERSIONS=[]
|
||||||
fi
|
fi
|
||||||
@@ -97,7 +126,7 @@ jobs:
|
|||||||
${{ env.PROJECT_PATH }}-Library-
|
${{ env.PROJECT_PATH }}-Library-
|
||||||
|
|
||||||
- name: 🛠️ Build Unity Project (Test)
|
- name: 🛠️ Build Unity Project (Test)
|
||||||
uses: game-ci/unity-builder@main
|
uses: mob-sakai/unity-builder@fix/support-unity6.6
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
@@ -111,7 +140,7 @@ jobs:
|
|||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
# - name: 🧪 Run tests
|
# - name: 🧪 Run tests
|
||||||
# uses: game-ci/unity-test-runner@main
|
# uses: mob-sakai/unity-test-runner@fix/support-unity6.6
|
||||||
# timeout-minutes: 45
|
# timeout-minutes: 45
|
||||||
# with:
|
# with:
|
||||||
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
|
|||||||
@@ -8,17 +8,28 @@ run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})
|
|||||||
env:
|
env:
|
||||||
# MINIMUM_VERSION: The minimum version of Unity.
|
# MINIMUM_VERSION: The minimum version of Unity.
|
||||||
MINIMUM_VERSION: 2020.3
|
MINIMUM_VERSION: 2020.3
|
||||||
|
MAXIMUM_VERSION: 6000.7.99
|
||||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||||
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
||||||
|
IGNORE_ALPHA: false
|
||||||
|
IGNORE_BETA: false
|
||||||
PROJECT_PATH: .
|
PROJECT_PATH: .
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
unityVersions:
|
||||||
|
description: 'Specify the Unity versions to test. (eg. [ "2019.4.41f2", "2020.3.15f2" ])'
|
||||||
|
required: false
|
||||||
|
default: '[ "2019.4.41f2", "2020.3.15f2" ]'
|
||||||
usePeriodVersions:
|
usePeriodVersions:
|
||||||
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
|
description: 'Use the period versions (.0f1, .10f1, 20f1, ...).'
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
|
overrideFindOptions:
|
||||||
|
description: 'Specify options for unity-changeset. (eg. --ignore-alpha --max 2020.3 )'
|
||||||
|
required: false
|
||||||
|
default: '--min 2019.4 --max 9999.9 --ignore-alpha --ignore-beta'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
@@ -60,9 +71,27 @@ jobs:
|
|||||||
id: setup
|
id: setup
|
||||||
run: |
|
run: |
|
||||||
echo "==== Target Unity Versions ===="
|
echo "==== Target Unity Versions ===="
|
||||||
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch --ignore-alpha --min ${MINIMUM_VERSION}`
|
|
||||||
|
# Check if specific Unity versions are provided via inputs (for workflow_dispatch)
|
||||||
|
if [ -n "${{ inputs.unityVersions }}" ]; then
|
||||||
|
echo "* Using specified Unity versions" | tee $GITHUB_OUTPUT
|
||||||
|
echo 'unityVersions=${{ inputs.unityVersions }}' | tee $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Formulate find options based on inputs and environment variables
|
||||||
|
FIND_OPTIONS=""
|
||||||
|
[ "${{ env.IGNORE_ALPHA }}" = "true" ] && FIND_OPTIONS+=" --ignore-alpha"
|
||||||
|
[ "${{ env.IGNORE_BETA }}" = "true" ] && FIND_OPTIONS+=" --ignore-beta"
|
||||||
|
[ -n "${{ env.MINIMUM_VERSION }}" ] && FIND_OPTIONS+=" --min ${MINIMUM_VERSION}"
|
||||||
|
[ -n "${{ env.MAXIMUM_VERSION }}" ] && FIND_OPTIONS+=" --max ${MAXIMUM_VERSION}"
|
||||||
|
[ -n "${{ inputs.overrideFindOptions }}" ] && FIND_OPTIONS="${inputs.overrideFindOptions}"
|
||||||
|
echo "find options: $FIND_OPTIONS"
|
||||||
|
|
||||||
|
# Find the latest Unity versions if no specific versions are provided
|
||||||
|
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch $FIND_OPTIONS`
|
||||||
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
||||||
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions --ignore-alpha --min ${MINIMUM_VERSION} --grep '0f'`
|
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions $FIND_OPTIONS --grep '0f'`
|
||||||
else
|
else
|
||||||
ADDITIONAL_VERSIONS=[]
|
ADDITIONAL_VERSIONS=[]
|
||||||
fi
|
fi
|
||||||
@@ -97,7 +126,7 @@ jobs:
|
|||||||
${{ env.PROJECT_PATH }}-Library-
|
${{ env.PROJECT_PATH }}-Library-
|
||||||
|
|
||||||
- name: 🛠️ Build Unity Project (Test)
|
- name: 🛠️ Build Unity Project (Test)
|
||||||
uses: game-ci/unity-builder@main
|
uses: mob-sakai/unity-builder@fix/support-unity6.6
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
@@ -111,7 +140,7 @@ jobs:
|
|||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
- name: 🧪 Run tests
|
- name: 🧪 Run tests
|
||||||
uses: game-ci/unity-test-runner@main
|
uses: mob-sakai/unity-test-runner@fix/support-unity6.6
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ bin/
|
|||||||
UserSettings/
|
UserSettings/
|
||||||
*.app/
|
*.app/
|
||||||
Build/
|
Build/
|
||||||
Assets/TextMeshPro Support*
|
Assets/Samples*
|
||||||
|
Packages/src/Samples~/*.meta
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ RenderSettings:
|
|||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0.37311918, g: 0.3807396, b: 0.35872662, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
@@ -192,7 +193,6 @@ Transform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
@@ -226,7 +226,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 986199155}
|
m_Father: {fileID: 986199155}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
@@ -249,6 +248,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Target: {fileID: 1567169363}
|
m_Target: {fileID: 1567169363}
|
||||||
|
m_Preset: {fileID: 0}
|
||||||
m_UseTargetTransform: 1
|
m_UseTargetTransform: 1
|
||||||
m_SamplingScale: 1
|
m_SamplingScale: 1
|
||||||
m_AllowToModifyMeshShape: 1
|
m_AllowToModifyMeshShape: 1
|
||||||
@@ -321,7 +321,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_SendPointerHoverToParent: 1
|
|
||||||
m_HorizontalAxis: Horizontal
|
m_HorizontalAxis: Horizontal
|
||||||
m_VerticalAxis: Vertical
|
m_VerticalAxis: Vertical
|
||||||
m_SubmitButton: Submit
|
m_SubmitButton: Submit
|
||||||
@@ -354,7 +353,6 @@ Transform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
@@ -395,7 +393,6 @@ Canvas:
|
|||||||
m_OverrideSorting: 0
|
m_OverrideSorting: 0
|
||||||
m_OverridePixelPerfect: 0
|
m_OverridePixelPerfect: 0
|
||||||
m_SortingBucketNormalizedSize: 0
|
m_SortingBucketNormalizedSize: 0
|
||||||
m_VertexColorAlwaysGammaSpace: 0
|
|
||||||
m_AdditionalShaderChannelsFlag: 27
|
m_AdditionalShaderChannelsFlag: 27
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
@@ -450,7 +447,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1120943171}
|
- {fileID: 1120943171}
|
||||||
- {fileID: 1242517204}
|
- {fileID: 1242517204}
|
||||||
@@ -493,7 +489,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 2, y: 2, z: 2}
|
m_LocalScale: {x: 2, y: 2, z: 2}
|
||||||
m_ConstrainProportionsScale: 1
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 986199155}
|
m_Father: {fileID: 986199155}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
@@ -517,7 +512,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_ToneFilter: 1
|
m_ToneFilter: 1
|
||||||
m_ToneIntensity: 0.5
|
m_ToneIntensity: 0.5
|
||||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_ColorFilter: 6
|
m_ColorFilter: 6
|
||||||
m_ColorIntensity: 0.5
|
m_ColorIntensity: 0.5
|
||||||
m_Color: {r: 0.5377358, g: 0, b: 0.09190052, a: 1}
|
m_Color: {r: 0.5377358, g: 0, b: 0.09190052, a: 1}
|
||||||
@@ -545,6 +539,35 @@ MonoBehaviour:
|
|||||||
m_TransitionColorGlow: 0
|
m_TransitionColorGlow: 0
|
||||||
m_TransitionPatternReverse: 0
|
m_TransitionPatternReverse: 0
|
||||||
m_TransitionAutoPlaySpeed: 0
|
m_TransitionAutoPlaySpeed: 0
|
||||||
|
m_TransitionGradient:
|
||||||
|
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_TargetMode: 0
|
m_TargetMode: 0
|
||||||
m_TargetColor: {r: 0.15686275, g: 0.72156864, b: 0.8509804, a: 1}
|
m_TargetColor: {r: 0.15686275, g: 0.72156864, b: 0.8509804, a: 1}
|
||||||
m_TargetRange: 0.033
|
m_TargetRange: 0.033
|
||||||
@@ -600,6 +623,8 @@ MonoBehaviour:
|
|||||||
m_GradationOffset: 0
|
m_GradationOffset: 0
|
||||||
m_GradationScale: 0.15
|
m_GradationScale: 0.15
|
||||||
m_GradationRotation: 135
|
m_GradationRotation: 135
|
||||||
|
m_GradationWrapMode: 0
|
||||||
|
m_GradationReverse: 0
|
||||||
m_AllowToModifyMeshShape: 1
|
m_AllowToModifyMeshShape: 1
|
||||||
m_EdgeMode: 2
|
m_EdgeMode: 2
|
||||||
m_EdgeWidth: 0.05
|
m_EdgeWidth: 0.05
|
||||||
@@ -615,10 +640,13 @@ MonoBehaviour:
|
|||||||
m_DetailThreshold:
|
m_DetailThreshold:
|
||||||
m_Min: 0
|
m_Min: 0
|
||||||
m_Max: 1
|
m_Max: 1
|
||||||
|
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_DetailTex: {fileID: 0}
|
m_DetailTex: {fileID: 0}
|
||||||
m_DetailTexScale: {x: 1, y: 1}
|
m_DetailTexScale: {x: 1, y: 1}
|
||||||
m_DetailTexOffset: {x: 0, y: 0}
|
m_DetailTexOffset: {x: 0, y: 0}
|
||||||
m_DetailTexSpeed: {x: 0, y: 0}
|
m_DetailTexSpeed: {x: 0, y: 0}
|
||||||
|
m_RoundCornerMode: 0
|
||||||
|
m_RoundCornerRadius: {x: 20, y: 20, z: 20, w: 20}
|
||||||
m_CustomRoot: {fileID: 0}
|
m_CustomRoot: {fileID: 0}
|
||||||
m_Flip: 0
|
m_Flip: 0
|
||||||
--- !u!114 &1120943173
|
--- !u!114 &1120943173
|
||||||
@@ -689,7 +717,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2125393230}
|
- {fileID: 2125393230}
|
||||||
m_Father: {fileID: 986199155}
|
m_Father: {fileID: 986199155}
|
||||||
@@ -790,7 +817,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_ToneFilter: 1
|
m_ToneFilter: 1
|
||||||
m_ToneIntensity: 0.875
|
m_ToneIntensity: 0.875
|
||||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_ColorFilter: 1
|
m_ColorFilter: 1
|
||||||
m_ColorIntensity: 0.7
|
m_ColorIntensity: 0.7
|
||||||
m_Color: {r: 1, g: 0.08701122, b: 0, a: 1}
|
m_Color: {r: 1, g: 0.08701122, b: 0, a: 1}
|
||||||
@@ -818,6 +844,35 @@ MonoBehaviour:
|
|||||||
m_TransitionColorGlow: 1
|
m_TransitionColorGlow: 1
|
||||||
m_TransitionPatternReverse: 0
|
m_TransitionPatternReverse: 0
|
||||||
m_TransitionAutoPlaySpeed: 0
|
m_TransitionAutoPlaySpeed: 0
|
||||||
|
m_TransitionGradient:
|
||||||
|
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_TargetMode: 1
|
m_TargetMode: 1
|
||||||
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
||||||
m_TargetRange: 0.118
|
m_TargetRange: 0.118
|
||||||
@@ -873,6 +928,8 @@ MonoBehaviour:
|
|||||||
m_GradationOffset: 0
|
m_GradationOffset: 0
|
||||||
m_GradationScale: 1
|
m_GradationScale: 1
|
||||||
m_GradationRotation: 60
|
m_GradationRotation: 60
|
||||||
|
m_GradationWrapMode: 0
|
||||||
|
m_GradationReverse: 0
|
||||||
m_AllowToModifyMeshShape: 1
|
m_AllowToModifyMeshShape: 1
|
||||||
m_EdgeMode: 2
|
m_EdgeMode: 2
|
||||||
m_EdgeWidth: 0.5
|
m_EdgeWidth: 0.5
|
||||||
@@ -888,10 +945,13 @@ MonoBehaviour:
|
|||||||
m_DetailThreshold:
|
m_DetailThreshold:
|
||||||
m_Min: 0.25
|
m_Min: 0.25
|
||||||
m_Max: 0.5
|
m_Max: 0.5
|
||||||
|
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_DetailTex: {fileID: 2800000, guid: dee1cb6c2ee294c6087ea9d89d368417, type: 3}
|
m_DetailTex: {fileID: 2800000, guid: dee1cb6c2ee294c6087ea9d89d368417, type: 3}
|
||||||
m_DetailTexScale: {x: 1, y: 1}
|
m_DetailTexScale: {x: 1, y: 1}
|
||||||
m_DetailTexOffset: {x: 0, y: 0}
|
m_DetailTexOffset: {x: 0, y: 0}
|
||||||
m_DetailTexSpeed: {x: 0, y: 0}
|
m_DetailTexSpeed: {x: 0, y: 0}
|
||||||
|
m_RoundCornerMode: 1
|
||||||
|
m_RoundCornerRadius: {x: 20, y: 20, z: 20, w: 20}
|
||||||
m_CustomRoot: {fileID: 2125393230}
|
m_CustomRoot: {fileID: 2125393230}
|
||||||
m_Flip: 1
|
m_Flip: 1
|
||||||
--- !u!114 &1242517207
|
--- !u!114 &1242517207
|
||||||
@@ -962,7 +1022,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 986199155}
|
m_Father: {fileID: 986199155}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
@@ -986,7 +1045,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_ToneFilter: 1
|
m_ToneFilter: 1
|
||||||
m_ToneIntensity: 1
|
m_ToneIntensity: 1
|
||||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_ColorFilter: 0
|
m_ColorFilter: 0
|
||||||
m_ColorIntensity: 1
|
m_ColorIntensity: 1
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
@@ -1014,6 +1072,35 @@ MonoBehaviour:
|
|||||||
m_TransitionColorGlow: 0
|
m_TransitionColorGlow: 0
|
||||||
m_TransitionPatternReverse: 0
|
m_TransitionPatternReverse: 0
|
||||||
m_TransitionAutoPlaySpeed: 0
|
m_TransitionAutoPlaySpeed: 0
|
||||||
|
m_TransitionGradient:
|
||||||
|
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_TargetMode: 0
|
m_TargetMode: 0
|
||||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_TargetRange: 0.1
|
m_TargetRange: 0.1
|
||||||
@@ -1069,6 +1156,8 @@ MonoBehaviour:
|
|||||||
m_GradationOffset: 0
|
m_GradationOffset: 0
|
||||||
m_GradationScale: 1
|
m_GradationScale: 1
|
||||||
m_GradationRotation: 0
|
m_GradationRotation: 0
|
||||||
|
m_GradationWrapMode: 0
|
||||||
|
m_GradationReverse: 0
|
||||||
m_AllowToModifyMeshShape: 1
|
m_AllowToModifyMeshShape: 1
|
||||||
m_EdgeMode: 0
|
m_EdgeMode: 0
|
||||||
m_EdgeWidth: 0.5
|
m_EdgeWidth: 0.5
|
||||||
@@ -1084,10 +1173,13 @@ MonoBehaviour:
|
|||||||
m_DetailThreshold:
|
m_DetailThreshold:
|
||||||
m_Min: 0
|
m_Min: 0
|
||||||
m_Max: 1
|
m_Max: 1
|
||||||
|
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_DetailTex: {fileID: 0}
|
m_DetailTex: {fileID: 0}
|
||||||
m_DetailTexScale: {x: 1, y: 1}
|
m_DetailTexScale: {x: 1, y: 1}
|
||||||
m_DetailTexOffset: {x: 0, y: 0}
|
m_DetailTexOffset: {x: 0, y: 0}
|
||||||
m_DetailTexSpeed: {x: 0, y: 0}
|
m_DetailTexSpeed: {x: 0, y: 0}
|
||||||
|
m_RoundCornerMode: 0
|
||||||
|
m_RoundCornerRadius: {x: 20, y: 20, z: 20, w: 20}
|
||||||
m_CustomRoot: {fileID: 0}
|
m_CustomRoot: {fileID: 0}
|
||||||
m_Flip: 0
|
m_Flip: 0
|
||||||
--- !u!114 &1567169364
|
--- !u!114 &1567169364
|
||||||
@@ -1230,7 +1322,6 @@ RectTransform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1242517204}
|
m_Father: {fileID: 1242517204}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
|
|||||||
@@ -0,0 +1,286 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!28 &-6111546302731763495
|
||||||
|
Texture2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: NotoSansJP-Regular Atlas
|
||||||
|
m_ImageContentsHash:
|
||||||
|
serializedVersion: 2
|
||||||
|
Hash: 00000000000000000000000000000000
|
||||||
|
m_ForcedFallbackFormat: 4
|
||||||
|
m_DownscaleFallback: 0
|
||||||
|
m_IsAlphaChannelOptional: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Width: 0
|
||||||
|
m_Height: 0
|
||||||
|
m_CompleteImageSize: 0
|
||||||
|
m_MipsStripped: 0
|
||||||
|
m_TextureFormat: 1
|
||||||
|
m_MipCount: 1
|
||||||
|
m_IsReadable: 1
|
||||||
|
m_IsPreProcessed: 0
|
||||||
|
m_IgnoreMasterTextureLimit: 0
|
||||||
|
m_StreamingMipmaps: 0
|
||||||
|
m_StreamingMipmapsPriority: 0
|
||||||
|
m_VTOnly: 0
|
||||||
|
m_AlphaIsTransparency: 0
|
||||||
|
m_ImageCount: 1
|
||||||
|
m_TextureDimension: 2
|
||||||
|
m_TextureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_FilterMode: 1
|
||||||
|
m_Aniso: 1
|
||||||
|
m_MipBias: 0
|
||||||
|
m_WrapU: 0
|
||||||
|
m_WrapV: 0
|
||||||
|
m_WrapW: 0
|
||||||
|
m_LightmapFormat: 0
|
||||||
|
m_ColorSpace: 0
|
||||||
|
m_PlatformBlob:
|
||||||
|
image data: 0
|
||||||
|
_typelessdata:
|
||||||
|
m_StreamData:
|
||||||
|
serializedVersion: 2
|
||||||
|
offset: 0
|
||||||
|
size: 0
|
||||||
|
path:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
|
||||||
|
m_Name: NotoSansJP-Regular SDF - Dynamic
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
hashCode: -1410962959
|
||||||
|
material: {fileID: 444162133241932390}
|
||||||
|
materialHashCode: -1336267599
|
||||||
|
m_Version: 1.1.0
|
||||||
|
m_SourceFontFileGUID: 3b86b3f5141924393b3a212d6a5ec9e0
|
||||||
|
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: 3b86b3f5141924393b3a212d6a5ec9e0,
|
||||||
|
type: 3}
|
||||||
|
m_SourceFontFile: {fileID: 12800000, guid: 3b86b3f5141924393b3a212d6a5ec9e0, type: 3}
|
||||||
|
m_AtlasPopulationMode: 1
|
||||||
|
m_FaceInfo:
|
||||||
|
m_FaceIndex: 0
|
||||||
|
m_FamilyName: Noto Sans JP
|
||||||
|
m_StyleName: Regular
|
||||||
|
m_PointSize: 24
|
||||||
|
m_Scale: 1
|
||||||
|
m_LineHeight: 34.752
|
||||||
|
m_AscentLine: 27.839998
|
||||||
|
m_CapLine: 18
|
||||||
|
m_MeanLine: 14
|
||||||
|
m_Baseline: 0
|
||||||
|
m_DescentLine: -6.9119997
|
||||||
|
m_SuperscriptOffset: 27.839998
|
||||||
|
m_SuperscriptSize: 0.5
|
||||||
|
m_SubscriptOffset: -6.9119997
|
||||||
|
m_SubscriptSize: 0.5
|
||||||
|
m_UnderlineOffset: -3.6
|
||||||
|
m_UnderlineThickness: 1.1999999
|
||||||
|
m_StrikethroughOffset: 5.6
|
||||||
|
m_StrikethroughThickness: 1.1999999
|
||||||
|
m_TabWidth: 5
|
||||||
|
m_GlyphTable: []
|
||||||
|
m_CharacterTable: []
|
||||||
|
m_AtlasTextures:
|
||||||
|
- {fileID: -6111546302731763495}
|
||||||
|
m_AtlasTextureIndex: 0
|
||||||
|
m_IsMultiAtlasTexturesEnabled: 0
|
||||||
|
m_ClearDynamicDataOnBuild: 1
|
||||||
|
m_UsedGlyphRects: []
|
||||||
|
m_FreeGlyphRects:
|
||||||
|
- m_X: 0
|
||||||
|
m_Y: 0
|
||||||
|
m_Width: 1023
|
||||||
|
m_Height: 1023
|
||||||
|
m_fontInfo:
|
||||||
|
Name:
|
||||||
|
PointSize: 0
|
||||||
|
Scale: 0
|
||||||
|
CharacterCount: 0
|
||||||
|
LineHeight: 0
|
||||||
|
Baseline: 0
|
||||||
|
Ascender: 0
|
||||||
|
CapHeight: 0
|
||||||
|
Descender: 0
|
||||||
|
CenterLine: 0
|
||||||
|
SuperscriptOffset: 0
|
||||||
|
SubscriptOffset: 0
|
||||||
|
SubSize: 0
|
||||||
|
Underline: 0
|
||||||
|
UnderlineThickness: 0
|
||||||
|
strikethrough: 0
|
||||||
|
strikethroughThickness: 0
|
||||||
|
TabWidth: 0
|
||||||
|
Padding: 0
|
||||||
|
AtlasWidth: 0
|
||||||
|
AtlasHeight: 0
|
||||||
|
atlas: {fileID: 0}
|
||||||
|
m_AtlasWidth: 1024
|
||||||
|
m_AtlasHeight: 1024
|
||||||
|
m_AtlasPadding: 9
|
||||||
|
m_AtlasRenderMode: 4165
|
||||||
|
m_glyphInfoList: []
|
||||||
|
m_KerningTable:
|
||||||
|
kerningPairs: []
|
||||||
|
m_FontFeatureTable:
|
||||||
|
m_GlyphPairAdjustmentRecords: []
|
||||||
|
fallbackFontAssets: []
|
||||||
|
m_FallbackFontAssetTable: []
|
||||||
|
m_CreationSettings:
|
||||||
|
sourceFontFileName:
|
||||||
|
sourceFontFileGUID: 3b86b3f5141924393b3a212d6a5ec9e0
|
||||||
|
pointSizeSamplingMode: 0
|
||||||
|
pointSize: 24
|
||||||
|
padding: 9
|
||||||
|
packingMode: 0
|
||||||
|
atlasWidth: 1024
|
||||||
|
atlasHeight: 1024
|
||||||
|
characterSetSelectionMode: 7
|
||||||
|
characterSequence:
|
||||||
|
referencedFontAssetGUID:
|
||||||
|
referencedTextAssetGUID:
|
||||||
|
fontStyle: 0
|
||||||
|
fontStyleModifier: 0
|
||||||
|
renderMode: 4165
|
||||||
|
includeFontFeatures: 0
|
||||||
|
m_FontWeightTable:
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
- regularTypeface: {fileID: 0}
|
||||||
|
italicTypeface: {fileID: 0}
|
||||||
|
fontWeights: []
|
||||||
|
normalStyle: 0
|
||||||
|
normalSpacingOffset: 0
|
||||||
|
boldStyle: 0.75
|
||||||
|
boldSpacing: 7
|
||||||
|
italicStyle: 35
|
||||||
|
tabSize: 10
|
||||||
|
--- !u!21 &444162133241932390
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: NotoSansJP-Regular Atlas Material
|
||||||
|
m_Shader: {fileID: 4800000, guid: 68e6db2ebdc24f95958faec2be5558d6, type: 3}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
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: -6111546302731763495}
|
||||||
|
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_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: 1
|
||||||
|
- _ScaleRatioB: 1
|
||||||
|
- _ScaleRatioC: 1
|
||||||
|
- _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: []
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9379b7b2236ab4c0e9f8d9f7db9936a8
|
guid: 4c1191089341846fcb754b6aab3dd435
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 11400000
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 52ffdb2a86f414090abb93192f599f6f
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3b86b3f5141924393b3a212d6a5ec9e0
|
||||||
|
TrueTypeFontImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
fontSize: 16
|
||||||
|
forceTextureCase: -2
|
||||||
|
characterSpacing: 0
|
||||||
|
characterPadding: 1
|
||||||
|
includeFontData: 1
|
||||||
|
fontNames:
|
||||||
|
- Noto Sans JP
|
||||||
|
fallbackFontReferences: []
|
||||||
|
customCharacters:
|
||||||
|
fontRenderingMode: 0
|
||||||
|
ascentCalculationMode: 1
|
||||||
|
useLegacyBoundsCalculation: 0
|
||||||
|
shouldRoundAdvanceValue: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ebc947de92b024b329663fe914a7d168
|
guid: 064c6ea9a4d6f4cc1938d0878e91e3d6
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
@@ -1 +0,0 @@
|
|||||||
../Packages/src/Samples~
|
|
||||||
@@ -5,14 +5,14 @@
|
|||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "git",
|
"source": "git",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
"hash": "d5d12cb14184509b0d4ab12fa22dd3e6f6b50f16"
|
||||||
},
|
},
|
||||||
"com.coffee.minimal-resource": {
|
"com.coffee.minimal-resource": {
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "git",
|
"source": "git",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
"hash": "d5d12cb14184509b0d4ab12fa22dd3e6f6b50f16"
|
||||||
},
|
},
|
||||||
"com.coffee.nano-monitor": {
|
"com.coffee.nano-monitor": {
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ugui": "1.0.0"
|
"com.unity.ugui": "1.0.0"
|
||||||
},
|
},
|
||||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
"hash": "d5d12cb14184509b0d4ab12fa22dd3e6f6b50f16"
|
||||||
},
|
},
|
||||||
"com.coffee.symbolic-linker": {
|
"com.coffee.symbolic-linker": {
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "git",
|
"source": "git",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
"hash": "d5d12cb14184509b0d4ab12fa22dd3e6f6b50f16"
|
||||||
},
|
},
|
||||||
"com.coffee.ui-effect": {
|
"com.coffee.ui-effect": {
|
||||||
"version": "file:src",
|
"version": "file:src",
|
||||||
|
|||||||
@@ -12,13 +12,28 @@
|
|||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/changelog",
|
"@semantic-release/changelog",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"prepareCmd": "node ./Samples~/sync-sample-package-versions.js ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"@semantic-release/npm",
|
"@semantic-release/npm",
|
||||||
{
|
{
|
||||||
"npmPublish": false
|
"npmPublish": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@semantic-release/git",
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"CHANGELOG.md",
|
||||||
|
"package.json",
|
||||||
|
"Samples~/**/package.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"@semantic-release/github"
|
"@semantic-release/github"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,116 @@
|
|||||||
|
# [5.15.0](https://github.com/mob-sakai/UIEffect/compare/5.14.1...5.15.0) (2026-11-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add `Round Corner` feature ([417e92c](https://github.com/mob-sakai/UIEffect/commit/417e92cebadfcbd0063d32aa8fc32716d94dbc2f)), closes [#403](https://github.com/mob-sakai/UIEffect/issues/403)
|
||||||
|
|
||||||
|
## [5.14.1](https://github.com/mob-sakai/UIEffect/compare/5.14.0...5.14.1) (2026-11-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* queue TextMeshPro parent for submesh rebuild ([240ac6b](https://github.com/mob-sakai/UIEffect/commit/240ac6b206229dfcdba7a3f38341ae9b198aff6f)), closes [#416](https://github.com/mob-sakai/UIEffect/issues/416)
|
||||||
|
|
||||||
|
# [5.14.0](https://github.com/mob-sakai/UIEffect/compare/5.13.0...5.14.0) (2026-11-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* output colors for gradients are incorrect when `enableColorCorrection=true` ([587ff28](https://github.com/mob-sakai/UIEffect/commit/587ff28e91d229baa5c56d0ac58030b44ddf7271))
|
||||||
|
* paste color is incorrect when `enableColorCorrection=true` ([7be2bf4](https://github.com/mob-sakai/UIEffect/commit/7be2bf463dc91feb41d4585841ddc489f0302433))
|
||||||
|
* picked color is incorrect when `enableColorCorrection=true` ([8d906a7](https://github.com/mob-sakai/UIEffect/commit/8d906a78365147833c8d9ba58224c7819a957d4d))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* improve CSS gradient paste handling ([50c0e47](https://github.com/mob-sakai/UIEffect/commit/50c0e475ca9c77fe4584f8be8478e243fb193c6f)), closes [#415](https://github.com/mob-sakai/UIEffect/issues/415)
|
||||||
|
|
||||||
|
# [5.13.0](https://github.com/mob-sakai/UIEffect/compare/5.12.1...5.13.0) (2026-11-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add gradient reverse button ([78f7c2f](https://github.com/mob-sakai/UIEffect/commit/78f7c2f789fb4af0ad2eb7accfb111eb9adccd4e))
|
||||||
|
* add paste color/gradient button (from css code) ([fd1e9bc](https://github.com/mob-sakai/UIEffect/commit/fd1e9bcaf2fc4a620c7902243df1115306c43c70)), closes [#389](https://github.com/mob-sakai/UIEffect/issues/389)
|
||||||
|
|
||||||
|
## [5.12.1](https://github.com/mob-sakai/UIEffect/compare/5.12.0...5.12.1) (2026-11-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Added an option to Project Settings to disable color correction and revert to the color output used in version 5.11.8 or earlier ([aa0bf72](https://github.com/mob-sakai/UIEffect/commit/aa0bf72bd429eb2aa173f316e5863bb9bee2eb4e)), closes [#414](https://github.com/mob-sakai/UIEffect/issues/414)
|
||||||
|
|
||||||
|
# [5.12.0](https://github.com/mob-sakai/UIEffect/compare/5.11.10...5.12.0) (2026-11-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* "Additional Resource" can be installed as a package instead of importing as a sample ([afbfcdd](https://github.com/mob-sakai/UIEffect/commit/afbfcdd40c5775390643d9c649e2bc1f223148f8))
|
||||||
|
|
||||||
|
## [5.11.10](https://github.com/mob-sakai/UIEffect/compare/5.11.9...5.11.10) (2026-11-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* added "Show Readme" to the auto-import menu ([27629cd](https://github.com/mob-sakai/UIEffect/commit/27629cdd7c9dd64c053a92fcd69119efffe4a127))
|
||||||
|
* fix font path in demo ([3ca1214](https://github.com/mob-sakai/UIEffect/commit/3ca121423382668eee335fbb8bf8308b7f04159b))
|
||||||
|
* fix potential NPE in code ([6e8aaf3](https://github.com/mob-sakai/UIEffect/commit/6e8aaf36f00e4a42f7b9d6f79e065d4022b567c2))
|
||||||
|
* fix potential NPE in code ([d41d1ad](https://github.com/mob-sakai/UIEffect/commit/d41d1ad21f3b4ce38bb1fae870cf8621ed61a1e8))
|
||||||
|
* fix project setting inspector ([d359086](https://github.com/mob-sakai/UIEffect/commit/d359086ed4baaf2bc0bfb64742492e3ea6d6d4b6))
|
||||||
|
|
||||||
|
## [5.11.9](https://github.com/mob-sakai/UIEffect/compare/5.11.8...5.11.9) (2026-11-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* color filter does not reflect the correct color space. ([6cbb793](https://github.com/mob-sakai/UIEffect/commit/6cbb793d8d421a14c6c694ea08914506607171fc)), closes [#409](https://github.com/mob-sakai/UIEffect/issues/409)
|
||||||
|
* improve tweener editor ([4a49e9a](https://github.com/mob-sakai/UIEffect/commit/4a49e9a8b22e7c77851eef6810c3106e716cbb93))
|
||||||
|
* support Unity 6.6+ with ShaderGraph package ([e856b0b](https://github.com/mob-sakai/UIEffect/commit/e856b0b9396025c3352054e65b090421ab2e3b40))
|
||||||
|
* tweener does not affect multi-font glyphs (TMP_SubMeshUI) ([485e2df](https://github.com/mob-sakai/UIEffect/commit/485e2df9fc305db20aa473972f4a11e219cac7be)), closes [#413](https://github.com/mob-sakai/UIEffect/issues/413)
|
||||||
|
|
||||||
|
## [5.11.8](https://github.com/mob-sakai/UIEffect/compare/5.11.7...5.11.8) (2026-11-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove conflicting FormerlySerializedAs on UIEffectTweener.m_PlayOnEnable ([55a7f27](https://github.com/mob-sakai/UIEffect/commit/55a7f272042e869e6659f7a2603f9a16dbb3ab65))
|
||||||
|
|
||||||
|
## [5.11.7](https://github.com/mob-sakai/UIEffect/compare/5.11.6...5.11.7) (2026-08-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* ignore shader registry order changes ([014bba3](https://github.com/mob-sakai/UIEffect/commit/014bba3f5687ecfe41caa00d454f196baf7e3483)), closes [#407](https://github.com/mob-sakai/UIEffect/issues/407)
|
||||||
|
|
||||||
|
## [5.11.6](https://github.com/mob-sakai/UIEffect/compare/5.11.5...5.11.6) (2026-08-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* refresh material when changing shadow mode ([8bb782c](https://github.com/mob-sakai/UIEffect/commit/8bb782c90afb42d6569d8dfcfe022b007171f97e))
|
||||||
|
|
||||||
|
## [5.11.5](https://github.com/mob-sakai/UIEffect/compare/5.11.4...5.11.5) (2026-07-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix memory leak ([2dcb7f7](https://github.com/mob-sakai/UIEffect/commit/2dcb7f7e8678a2ffcf3832d0c5011aa1da6c3677)), closes [#405](https://github.com/mob-sakai/UIEffect/issues/405)
|
||||||
|
|
||||||
|
## [5.11.4](https://github.com/mob-sakai/UIEffect/compare/5.11.3...5.11.4) (2026-07-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* infinite asset import loop caused by unchanged ProjectSettings being marked dirty ([dbf8ae0](https://github.com/mob-sakai/UIEffect/commit/dbf8ae00f50470912d458fda853a34ef94d7d533)), closes [#404](https://github.com/mob-sakai/UIEffect/issues/404)
|
||||||
|
|
||||||
|
## [5.11.3](https://github.com/mob-sakai/UIEffect/compare/5.11.2...5.11.3) (2026-07-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* TextMeshPro support is not working ([9d98096](https://github.com/mob-sakai/UIEffect/commit/9d980961d6cf45e519ad96bf2e7260ed515f0f70)), closes [#402](https://github.com/mob-sakai/UIEffect/issues/402)
|
||||||
|
|
||||||
## [5.11.2](https://github.com/mob-sakai/UIEffect/compare/5.11.1...5.11.2) (2026-07-02)
|
## [5.11.2](https://github.com/mob-sakai/UIEffect/compare/5.11.1...5.11.2) (2026-07-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 69f569585a2b5439b830cc115efdf867
|
guid: 195d371d8be894451a95368b19109420
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,109 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8c562a51524754926a36370d17d4b181
|
||||||
|
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
|
||||||
|
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: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 2
|
||||||
|
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: 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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -20,11 +20,10 @@ TextureImporter:
|
|||||||
externalNormalMap: 0
|
externalNormalMap: 0
|
||||||
heightScale: 0.25
|
heightScale: 0.25
|
||||||
normalMapFilter: 0
|
normalMapFilter: 0
|
||||||
isReadable: 1
|
isReadable: 0
|
||||||
streamingMipmaps: 0
|
streamingMipmaps: 0
|
||||||
streamingMipmapsPriority: 0
|
streamingMipmapsPriority: 0
|
||||||
vTOnly: 0
|
vTOnly: 0
|
||||||
ignoreMasterTextureLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
grayScaleToAlpha: 0
|
||||||
generateCubemap: 6
|
generateCubemap: 6
|
||||||
cubemapConvolution: 0
|
cubemapConvolution: 0
|
||||||
@@ -91,9 +90,9 @@ TextureImporter:
|
|||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
buildTarget: Standalone
|
buildTarget: Standalone
|
||||||
maxTextureSize: 64
|
maxTextureSize: 2048
|
||||||
resizeAlgorithm: 0
|
resizeAlgorithm: 0
|
||||||
textureFormat: 12
|
textureFormat: -1
|
||||||
textureCompression: 1
|
textureCompression: 1
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
crunchedCompression: 0
|
crunchedCompression: 0
|
||||||
@@ -150,7 +149,6 @@ TextureImporter:
|
|||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
nameFileIdTable: {}
|
|
||||||
spritePackingTag:
|
spritePackingTag:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
|
After Width: | Height: | Size: 522 B |
@@ -0,0 +1,109 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b776aab5f71a54c63afd46d6987707e7
|
||||||
|
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
|
||||||
|
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: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 2
|
||||||
|
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: 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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Coffee.UIEffects.Editors
|
||||||
|
{
|
||||||
|
internal static class PasteColorUtil
|
||||||
|
{
|
||||||
|
internal const string SupportedFormats =
|
||||||
|
"hex values (#RGB, #RRGGBB, #RGBA, #RRGGBBAA), Unity-supported color names, transparent, rgb(), and rgba()";
|
||||||
|
|
||||||
|
internal static void PasteFromClipboard(SerializedProperty color)
|
||||||
|
{
|
||||||
|
var clipboard = GUIUtility.systemCopyBuffer;
|
||||||
|
if (!TryParseColor(clipboard, out var value))
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Paste Color",
|
||||||
|
$"Supported formats are {SupportedFormats}, or CSS background/background-color declarations containing one of these values.",
|
||||||
|
"OK");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
color.colorValue = ApplyPasteColorCorrection(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static bool TryParseColor(string text, out Color color)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
|
{
|
||||||
|
color = default;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TryExtractCssColorValue(text, out var cssColor))
|
||||||
|
{
|
||||||
|
text = cssColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
text = text.Trim();
|
||||||
|
if (text.Equals("transparent", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
color = Color.clear;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ColorUtility.TryParseHtmlString(text, out color))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var openIndex = text.IndexOf('(');
|
||||||
|
if (openIndex < 0 || text[text.Length - 1] != ')')
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var function = text.Substring(0, openIndex).Trim();
|
||||||
|
var isRgba = function.Equals("rgba", StringComparison.OrdinalIgnoreCase);
|
||||||
|
if (!isRgba && !function.Equals("rgb", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var components = text.Substring(openIndex + 1, text.Length - openIndex - 2)
|
||||||
|
.Split(new[] { ' ', '\t', '\r', '\n', ',', '/' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (components.Length != 3 && components.Length != 4)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((isRgba && components.Length != 4)
|
||||||
|
|| !TryParseRgbComponent(components[0], out var red)
|
||||||
|
|| !TryParseRgbComponent(components[1], out var green)
|
||||||
|
|| !TryParseRgbComponent(components[2], out var blue))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var alpha = 1f;
|
||||||
|
if (components.Length == 4 && !TryParseAlphaComponent(components[3], out alpha))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
color = new Color(red, green, blue, alpha);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Color ApplyPasteColorCorrection(Color color)
|
||||||
|
{
|
||||||
|
return UIEffectProjectSettings.enableColorCorrection ? color.linear : color;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryExtractCssColorValue(string text, out string value)
|
||||||
|
{
|
||||||
|
foreach (var declaration in text.Split(';'))
|
||||||
|
{
|
||||||
|
var separatorIndex = declaration.IndexOf(':');
|
||||||
|
if (separatorIndex < 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var property = declaration.Substring(0, separatorIndex).Trim();
|
||||||
|
var commentEndIndex = property.LastIndexOf("*/", StringComparison.Ordinal);
|
||||||
|
if (commentEndIndex >= 0)
|
||||||
|
{
|
||||||
|
property = property.Substring(commentEndIndex + 2).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (property.Equals("background", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| property.Equals("background-color", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
value = declaration.Substring(separatorIndex + 1).Trim();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
value = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryParseRgbComponent(string text, out float value)
|
||||||
|
{
|
||||||
|
var isPercentage = text.EndsWith("%", StringComparison.Ordinal);
|
||||||
|
if (!float.TryParse(isPercentage ? text.Substring(0, text.Length - 1) : text,
|
||||||
|
NumberStyles.Float, CultureInfo.InvariantCulture, out value)
|
||||||
|
|| float.IsNaN(value) || float.IsInfinity(value))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = Mathf.Clamp01(isPercentage ? value / 100f : value / 255f);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryParseAlphaComponent(string text, out float value)
|
||||||
|
{
|
||||||
|
var isPercentage = text.EndsWith("%", StringComparison.Ordinal);
|
||||||
|
if (!float.TryParse(isPercentage ? text.Substring(0, text.Length - 1) : text,
|
||||||
|
NumberStyles.Float, CultureInfo.InvariantCulture, out value)
|
||||||
|
|| float.IsNaN(value) || float.IsInfinity(value))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = Mathf.Clamp01(isPercentage ? value / 100f : value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e2fe72e593aed4b90a864e52a745a813
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,387 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Coffee.UIEffects.Editors
|
||||||
|
{
|
||||||
|
internal static class PasteGradientUtil
|
||||||
|
{
|
||||||
|
private struct GradientStop
|
||||||
|
{
|
||||||
|
public Color color;
|
||||||
|
public float? position;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void PasteFromClipboard(SerializedProperty property,
|
||||||
|
Action<SerializedProperty, Gradient> setGradient,
|
||||||
|
SerializedProperty gradationMode,
|
||||||
|
SerializedProperty gradationRotation,
|
||||||
|
SerializedProperty gradationOffset,
|
||||||
|
SerializedProperty gradationScale,
|
||||||
|
SerializedProperty gradationWrapMode,
|
||||||
|
SerializedProperty gradationReverse)
|
||||||
|
{
|
||||||
|
var clipboard = GUIUtility.systemCopyBuffer;
|
||||||
|
if (!TryParseCssGradient(clipboard, out var value, out var mode, out var rotation))
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Paste Gradient",
|
||||||
|
"The clipboard does not contain a supported CSS linear-gradient(...) or radial-gradient(...) value.",
|
||||||
|
"OK");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
value.mode = GradientMode.Blend;
|
||||||
|
setGradient(property, value);
|
||||||
|
gradationMode.intValue = (int)mode;
|
||||||
|
gradationWrapMode.intValue = (int)(mode == GradationMode.RadialGradient
|
||||||
|
? TextureWrapMode.Clamp
|
||||||
|
: TextureWrapMode.Repeat);
|
||||||
|
if (rotation.HasValue)
|
||||||
|
{
|
||||||
|
gradationRotation.floatValue = rotation.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradationOffset.floatValue = 0;
|
||||||
|
gradationScale.floatValue = 1;
|
||||||
|
gradationReverse.boolValue = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryParseCssGradient(string text, out Gradient gradient, out GradationMode mode,
|
||||||
|
out float? rotation)
|
||||||
|
{
|
||||||
|
gradient = null;
|
||||||
|
mode = GradationMode.None;
|
||||||
|
rotation = null;
|
||||||
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
text = text.Trim();
|
||||||
|
var linearIndex = text.IndexOf("linear-gradient(", StringComparison.OrdinalIgnoreCase);
|
||||||
|
var radialIndex = text.IndexOf("radial-gradient(", StringComparison.OrdinalIgnoreCase);
|
||||||
|
var functionIndex = linearIndex < 0
|
||||||
|
? radialIndex
|
||||||
|
: radialIndex < 0
|
||||||
|
? linearIndex
|
||||||
|
: Math.Min(linearIndex, radialIndex);
|
||||||
|
if (functionIndex < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
text = text.Substring(functionIndex);
|
||||||
|
var openIndex = text.IndexOf('(');
|
||||||
|
if (openIndex < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var functionName = text.Substring(0, openIndex).Trim();
|
||||||
|
var isRadial = functionName.Equals("radial-gradient", StringComparison.OrdinalIgnoreCase);
|
||||||
|
if (!isRadial && !functionName.Equals("linear-gradient", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
mode = isRadial ? GradationMode.RadialGradient : GradationMode.AngleGradient;
|
||||||
|
|
||||||
|
var depth = 0;
|
||||||
|
var closeIndex = -1;
|
||||||
|
for (var i = openIndex; i < text.Length; i++)
|
||||||
|
{
|
||||||
|
if (text[i] == '(')
|
||||||
|
{
|
||||||
|
depth++;
|
||||||
|
}
|
||||||
|
else if (text[i] == ')')
|
||||||
|
{
|
||||||
|
depth--;
|
||||||
|
if (depth < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (depth == 0)
|
||||||
|
{
|
||||||
|
closeIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (closeIndex < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var arguments = new List<string>();
|
||||||
|
if (!TrySplitGradientArguments(text.Substring(openIndex + 1, closeIndex - openIndex - 1), arguments)
|
||||||
|
|| arguments.Count < 2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var firstStopIndex = 0;
|
||||||
|
if (!TryParseGradientStop(arguments[0], out _)
|
||||||
|
&& (isRadial || IsGradientDirection(arguments[0])))
|
||||||
|
{
|
||||||
|
firstStopIndex = 1;
|
||||||
|
if (!isRadial && TryParseLinearGradientAngle(arguments[0], out var cssAngle))
|
||||||
|
{
|
||||||
|
rotation = Mathf.Repeat(cssAngle - 90, 360);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var stops = new List<GradientStop>();
|
||||||
|
for (var i = firstStopIndex; i < arguments.Count; i++)
|
||||||
|
{
|
||||||
|
if (!TryParseGradientStop(arguments[i], out var stop))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
stops.Add(stop);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stops.Count < 2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stops[0].position.HasValue)
|
||||||
|
{
|
||||||
|
stops[0] = SetStopPosition(stops[0], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var lastStopIndex = stops.Count - 1;
|
||||||
|
if (!stops[lastStopIndex].position.HasValue)
|
||||||
|
{
|
||||||
|
stops[lastStopIndex] = SetStopPosition(stops[lastStopIndex], 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var previousPositionIndex = 0;
|
||||||
|
for (var i = 1; i < stops.Count; i++)
|
||||||
|
{
|
||||||
|
if (!stops[i].position.HasValue)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var previousPosition = stops[previousPositionIndex].position.Value;
|
||||||
|
var currentPosition = stops[i].position.Value;
|
||||||
|
var interval = i - previousPositionIndex;
|
||||||
|
for (var j = 1; j < interval; j++)
|
||||||
|
{
|
||||||
|
var position = Mathf.Lerp(previousPosition, currentPosition, (float)j / interval);
|
||||||
|
stops[previousPositionIndex + j] =
|
||||||
|
SetStopPosition(stops[previousPositionIndex + j], position);
|
||||||
|
}
|
||||||
|
|
||||||
|
previousPositionIndex = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
var colorKeys = new GradientColorKey[stops.Count];
|
||||||
|
var alphaKeys = new GradientAlphaKey[stops.Count];
|
||||||
|
var previousTime = 0f;
|
||||||
|
for (var i = 0; i < stops.Count; i++)
|
||||||
|
{
|
||||||
|
var stop = stops[i];
|
||||||
|
var time = Mathf.Clamp01(stop.position.Value);
|
||||||
|
time = Mathf.Max(previousTime, time);
|
||||||
|
colorKeys[i] = new GradientColorKey(new Color(stop.color.r, stop.color.g, stop.color.b), time);
|
||||||
|
alphaKeys[i] = new GradientAlphaKey(stop.color.a, time);
|
||||||
|
previousTime = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradient = new Gradient();
|
||||||
|
gradient.SetKeys(colorKeys, alphaKeys);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TrySplitGradientArguments(string text, List<string> arguments)
|
||||||
|
{
|
||||||
|
var depth = 0;
|
||||||
|
var argumentStart = 0;
|
||||||
|
for (var i = 0; i < text.Length; i++)
|
||||||
|
{
|
||||||
|
if (text[i] == '(')
|
||||||
|
{
|
||||||
|
depth++;
|
||||||
|
}
|
||||||
|
else if (text[i] == ')')
|
||||||
|
{
|
||||||
|
depth--;
|
||||||
|
if (depth < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (text[i] == ',' && depth == 0)
|
||||||
|
{
|
||||||
|
arguments.Add(text.Substring(argumentStart, i - argumentStart).Trim());
|
||||||
|
argumentStart = i + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (depth != 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
arguments.Add(text.Substring(argumentStart).Trim());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryParseGradientStop(string text, out GradientStop stop)
|
||||||
|
{
|
||||||
|
stop = default;
|
||||||
|
text = text.Trim();
|
||||||
|
|
||||||
|
var colorLength = text.Length;
|
||||||
|
var openIndex = text.IndexOf('(');
|
||||||
|
if (openIndex > 0
|
||||||
|
&& (text.Substring(0, openIndex).Trim().Equals("rgb", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| text.Substring(0, openIndex).Trim().Equals("rgba", StringComparison.OrdinalIgnoreCase)))
|
||||||
|
{
|
||||||
|
var closeIndex = text.IndexOf(')', openIndex + 1);
|
||||||
|
if (closeIndex < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorLength = closeIndex + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var whitespaceIndex = text.IndexOfAny(new[] { ' ', '\t', '\r', '\n' });
|
||||||
|
if (whitespaceIndex >= 0)
|
||||||
|
{
|
||||||
|
colorLength = whitespaceIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var colorText = text.Substring(0, colorLength).Trim();
|
||||||
|
var positionText = text.Substring(colorLength).Trim();
|
||||||
|
if (!PasteColorUtil.TryParseColor(colorText, out var color))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
float? position = null;
|
||||||
|
if (positionText.Length > 0)
|
||||||
|
{
|
||||||
|
if (!positionText.EndsWith("%", StringComparison.Ordinal)
|
||||||
|
|| !float.TryParse(positionText.Substring(0, positionText.Length - 1),
|
||||||
|
NumberStyles.Float, CultureInfo.InvariantCulture, out var percentage)
|
||||||
|
|| float.IsNaN(percentage) || float.IsInfinity(percentage))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
position = percentage / 100f;
|
||||||
|
}
|
||||||
|
|
||||||
|
stop.color = color;
|
||||||
|
stop.position = position;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsGradientDirection(string text)
|
||||||
|
{
|
||||||
|
text = text.Trim();
|
||||||
|
if (text.StartsWith("to ", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var suffix in new[] { "deg", "grad", "rad", "turn" })
|
||||||
|
{
|
||||||
|
if (text.EndsWith(suffix, StringComparison.OrdinalIgnoreCase)
|
||||||
|
&& float.TryParse(text.Substring(0, text.Length - suffix.Length),
|
||||||
|
NumberStyles.Float, CultureInfo.InvariantCulture, out var direction)
|
||||||
|
&& !float.IsNaN(direction) && !float.IsInfinity(direction))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryParseLinearGradientAngle(string text, out float degrees)
|
||||||
|
{
|
||||||
|
text = text.Trim();
|
||||||
|
switch (text.ToLowerInvariant())
|
||||||
|
{
|
||||||
|
case "to top":
|
||||||
|
degrees = 0;
|
||||||
|
return true;
|
||||||
|
case "to top right":
|
||||||
|
case "to right top":
|
||||||
|
degrees = 45;
|
||||||
|
return true;
|
||||||
|
case "to right":
|
||||||
|
degrees = 90;
|
||||||
|
return true;
|
||||||
|
case "to bottom right":
|
||||||
|
case "to right bottom":
|
||||||
|
degrees = 135;
|
||||||
|
return true;
|
||||||
|
case "to bottom":
|
||||||
|
degrees = 180;
|
||||||
|
return true;
|
||||||
|
case "to bottom left":
|
||||||
|
case "to left bottom":
|
||||||
|
degrees = 225;
|
||||||
|
return true;
|
||||||
|
case "to left":
|
||||||
|
degrees = 270;
|
||||||
|
return true;
|
||||||
|
case "to top left":
|
||||||
|
case "to left top":
|
||||||
|
degrees = 315;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var suffixes = new[] { "deg", "grad", "rad", "turn" };
|
||||||
|
foreach (var suffix in suffixes)
|
||||||
|
{
|
||||||
|
if (!text.EndsWith(suffix, StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| !float.TryParse(text.Substring(0, text.Length - suffix.Length),
|
||||||
|
NumberStyles.Float, CultureInfo.InvariantCulture, out var value)
|
||||||
|
|| float.IsNaN(value) || float.IsInfinity(value))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (suffix)
|
||||||
|
{
|
||||||
|
case "grad":
|
||||||
|
degrees = value * 0.9f;
|
||||||
|
return true;
|
||||||
|
case "rad":
|
||||||
|
degrees = value * Mathf.Rad2Deg;
|
||||||
|
return true;
|
||||||
|
case "turn":
|
||||||
|
degrees = value * 360;
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
degrees = value;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
degrees = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static GradientStop SetStopPosition(GradientStop stop, float position)
|
||||||
|
{
|
||||||
|
stop.position = position;
|
||||||
|
return stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 271608aaaedb44ac39b1357557a71342
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -24,8 +24,8 @@ namespace Coffee.UIEffects.Editors
|
|||||||
|
|
||||||
private static bool expandOthers
|
private static bool expandOthers
|
||||||
{
|
{
|
||||||
set => UIEffectEditorSettings.instance.m_ExpandOthers = value;
|
|
||||||
get => UIEffectEditorSettings.instance.m_ExpandOthers;
|
get => UIEffectEditorSettings.instance.m_ExpandOthers;
|
||||||
|
set => UIEffectEditorSettings.instance.m_ExpandOthers = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
private SerializedProperty _runtimePresets;
|
private SerializedProperty _runtimePresets;
|
||||||
private SerializedProperty _runtimePresetsV2;
|
private SerializedProperty _runtimePresetsV2;
|
||||||
private SerializedProperty _useHDRColorPicker;
|
private SerializedProperty _useHDRColorPicker;
|
||||||
|
private SerializedProperty _enableColorCorrection;
|
||||||
private ShaderVariantRegistryEditor _shaderVariantRegistryEditor;
|
private ShaderVariantRegistryEditor _shaderVariantRegistryEditor;
|
||||||
private UIEffect[] _legacyPresets;
|
private UIEffect[] _legacyPresets;
|
||||||
private bool _expandRuntimePresets;
|
private bool _expandRuntimePresets;
|
||||||
@@ -25,6 +26,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
{
|
{
|
||||||
base.OnEnable();
|
base.OnEnable();
|
||||||
_legacyPresets = UIEffectProjectSettings.LoadEditorPresets();
|
_legacyPresets = UIEffectProjectSettings.LoadEditorPresets();
|
||||||
|
_enableColorCorrection = serializedObject.FindProperty("m_EnableColorCorrection");
|
||||||
_useHDRColorPicker = serializedObject.FindProperty("m_UseHDRColorPicker");
|
_useHDRColorPicker = serializedObject.FindProperty("m_UseHDRColorPicker");
|
||||||
_runtimePresets = serializedObject.FindProperty("m_RuntimePresets");
|
_runtimePresets = serializedObject.FindProperty("m_RuntimePresets");
|
||||||
_runtimePresetsV2 = serializedObject.FindProperty("m_RuntimePresetsV2");
|
_runtimePresetsV2 = serializedObject.FindProperty("m_RuntimePresetsV2");
|
||||||
@@ -69,6 +71,17 @@ namespace Coffee.UIEffects.Editors
|
|||||||
// Legacy Presets
|
// Legacy Presets
|
||||||
DrawLegacyPresets();
|
DrawLegacyPresets();
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
EditorGUILayout.PropertyField(_enableColorCorrection);
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
foreach (var g in Misc.FindObjectsOfType<UIEffect>())
|
||||||
|
{
|
||||||
|
g.SetMaterialContextAllDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Editor
|
// Editor
|
||||||
// Use HDR color pickers.
|
// Use HDR color pickers.
|
||||||
EditorGUILayout.PropertyField(_useHDRColorPicker);
|
EditorGUILayout.PropertyField(_useHDRColorPicker);
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using Coffee.UIEffectInternal;
|
||||||
|
|
||||||
namespace Coffee.UIEffects.Editors
|
namespace Coffee.UIEffects.Editors
|
||||||
{
|
{
|
||||||
@@ -18,6 +19,11 @@ namespace Coffee.UIEffects.Editors
|
|||||||
(Action<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Action<SerializedProperty, Gradient>),
|
(Action<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Action<SerializedProperty, Gradient>),
|
||||||
s_PiGradient.SetMethod);
|
s_PiGradient.SetMethod);
|
||||||
|
|
||||||
|
private static GUIContent s_PasteColorContent;
|
||||||
|
private static GUIContent s_PasteGradientContent;
|
||||||
|
private static readonly GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
||||||
|
private static readonly GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
||||||
|
|
||||||
private SerializedProperty _toneFilter;
|
private SerializedProperty _toneFilter;
|
||||||
private SerializedProperty _toneIntensity;
|
private SerializedProperty _toneIntensity;
|
||||||
|
|
||||||
@@ -103,12 +109,25 @@ namespace Coffee.UIEffects.Editors
|
|||||||
private SerializedProperty _detailTexOffset;
|
private SerializedProperty _detailTexOffset;
|
||||||
private SerializedProperty _detailTexSpeed;
|
private SerializedProperty _detailTexSpeed;
|
||||||
|
|
||||||
|
private SerializedProperty _roundCornerMode;
|
||||||
|
private SerializedProperty _roundCornerRadiusTopLeft;
|
||||||
|
private SerializedProperty _roundCornerRadiusTopRight;
|
||||||
|
private SerializedProperty _roundCornerRadiusBottomRight;
|
||||||
|
private SerializedProperty _roundCornerRadiusBottomLeft;
|
||||||
|
|
||||||
private SerializedProperty _flip;
|
private SerializedProperty _flip;
|
||||||
private static GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
|
||||||
private static GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
|
||||||
|
|
||||||
protected virtual void OnEnable()
|
protected virtual void OnEnable()
|
||||||
{
|
{
|
||||||
|
if (s_PasteColorContent == null)
|
||||||
|
{
|
||||||
|
var iconDir = "Packages/com.coffee.ui-effect/Editor/Icons";
|
||||||
|
s_PasteColorContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
||||||
|
$"Paste {PasteColorUtil.SupportedFormats} or CSS background/background-color declarations.");
|
||||||
|
s_PasteGradientContent = Misc.GetIconContent($"{iconDir}/PasteIcon.png",
|
||||||
|
"Paste CSS linear-gradient(...) or radial-gradient(...).");
|
||||||
|
}
|
||||||
|
|
||||||
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
||||||
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
||||||
|
|
||||||
@@ -197,6 +216,13 @@ namespace Coffee.UIEffects.Editors
|
|||||||
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
|
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
|
||||||
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
||||||
|
|
||||||
|
_roundCornerMode = serializedObject.FindProperty("m_RoundCornerMode");
|
||||||
|
var roundCornerRadius = serializedObject.FindProperty("m_RoundCornerRadius");
|
||||||
|
_roundCornerRadiusTopLeft = roundCornerRadius.FindPropertyRelative("x");
|
||||||
|
_roundCornerRadiusTopRight = roundCornerRadius.FindPropertyRelative("y");
|
||||||
|
_roundCornerRadiusBottomRight = roundCornerRadius.FindPropertyRelative("z");
|
||||||
|
_roundCornerRadiusBottomLeft = roundCornerRadius.FindPropertyRelative("w");
|
||||||
|
|
||||||
_flip = serializedObject.FindProperty("m_Flip");
|
_flip = serializedObject.FindProperty("m_Flip");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +389,18 @@ namespace Coffee.UIEffects.Editors
|
|||||||
|
|
||||||
// Gradient
|
// Gradient
|
||||||
DrawSeparator();
|
DrawSeparator();
|
||||||
if (DrawHeaderPopup(_gradationMode))
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
var isGradationEnabled = DrawHeaderPopup(_gradationMode);
|
||||||
|
if (GUILayout.Button(s_PasteGradientContent, "IconButton"))
|
||||||
|
{
|
||||||
|
PasteGradientUtil.PasteFromClipboard(_gradationGradient, s_SetGradient,
|
||||||
|
_gradationMode, _gradationRotation, _gradationOffset, _gradationScale, _gradationWrapMode,
|
||||||
|
_gradationReverse);
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
if (isGradationEnabled)
|
||||||
{
|
{
|
||||||
EditorGUI.indentLevel++;
|
EditorGUI.indentLevel++;
|
||||||
EditorGUILayout.PropertyField(_gradationColorFilter);
|
EditorGUILayout.PropertyField(_gradationColorFilter);
|
||||||
@@ -465,6 +502,18 @@ namespace Coffee.UIEffects.Editors
|
|||||||
EditorGUI.indentLevel--;
|
EditorGUI.indentLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Round Corner
|
||||||
|
DrawSeparator();
|
||||||
|
if (DrawHeaderPopup(_roundCornerMode))
|
||||||
|
{
|
||||||
|
EditorGUI.indentLevel++;
|
||||||
|
DrawRoundCornerRadiusField(_roundCornerRadiusTopLeft, "Top Left");
|
||||||
|
DrawRoundCornerRadiusField(_roundCornerRadiusTopRight, "Top Right");
|
||||||
|
DrawRoundCornerRadiusField(_roundCornerRadiusBottomRight, "Bottom Right");
|
||||||
|
DrawRoundCornerRadiusField(_roundCornerRadiusBottomLeft, "Bottom Left");
|
||||||
|
EditorGUI.indentLevel--;
|
||||||
|
}
|
||||||
|
|
||||||
// Flip
|
// Flip
|
||||||
DrawSeparator();
|
DrawSeparator();
|
||||||
DrawHeaderPopup(_flip);
|
DrawHeaderPopup(_flip);
|
||||||
@@ -490,6 +539,16 @@ namespace Coffee.UIEffects.Editors
|
|||||||
EditorGUI.indentLevel = indentLevel;
|
EditorGUI.indentLevel = indentLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void DrawRoundCornerRadiusField(SerializedProperty property, string label)
|
||||||
|
{
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
EditorGUILayout.PropertyField(property, EditorGUIUtility.TrTempContent(label));
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
property.floatValue = Mathf.Max(0, property.floatValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha)
|
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha)
|
||||||
{
|
{
|
||||||
var label = EditorGUIUtility.TrTempContent(color.displayName);
|
var label = EditorGUIUtility.TrTempContent(color.displayName);
|
||||||
@@ -502,11 +561,20 @@ namespace Coffee.UIEffects.Editors
|
|||||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||||
EditorGUI.showMixedValue = color.hasMultipleDifferentValues;
|
EditorGUI.showMixedValue = color.hasMultipleDifferentValues;
|
||||||
|
|
||||||
|
const float pasteWidth = 20f;
|
||||||
|
var colorRect = new Rect(rect.x, rect.y, rect.width - pasteWidth - 2, rect.height);
|
||||||
|
var pasteRect = new Rect(colorRect.xMax + 2, rect.y, pasteWidth, rect.height);
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
var colorValue = EditorGUI.ColorField(rect, label, color.colorValue, true, showAlpha, hdr);
|
var colorValue = EditorGUI.ColorField(colorRect, label, color.colorValue, true, showAlpha, hdr);
|
||||||
if (EditorGUI.EndChangeCheck())
|
if (EditorGUI.EndChangeCheck())
|
||||||
{
|
{
|
||||||
color.colorValue = colorValue;
|
color.colorValue = UIEffectProjectSettings.enableColorCorrection ? colorValue : colorValue.gamma;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GUI.Button(pasteRect, s_PasteColorContent, "IconButton"))
|
||||||
|
{
|
||||||
|
PasteColorUtil.PasteFromClipboard(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
{
|
{
|
||||||
if (tweener == null) return;
|
if (tweener == null) return;
|
||||||
|
|
||||||
|
EditorGUI.BeginDisabledGroup(!tweener.enabled);
|
||||||
EditorGUILayout.Space(4);
|
EditorGUILayout.Space(4);
|
||||||
GUILayout.Label(GUIContent.none, "sv_iconselector_sep", GUILayout.ExpandWidth(true));
|
GUILayout.Label(GUIContent.none, "sv_iconselector_sep", GUILayout.ExpandWidth(true));
|
||||||
|
|
||||||
@@ -101,6 +102,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
if (GUI.Button(rResetTimeButton, EditorGUIUtility.IconContent("animation.firstkey"), "IconButton"))
|
if (GUI.Button(rResetTimeButton, EditorGUIUtility.IconContent("animation.firstkey"), "IconButton"))
|
||||||
{
|
{
|
||||||
ResetTime();
|
ResetTime();
|
||||||
|
EditorApplication.QueuePlayerLoopUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
var rPlayButton = new Rect(r.x + 20, r.y, 20, r.height);
|
var rPlayButton = new Rect(r.x + 20, r.y, 20, r.height);
|
||||||
@@ -148,12 +150,15 @@ namespace Coffee.UIEffects.Editors
|
|||||||
if (EditorGUI.EndChangeCheck())
|
if (EditorGUI.EndChangeCheck())
|
||||||
{
|
{
|
||||||
SetTime(time);
|
SetTime(time);
|
||||||
|
EditorApplication.QueuePlayerLoopUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Application.isPlaying && tweener.isActiveAndEnabled)
|
if (Application.isPlaying && tweener.isActiveAndEnabled)
|
||||||
{
|
{
|
||||||
Repaint();
|
Repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditorGUI.EndDisabledGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static float DrawBackground(Rect r, float width, Color color)
|
private static float DrawBackground(Rect r, float width, Color color)
|
||||||
@@ -168,6 +173,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
{
|
{
|
||||||
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
||||||
{
|
{
|
||||||
|
if (!tweener.enabled) continue;
|
||||||
tweener.SetTime(time);
|
tweener.SetTime(time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,6 +182,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
{
|
{
|
||||||
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
||||||
{
|
{
|
||||||
|
if (!tweener.enabled) continue;
|
||||||
tweener.ResetTime(tweener.direction);
|
tweener.ResetTime(tweener.direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,6 +217,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
_lastTime = EditorApplication.timeSinceStartup;
|
_lastTime = EditorApplication.timeSinceStartup;
|
||||||
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
||||||
{
|
{
|
||||||
|
if (!tweener.enabled) continue;
|
||||||
tweener.UpdateTime(tweener.direction == UIEffectTweener.Direction.Forward ? delta : -delta);
|
tweener.UpdateTime(tweener.direction == UIEffectTweener.Direction.Forward ? delta : -delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ Apply professional-grade filters like grayscale, blur, and dissolve directly fro
|
|||||||
- [Install via UPM (Manually)](#install-via-upm-manually)
|
- [Install via UPM (Manually)](#install-via-upm-manually)
|
||||||
- [Install as Embedded Package](#install-as-embedded-package)
|
- [Install as Embedded Package](#install-as-embedded-package)
|
||||||
- [Import Additional Resources](#import-additional-resources)
|
- [Import Additional Resources](#import-additional-resources)
|
||||||
|
- [Install Additional Resources as Packages](#install-additional-resources-as-packages)
|
||||||
- [🔄 Upgrading from v4 to v5](#-upgrading-from-v4-to-v5)
|
- [🔄 Upgrading from v4 to v5](#-upgrading-from-v4-to-v5)
|
||||||
- [🚀 Usage](#-usage)
|
- [🚀 Usage](#-usage)
|
||||||
- [Getting Started](#getting-started)
|
- [Getting Started](#getting-started)
|
||||||
@@ -52,6 +53,7 @@ Apply professional-grade filters like grayscale, blur, and dissolve directly fro
|
|||||||
- [Gradation Mode](#gradation-mode)
|
- [Gradation Mode](#gradation-mode)
|
||||||
- [Edge Mode](#edge-mode)
|
- [Edge Mode](#edge-mode)
|
||||||
- [Detail Filter](#detail-filter)
|
- [Detail Filter](#detail-filter)
|
||||||
|
- [Round Corner](#round-corner)
|
||||||
- [Flip](#flip)
|
- [Flip](#flip)
|
||||||
- [Others](#others)
|
- [Others](#others)
|
||||||
- [Component: UIEffectTweener](#component-uieffecttweener)
|
- [Component: UIEffectTweener](#component-uieffecttweener)
|
||||||
@@ -67,6 +69,7 @@ Apply professional-grade filters like grayscale, blur, and dissolve directly fro
|
|||||||
- [Settings](#settings)
|
- [Settings](#settings)
|
||||||
- [Editor](#editor)
|
- [Editor](#editor)
|
||||||
- [Shader](#shader)
|
- [Shader](#shader)
|
||||||
|
- [Advanced](#advanced)
|
||||||
- [:warning: Limitations](#warning-limitations)
|
- [:warning: Limitations](#warning-limitations)
|
||||||
- [🤝 Contributing](#-contributing)
|
- [🤝 Contributing](#-contributing)
|
||||||
- [Issues](#issues)
|
- [Issues](#issues)
|
||||||
@@ -123,7 +126,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}`:
|
- 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.9.0
|
openupm add com.coffee.ui-effect@5.12.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install via UPM (with Package Manager UI)
|
### Install via UPM (with Package Manager UI)
|
||||||
@@ -132,7 +135,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`
|
- 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.
|
- To update the package, change suffix `#{version}` to the target version.
|
||||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.0`
|
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.12.0`
|
||||||
|
|
||||||
### Install via UPM (Manually)
|
### Install via UPM (Manually)
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@ _This package requires **Unity 2020.3 or later**._
|
|||||||
```
|
```
|
||||||
|
|
||||||
- To update the package, change suffix `#{version}` to the target version.
|
- 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.9.0",`
|
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.12.0",`
|
||||||
|
|
||||||
### Install as Embedded Package
|
### Install as Embedded Package
|
||||||
|
|
||||||
@@ -167,6 +170,53 @@ Additional resources can be imported to extend functionality.
|
|||||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||||
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
||||||
|
|
||||||
|
#### Install Additional Resources as Packages
|
||||||
|
|
||||||
|
Starting with v5.12.0, you can install optional resources as separate UPM packages instead of importing them as samples.
|
||||||
|
This lets you use the features you need without adding their assets to your project's `Assets/Samples` directory.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Use the **same version as the UIEffect package**.
|
||||||
|
> If you have already imported a resource as a sample, delete its corresponding sample from `Assets/Samples/UI Effect/{version}` before installing the package.
|
||||||
|
|
||||||
|
The following optional packages are available from the OpenUPM registry.
|
||||||
|
Choose the package that matches your Unity version and render pipeline, then replace `5.12.0` with your UIEffect package version if needed.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# TextMeshPro support (Unity 2023.2 or earlier)
|
||||||
|
openupm add com.coffee.ui-effect.textmeshpro-legacy@5.12.0
|
||||||
|
# TextMeshPro support (Unity 2023.3 or later)
|
||||||
|
openupm add com.coffee.ui-effect.textmeshpro@5.12.0
|
||||||
|
# ShaderGraph support (Unity 6, Built-in Render Pipeline)
|
||||||
|
openupm add com.coffee.ui-effect.shadergraph-builtin@5.12.0
|
||||||
|
# ShaderGraph support (Unity 6, URP)
|
||||||
|
openupm add com.coffee.ui-effect.shadergraph-urp@5.12.0
|
||||||
|
# v4 compatible components
|
||||||
|
openupm add com.coffee.ui-effect.v4-compatible-components@5.12.0
|
||||||
|
```
|
||||||
|
|
||||||
|
For manual installation, add the desired package entries to your `Packages/manifest.json` file, install the package through Package Manager, or embed the package in your project.
|
||||||
|
The following is a valid `manifest.json` dependencies example; remove entries for resources you do not need.
|
||||||
|
Use only one TextMeshPro support package, and select the ShaderGraph package for your render pipeline.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
// TextMeshPro Support (2023.2 or earlier):
|
||||||
|
"com.coffee.ui-effect.textmeshpro-legacy": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src/Samples~/com.coffee.ui-effect.textmeshpro-legacy#5.12.0",
|
||||||
|
// TextMeshPro Support (2023.3, 6000.0 or later):
|
||||||
|
"com.coffee.ui-effect.textmeshpro": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src/Samples~/com.coffee.ui-effect.textmeshpro#5.12.0",
|
||||||
|
// ShaderGraph Support (Unity 6, Builtin):
|
||||||
|
"com.coffee.ui-effect.shadergraph-builtin": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src/Samples~/com.coffee.ui-effect.shadergraph-builtin#5.12.0",
|
||||||
|
// ShaderGraph Support (Unity 6, URP):
|
||||||
|
"com.coffee.ui-effect.shadergraph-urp": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src/Samples~/com.coffee.ui-effect.shadergraph-urp#5.12.0",
|
||||||
|
// v4 Compatible Components:
|
||||||
|
"com.coffee.ui-effect.v4-compatible-components": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src/Samples~/com.coffee.ui-effect.v4-compatible-components#5.12.0",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
## 🔄 Upgrading from v4 to v5
|
## 🔄 Upgrading from v4 to v5
|
||||||
@@ -185,6 +235,10 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
|||||||
```
|
```
|
||||||
|
|
||||||
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
||||||
|
> [!TIP]
|
||||||
|
> "Additional Resources" can be installed as a package from v5.12.0 or later.
|
||||||
|
> For more information, please refer to the [Install Additional Resources](#import-additional-resources) section.
|
||||||
|
|
||||||
|
|
||||||
3. All v4 components are obsolete.
|
3. All v4 components are obsolete.
|
||||||
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
||||||
@@ -246,13 +300,17 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Color Filter
|
#### 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 Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Color Glow**: Set the color to glow.
|
- **Color Glow**: Set the color to glow.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> The paste button beside a color field accepts hex values (`#RGB`, `#RRGGBB`, `#RGBA`, `#RRGGBBAA`), Unity-supported color names, `transparent`, `rgb()`, and `rgba()`. It also accepts CSS `background` or `background-color` declarations containing one of these values.
|
||||||
|
> This is useful when copying and pasting color codes from CSS, USS, Figma, Photoshop, etc.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Sampling Filter
|
#### Sampling Filter
|
||||||
@@ -338,7 +396,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Gradation Mode
|
#### Gradation Mode
|
||||||
|
|
||||||

|

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

|

|
||||||
@@ -356,6 +414,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
- **Keep Aspect Ratio**:
|
- **Keep Aspect Ratio**:
|
||||||
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> The paste button beside the Gradation Mode selector accepts CSS `linear-gradient(...)` and `radial-gradient(...)` values, including gradients in CSS `background` declarations. It imports the color stops and positions, selects `AngleGradient` or `RadialGradient`, and resets the gradation offset and scale. Explicit linear-gradient directions and angles (`deg`, `grad`, `rad`, or `turn`) are applied to the rotation. CSS radial-gradient shape, size, and position are not imported.
|
||||||
|
> This is useful when copying and pasting color codes from CSS, USS, Figma, Photoshop, etc.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Edge Mode
|
#### Edge Mode
|
||||||
@@ -391,6 +453,18 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
#### Round Corner
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- **Mode**: `Off` or `On`. The default is `Off`.
|
||||||
|
- **Top Left**, **Top Right**, **Bottom Right**, **Bottom Left**: Set each corner radius independently.
|
||||||
|

|
||||||
|
- Radius values use `transitionRoot` local units. They are normalized against its shorter dimension and clamped to half that dimension; `0` keeps a corner square.
|
||||||
|
- The mask applies to the main UI surface; Shadow and Mirror outputs are left unchanged to avoid shadow-edge artifacts.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
#### Flip
|
#### Flip
|
||||||
|
|
||||||

|

|
||||||
@@ -415,7 +489,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
- **Custom Root**: Use the custom transform for some effects.
|
- **Custom Root**: Use the custom transform for some effects.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
|
> `Transition Filter`, `Gradation Filter`, `Detail Filter`, and `Round Corner` use their effect root for local-coordinate calculations.
|
||||||
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
|
> 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.
|
> By specifying `Custom Root`, you can refer to the specified transform.
|
||||||
> 
|
> 
|
||||||
@@ -472,6 +546,10 @@ The `UIEffectReplica` component applies visual effects to UI elements by replica
|
|||||||
|
|
||||||
### Usage with TextMeshPro
|
### Usage with TextMeshPro
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> "Additional Resources" can be installed as a package from v5.12.0 or later.
|
||||||
|
> For more information, please refer to the [Install Additional Resources](#import-additional-resources) section.
|
||||||
|
|
||||||
To use UIEffect with TextMeshPro, you need to import additional resources.
|
To use UIEffect with TextMeshPro, you need to import additional resources.
|
||||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||||
Click the `Import` button.
|
Click the `Import` button.
|
||||||
@@ -516,6 +594,10 @@ Click the `Import` button.
|
|||||||
|
|
||||||
### Usage with ShaderGraph
|
### Usage with ShaderGraph
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> "Additional Resources" can be installed as a package from v5.12.0 or later.
|
||||||
|
> For more information, please refer to the [Install Additional Resources](#import-additional-resources) section.
|
||||||
|
|
||||||
⚠️ ShaderGraph support is available only in Unity 2023.2/6.0 or later.
|
⚠️ ShaderGraph support is available only in Unity 2023.2/6.0 or later.
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -90,6 +90,12 @@ namespace Coffee.UIEffects
|
|||||||
Mirror
|
Mirror
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum RoundCornerMode
|
||||||
|
{
|
||||||
|
Off = 0,
|
||||||
|
On = 1
|
||||||
|
}
|
||||||
|
|
||||||
public enum EdgeMode
|
public enum EdgeMode
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|||||||
@@ -58,7 +58,10 @@ namespace Coffee.UIEffectInternal
|
|||||||
public static void GetComponentsInChildren<T>(this Component self, List<T> results, int depth)
|
public static void GetComponentsInChildren<T>(this Component self, List<T> results, int depth)
|
||||||
where T : Component
|
where T : Component
|
||||||
{
|
{
|
||||||
|
if (results == null) return;
|
||||||
|
|
||||||
results.Clear();
|
results.Clear();
|
||||||
|
if (self == null) return;
|
||||||
self.GetComponentsInChildren_Internal(results, depth);
|
self.GetComponentsInChildren_Internal(results, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +100,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static T GetRootComponent<T>(this Component self) where T : Component
|
public static T GetRootComponent<T>(this Component self) where T : Component
|
||||||
{
|
{
|
||||||
|
if (self == null) return null;
|
||||||
|
|
||||||
T component = null;
|
T component = null;
|
||||||
var transform = self.transform;
|
var transform = self.transform;
|
||||||
while (transform != null)
|
while (transform != null)
|
||||||
@@ -119,6 +124,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
Predicate<T> valid)
|
Predicate<T> valid)
|
||||||
where T : Component
|
where T : Component
|
||||||
{
|
{
|
||||||
|
if (self == null || valid == null) return null;
|
||||||
|
|
||||||
var tr = includeSelf ? self.transform : self.transform.parent;
|
var tr = includeSelf ? self.transform : self.transform.parent;
|
||||||
while (tr != null)
|
while (tr != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
self.GetColors(colors);
|
self.GetColors(colors);
|
||||||
self.GetUVs(0, uv0);
|
self.GetUVs(0, uv0);
|
||||||
self.GetUVs(1, uv1);
|
self.GetUVs(1, uv1);
|
||||||
self.GetUVs(2, uv1);
|
self.GetUVs(2, uv2);
|
||||||
self.GetUVs(3, uv1);
|
self.GetUVs(3, uv3);
|
||||||
self.GetNormals(normals);
|
self.GetNormals(normals);
|
||||||
self.GetTangents(tangents);
|
self.GetTangents(tangents);
|
||||||
self.GetIndices(indices, 0);
|
self.GetIndices(indices, 0);
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
protected void DrawPreLoadSettingsInBuild(string packageName)
|
protected void DrawPreLoadSettingsInBuild(string packageName)
|
||||||
{
|
{
|
||||||
|
if (_preLoadSettingsInBuild == null) return;
|
||||||
|
|
||||||
EditorGUILayout.PropertyField(_preLoadSettingsInBuild);
|
EditorGUILayout.PropertyField(_preLoadSettingsInBuild);
|
||||||
if (!_preLoadSettingsInBuild.boolValue)
|
if (!_preLoadSettingsInBuild.boolValue)
|
||||||
{
|
{
|
||||||
@@ -298,9 +300,13 @@ namespace Coffee.UIEffectInternal
|
|||||||
}
|
}
|
||||||
|
|
||||||
_target = instance;
|
_target = instance;
|
||||||
|
if (_target == null) return;
|
||||||
|
|
||||||
_editor = Editor.CreateEditor(_target);
|
_editor = Editor.CreateEditor(_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_editor == null) return;
|
||||||
|
|
||||||
_editor.OnInspectorGUI();
|
_editor.OnInspectorGUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected void Invoke(Action<T> callback)
|
protected void Invoke(Action<T> callback)
|
||||||
{
|
{
|
||||||
|
if (callback == null) return;
|
||||||
|
|
||||||
var node = _delegates.First;
|
var node = _delegates.First;
|
||||||
while (node != null)
|
while (node != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ namespace Coffee.UIEffectInternal
|
|||||||
#endif
|
#endif
|
||||||
private static void Clear()
|
private static void Clear()
|
||||||
{
|
{
|
||||||
s_Caches.Clear();
|
lock (s_Caches)
|
||||||
|
{
|
||||||
|
s_Caches.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
UIExtraCallbacks.onLateAfterCanvasRebuild -= ClearAllCache;
|
UIExtraCallbacks.onLateAfterCanvasRebuild -= ClearAllCache;
|
||||||
UIExtraCallbacks.onLateAfterCanvasRebuild += ClearAllCache;
|
UIExtraCallbacks.onLateAfterCanvasRebuild += ClearAllCache;
|
||||||
}
|
}
|
||||||
@@ -29,6 +33,12 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool TryGet<T>(object key1, string key2, out T result)
|
public static bool TryGet<T>(object key1, string key2, out T result)
|
||||||
{
|
{
|
||||||
|
if (key1 == null || key2 == null)
|
||||||
|
{
|
||||||
|
result = default;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return GetFrameCache<T>().TryGet((key1.GetHashCode(), key2.GetHashCode()), out result);
|
return GetFrameCache<T>().TryGet((key1.GetHashCode(), key2.GetHashCode()), out result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,6 +47,12 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool TryGet<T>(object key1, string key2, int key3, out T result)
|
public static bool TryGet<T>(object key1, string key2, int key3, out T result)
|
||||||
{
|
{
|
||||||
|
if (key1 == null || key2 == null)
|
||||||
|
{
|
||||||
|
result = default;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return GetFrameCache<T>().TryGet((key1.GetHashCode(), key2.GetHashCode() + key3), out result);
|
return GetFrameCache<T>().TryGet((key1.GetHashCode(), key2.GetHashCode() + key3), out result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +61,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Set<T>(object key1, string key2, T result)
|
public static void Set<T>(object key1, string key2, T result)
|
||||||
{
|
{
|
||||||
|
if (key1 == null || key2 == null) return;
|
||||||
|
|
||||||
GetFrameCache<T>().Set((key1.GetHashCode(), key2.GetHashCode()), result);
|
GetFrameCache<T>().Set((key1.GetHashCode(), key2.GetHashCode()), result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,26 +71,34 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Set<T>(object key1, string key2, int key3, T result)
|
public static void Set<T>(object key1, string key2, int key3, T result)
|
||||||
{
|
{
|
||||||
|
if (key1 == null || key2 == null) return;
|
||||||
|
|
||||||
GetFrameCache<T>().Set((key1.GetHashCode(), key2.GetHashCode() + key3), result);
|
GetFrameCache<T>().Set((key1.GetHashCode(), key2.GetHashCode() + key3), result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ClearAllCache()
|
private static void ClearAllCache()
|
||||||
{
|
{
|
||||||
foreach (var cache in s_Caches.Values)
|
lock (s_Caches)
|
||||||
{
|
{
|
||||||
cache.Clear();
|
foreach (var cache in s_Caches.Values)
|
||||||
|
{
|
||||||
|
cache.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FrameCacheContainer<T> GetFrameCache<T>()
|
private static FrameCacheContainer<T> GetFrameCache<T>()
|
||||||
{
|
{
|
||||||
var t = typeof(T);
|
lock (s_Caches)
|
||||||
if (s_Caches.TryGetValue(t, out var frameCache)) return frameCache as FrameCacheContainer<T>;
|
{
|
||||||
|
var t = typeof(T);
|
||||||
|
if (s_Caches.TryGetValue(t, out var frameCache)) return frameCache as FrameCacheContainer<T>;
|
||||||
|
|
||||||
frameCache = new FrameCacheContainer<T>();
|
frameCache = new FrameCacheContainer<T>();
|
||||||
s_Caches.Add(t, frameCache);
|
s_Caches.Add(t, frameCache);
|
||||||
|
|
||||||
return (FrameCacheContainer<T>)frameCache;
|
return (FrameCacheContainer<T>)frameCache;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private interface IFrameCache
|
private interface IFrameCache
|
||||||
@@ -86,17 +112,26 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
_caches.Clear();
|
lock (_caches)
|
||||||
|
{
|
||||||
|
_caches.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGet((int, int) key, out T result)
|
public bool TryGet((int, int) key, out T result)
|
||||||
{
|
{
|
||||||
return _caches.TryGetValue(key, out result);
|
lock (_caches)
|
||||||
|
{
|
||||||
|
return _caches.TryGetValue(key, out result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Set((int, int) key, T result)
|
public void Set((int, int) key, T result)
|
||||||
{
|
{
|
||||||
_caches[key] = result;
|
lock (_caches)
|
||||||
|
{
|
||||||
|
_caches[key] = result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Get(Hash128 hash, ref Material material, string shaderName)
|
public static void Get(Hash128 hash, ref Material material, string shaderName)
|
||||||
{
|
{
|
||||||
|
if (onShaderFind == null) return;
|
||||||
|
|
||||||
Profiler.BeginSample("(COF)[MaterialRepository] Get");
|
Profiler.BeginSample("(COF)[MaterialRepository] Get");
|
||||||
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x))
|
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x))
|
||||||
{
|
{
|
||||||
@@ -62,6 +64,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Get(Hash128 hash, ref Material material, string shaderName, string[] keywords)
|
public static void Get(Hash128 hash, ref Material material, string shaderName, string[] keywords)
|
||||||
{
|
{
|
||||||
|
if (onShaderFind == null) return;
|
||||||
|
|
||||||
Profiler.BeginSample("(COF)[MaterialRepository] Get");
|
Profiler.BeginSample("(COF)[MaterialRepository] Get");
|
||||||
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x.shaderName))
|
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x.shaderName))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
using Debug = UnityEngine.Debug;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -12,6 +13,7 @@ using UnityEditor.SceneManagement;
|
|||||||
#else
|
#else
|
||||||
using UnityEditor.Experimental.SceneManagement;
|
using UnityEditor.Experimental.SceneManagement;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Coffee.UIEffectInternal
|
namespace Coffee.UIEffectInternal
|
||||||
@@ -67,7 +69,7 @@ namespace Coffee.UIEffectInternal
|
|||||||
public static T[] GetAllComponentsInPrefabStage<T>() where T : Component
|
public static T[] GetAllComponentsInPrefabStage<T>() where T : Component
|
||||||
{
|
{
|
||||||
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
||||||
if (prefabStage == null) return Array.Empty<T>();
|
if (prefabStage == null || prefabStage.prefabContentsRoot == null) return Array.Empty<T>();
|
||||||
|
|
||||||
return prefabStage.prefabContentsRoot.GetComponentsInChildren<T>(true);
|
return prefabStage.prefabContentsRoot.GetComponentsInChildren<T>(true);
|
||||||
}
|
}
|
||||||
@@ -85,6 +87,28 @@ namespace Coffee.UIEffectInternal
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
public static GUIContent GetIconContent(string iconPath, string tooltip = null)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(iconPath))
|
||||||
|
{
|
||||||
|
return new GUIContent(tooltip);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EditorGUIUtility.isProSkin)
|
||||||
|
{
|
||||||
|
var darkIconPath = $"{Path.GetDirectoryName(iconPath)}/d_{Path.GetFileName(iconPath)}";
|
||||||
|
if (File.Exists(darkIconPath))
|
||||||
|
{
|
||||||
|
iconPath = darkIconPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
|
||||||
|
return new GUIContent(icon, tooltip);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !UNITY_2021_2_OR_NEWER
|
#if !UNITY_2021_2_OR_NEWER
|
||||||
@@ -102,12 +126,17 @@ namespace Coffee.UIEffectInternal
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
private static Action<Object, Texture2D> s_SetIconForObject = typeof(EditorGUIUtility)
|
private static Action<Object, Texture2D> s_SetIconForObject = typeof(EditorGUIUtility)
|
||||||
.GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic)
|
.GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic)
|
||||||
.CreateDelegate(typeof(Action<Object, Texture2D>), null) as Action<Object, Texture2D>;
|
?.CreateDelegate(typeof(Action<Object, Texture2D>), null) as Action<Object, Texture2D>;
|
||||||
|
|
||||||
[InitializeOnLoadMethod]
|
[InitializeOnLoadMethod]
|
||||||
private static void InitializeOnLoadMethod()
|
private static void InitializeOnLoadMethod()
|
||||||
{
|
{
|
||||||
if (Misc.isBatchOrBuilding) return;
|
if (Misc.isBatchOrBuilding) return;
|
||||||
|
if (s_SetIconForObject == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("Could not retrieve the object icon API.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var types = TypeCache.GetTypesWithAttribute(typeof(IconAttribute));
|
var types = TypeCache.GetTypesWithAttribute(typeof(IconAttribute));
|
||||||
var scripts = MonoImporter.GetAllRuntimeMonoScripts();
|
var scripts = MonoImporter.GetAllRuntimeMonoScripts();
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Get(Hash128 hash, ref T obj, Func<T> onCreate)
|
public void Get(Hash128 hash, ref T obj, Func<T> onCreate)
|
||||||
{
|
{
|
||||||
|
if (onCreate == null) return;
|
||||||
|
|
||||||
if (GetFromCache(hash, ref obj)) return;
|
if (GetFromCache(hash, ref obj)) return;
|
||||||
Add(hash, ref obj, onCreate());
|
Add(hash, ref obj, onCreate());
|
||||||
}
|
}
|
||||||
@@ -80,6 +82,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Get<TS>(Hash128 hash, ref T obj, Func<TS, T> onCreate, TS source)
|
public void Get<TS>(Hash128 hash, ref T obj, Func<TS, T> onCreate, TS source)
|
||||||
{
|
{
|
||||||
|
if (onCreate == null) return;
|
||||||
|
|
||||||
if (GetFromCache(hash, ref obj)) return;
|
if (GetFromCache(hash, ref obj)) return;
|
||||||
Add(hash, ref obj, onCreate(source));
|
Add(hash, ref obj, onCreate(source));
|
||||||
}
|
}
|
||||||
@@ -92,7 +96,7 @@ namespace Coffee.UIEffectInternal
|
|||||||
{
|
{
|
||||||
if (entry.storedObject == null)
|
if (entry.storedObject == null)
|
||||||
{
|
{
|
||||||
Release(ref entry.storedObject);
|
Remove(entry);
|
||||||
Profiler.EndSample();
|
Profiler.EndSample();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -127,10 +131,11 @@ namespace Coffee.UIEffectInternal
|
|||||||
Profiler.BeginSample("(COF)[ObjectRepository] Add");
|
Profiler.BeginSample("(COF)[ObjectRepository] Add");
|
||||||
var newEntry = 0 < _pool.Count ? _pool.Pop() : new Entry();
|
var newEntry = 0 < _pool.Count ? _pool.Pop() : new Entry();
|
||||||
newEntry.storedObject = newObject;
|
newEntry.storedObject = newObject;
|
||||||
|
newEntry.objectId = newObject.GetHashCode();
|
||||||
newEntry.hash = hash;
|
newEntry.hash = hash;
|
||||||
newEntry.reference = 1;
|
newEntry.reference = 1;
|
||||||
_cache[hash] = newEntry;
|
_cache[hash] = newEntry;
|
||||||
_objectKey[newObject.GetHashCode()] = hash;
|
_objectKey[newEntry.objectId] = hash;
|
||||||
Logger.Log(_name, $"<color=#03c700>Add</color>(total#{count}): {newEntry}");
|
Logger.Log(_name, $"<color=#03c700>Add</color>(total#{count}): {newEntry}");
|
||||||
Release(ref obj);
|
Release(ref obj);
|
||||||
obj = newObject;
|
obj = newObject;
|
||||||
@@ -175,7 +180,7 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
Profiler.BeginSample("(COF)[ObjectRepository] Remove");
|
Profiler.BeginSample("(COF)[ObjectRepository] Remove");
|
||||||
_cache.Remove(entry.hash);
|
_cache.Remove(entry.hash);
|
||||||
_objectKey.Remove(entry.storedObject.GetHashCode());
|
_objectKey.Remove(entry.objectId);
|
||||||
_pool.Push(entry);
|
_pool.Push(entry);
|
||||||
entry.reference = 0;
|
entry.reference = 0;
|
||||||
Logger.Log(_name, $"<color=#f29e03>Remove</color>(total#{_cache.Count}): {entry}");
|
Logger.Log(_name, $"<color=#f29e03>Remove</color>(total#{_cache.Count}): {entry}");
|
||||||
@@ -186,12 +191,14 @@ namespace Coffee.UIEffectInternal
|
|||||||
private class Entry
|
private class Entry
|
||||||
{
|
{
|
||||||
public Hash128 hash;
|
public Hash128 hash;
|
||||||
|
public int objectId;
|
||||||
public int reference;
|
public int reference;
|
||||||
public T storedObject;
|
public T storedObject;
|
||||||
|
|
||||||
public void Release(Action<T> onRelease)
|
public void Release(Action<T> onRelease)
|
||||||
{
|
{
|
||||||
reference = 0;
|
reference = 0;
|
||||||
|
objectId = 0;
|
||||||
if (storedObject != null)
|
if (storedObject != null)
|
||||||
{
|
{
|
||||||
onRelease?.Invoke(storedObject);
|
onRelease?.Invoke(storedObject);
|
||||||
|
|||||||
@@ -11,14 +11,20 @@ namespace Coffee.UIEffectInternal
|
|||||||
{
|
{
|
||||||
internal static class ShaderSampleImporter
|
internal static class ShaderSampleImporter
|
||||||
{
|
{
|
||||||
|
private static string s_ReadmeUrl;
|
||||||
private static (string shaderName, string sampleName, string version)[] s_Samples;
|
private static (string shaderName, string sampleName, string version)[] s_Samples;
|
||||||
private static (string guid, string fileName)[] s_DeprecatedShaders;
|
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_SampleNames = new Dictionary<string, string>();
|
||||||
private static readonly Dictionary<string, string> s_ShaderAliases = new Dictionary<string, string>();
|
private static readonly Dictionary<string, string> s_ShaderAliases = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
public static void RegisterReadmeUrl(string url)
|
||||||
|
{
|
||||||
|
s_ReadmeUrl = url;
|
||||||
|
}
|
||||||
|
|
||||||
public static void RegisterShaderSamples((string shaderName, string sampleName, string version)[] samples)
|
public static void RegisterShaderSamples((string shaderName, string sampleName, string version)[] samples)
|
||||||
{
|
{
|
||||||
if (IsBatchOrBuilding()) return;
|
if (samples == null || IsBatchOrBuilding()) return;
|
||||||
|
|
||||||
// Collect sample names.
|
// Collect sample names.
|
||||||
s_Samples = samples;
|
s_Samples = samples;
|
||||||
@@ -31,6 +37,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
public static void RegisterShaderAliases((string, string)[] aliases)
|
public static void RegisterShaderAliases((string, string)[] aliases)
|
||||||
{
|
{
|
||||||
|
if (aliases == null) return;
|
||||||
|
|
||||||
foreach (var (from, to) in aliases)
|
foreach (var (from, to) in aliases)
|
||||||
{
|
{
|
||||||
s_ShaderAliases[from] = to;
|
s_ShaderAliases[from] = to;
|
||||||
@@ -51,7 +59,7 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ImportShaderIfSelected(string shaderName)
|
public static bool ImportShaderIfSelected(string shaderName)
|
||||||
{
|
{
|
||||||
if (IsBatchOrBuilding()) return false;
|
if (string.IsNullOrEmpty(shaderName) || IsBatchOrBuilding()) return false;
|
||||||
|
|
||||||
if (s_ShaderAliases.TryGetValue(shaderName, out var alias))
|
if (s_ShaderAliases.TryGetValue(shaderName, out var alias))
|
||||||
{
|
{
|
||||||
@@ -62,6 +70,11 @@ namespace Coffee.UIEffectInternal
|
|||||||
if (s_SampleNames.TryGetValue(shaderName, out var sampleName))
|
if (s_SampleNames.TryGetValue(shaderName, out var sampleName))
|
||||||
{
|
{
|
||||||
var message = $"Import the sample '{sampleName}' to use the shader '{shaderName}'.";
|
var message = $"Import the sample '{sampleName}' to use the shader '{shaderName}'.";
|
||||||
|
if (!string.IsNullOrWhiteSpace(s_ReadmeUrl))
|
||||||
|
{
|
||||||
|
message += "\n\nFor details, please see the readme.";
|
||||||
|
}
|
||||||
|
|
||||||
return ImportSampleIfSelected(sampleName, message);
|
return ImportSampleIfSelected(sampleName, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,8 +98,22 @@ namespace Coffee.UIEffectInternal
|
|||||||
// Import the sample if selected.
|
// Import the sample if selected.
|
||||||
if (!string.IsNullOrEmpty(message))
|
if (!string.IsNullOrEmpty(message))
|
||||||
{
|
{
|
||||||
var selected = EditorUtility.DisplayDialog($"Import {sampleName}", message, "Import", "Cancel");
|
if (!string.IsNullOrWhiteSpace(s_ReadmeUrl))
|
||||||
if (!selected) return false;
|
{
|
||||||
|
var selected = EditorUtility.DisplayDialogComplex(
|
||||||
|
$"Import {sampleName}", message, "Import", "Cancel", "Show Readme");
|
||||||
|
if (selected == 2)
|
||||||
|
{
|
||||||
|
Application.OpenURL(s_ReadmeUrl);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selected != 0) return false;
|
||||||
|
}
|
||||||
|
else if (!EditorUtility.DisplayDialog($"Import {sampleName}", message, "Import", "Cancel"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the imported sample name from the list.
|
// Remove the imported sample name from the list.
|
||||||
@@ -112,7 +139,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
var path = AssetDatabase.GetAssetPath(shader);
|
var path = AssetDatabase.GetAssetPath(shader);
|
||||||
if (string.IsNullOrEmpty(path)) return null;
|
if (string.IsNullOrEmpty(path)) return null;
|
||||||
|
|
||||||
return AssetImporter.GetAtPath(path).userData;
|
var importer = AssetImporter.GetAtPath(path);
|
||||||
|
return importer != null ? importer.userData : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DeleteShader(string shaderName)
|
private static void DeleteShader(string shaderName)
|
||||||
|
|||||||
@@ -75,18 +75,18 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void InitializeShaderLookup()
|
public void InitializeShaderLookup()
|
||||||
{
|
{
|
||||||
var count = m_RegisteredShaders.Count;
|
|
||||||
if (count == 0) return;
|
|
||||||
|
|
||||||
if (_shaderByName == null)
|
if (_shaderByName == null)
|
||||||
{
|
{
|
||||||
_shaderByName = new Dictionary<string, Shader>(count);
|
_shaderByName = new Dictionary<string, Shader>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_shaderByName.Clear();
|
_shaderByName.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_RegisteredShaders == null) return;
|
||||||
|
|
||||||
|
var count = m_RegisteredShaders.Count;
|
||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
var s = m_RegisteredShaders[i];
|
var s = m_RegisteredShaders[i];
|
||||||
@@ -105,6 +105,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Shader FindShaderByName(string name)
|
public Shader FindShaderByName(string name)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(name)) return null;
|
||||||
|
|
||||||
if (_shaderByName != null && _shaderByName.TryGetValue(name, out var shader) && shader != null)
|
if (_shaderByName != null && _shaderByName.TryGetValue(name, out var shader) && shader != null)
|
||||||
{
|
{
|
||||||
return shader;
|
return shader;
|
||||||
@@ -120,6 +122,16 @@ namespace Coffee.UIEffectInternal
|
|||||||
{
|
{
|
||||||
if (shader == null) return null;
|
if (shader == null) return null;
|
||||||
|
|
||||||
|
if (_cachedOptionalShaders == null)
|
||||||
|
{
|
||||||
|
_cachedOptionalShaders = new Dictionary<int, string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_OptionalShaders == null)
|
||||||
|
{
|
||||||
|
m_OptionalShaders = new List<StringPair>();
|
||||||
|
}
|
||||||
|
|
||||||
// Already cached.
|
// Already cached.
|
||||||
var id = shader.GetHashCode();
|
var id = shader.GetHashCode();
|
||||||
if (_cachedOptionalShaders.TryGetValue(id, out var optionalShaderName))
|
if (_cachedOptionalShaders.TryGetValue(id, out var optionalShaderName))
|
||||||
@@ -141,6 +153,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
var pair = m_OptionalShaders[i];
|
var pair = m_OptionalShaders[i];
|
||||||
|
if (pair == null) continue;
|
||||||
|
|
||||||
if (pair.key != shaderName) continue;
|
if (pair.key != shaderName) continue;
|
||||||
optionalShader = FindShaderByName(pair.value);
|
optionalShader = FindShaderByName(pair.value);
|
||||||
if (optionalShader == null) continue;
|
if (optionalShader == null) continue;
|
||||||
@@ -178,7 +192,15 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
public void ClearCache()
|
public void ClearCache()
|
||||||
{
|
{
|
||||||
_cachedOptionalShaders.Clear();
|
if (_cachedOptionalShaders == null)
|
||||||
|
{
|
||||||
|
_cachedOptionalShaders = new Dictionary<int, string>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cachedOptionalShaders.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
_cachedVariants.Clear();
|
_cachedVariants.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +235,10 @@ namespace Coffee.UIEffectInternal
|
|||||||
|
|
||||||
// Register optional shader names by shader comment.
|
// Register optional shader names by shader comment.
|
||||||
var pattern = $"// \\[OptionalShader\\] {packageName}: (.*)$";
|
var pattern = $"// \\[OptionalShader\\] {packageName}: (.*)$";
|
||||||
var registeredKeys = new HashSet<string>(m_OptionalShaders.Select(x => x.key));
|
m_OptionalShaders = m_OptionalShaders ?? new List<StringPair>();
|
||||||
|
var registeredKeys = new HashSet<string>(m_OptionalShaders
|
||||||
|
.Where(x => x != null)
|
||||||
|
.Select(x => x.key));
|
||||||
var keys = File.ReadLines(path)
|
var keys = File.ReadLines(path)
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.Select(line => Regex.Match(line, pattern))
|
.Select(line => Regex.Match(line, pattern))
|
||||||
@@ -279,24 +304,34 @@ namespace Coffee.UIEffectInternal
|
|||||||
if (m_Asset == null) return;
|
if (m_Asset == null) return;
|
||||||
var so = new SerializedObject(m_Asset);
|
var so = new SerializedObject(m_Asset);
|
||||||
var shaders = so.FindProperty("m_Shaders");
|
var shaders = so.FindProperty("m_Shaders");
|
||||||
m_RegisteredShaders.Clear();
|
if (shaders == null) return;
|
||||||
for (var i = 0; i < shaders.arraySize; i++)
|
|
||||||
|
// Get all shaders in the SVC, ignoring nulls and duplicates.
|
||||||
|
var shadersInSVC = Enumerable.Range(0, shaders.arraySize)
|
||||||
|
.Select(i =>
|
||||||
|
shaders.GetArrayElementAtIndex(i).FindPropertyRelative("first").objectReferenceValue as Shader)
|
||||||
|
.Where(s => s != null)
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// ShaderVariantCollection entry order is not stable between editor sessions.
|
||||||
|
// The registry is a lookup set, so an order-only difference is already in sync.
|
||||||
|
m_RegisteredShaders = m_RegisteredShaders ?? new List<Shader>();
|
||||||
|
if (m_RegisteredShaders.Count == shadersInSVC.Count &&
|
||||||
|
new HashSet<Shader>(m_RegisteredShaders).SetEquals(shadersInSVC))
|
||||||
{
|
{
|
||||||
var shaderRef = shaders.GetArrayElementAtIndex(i)
|
return;
|
||||||
.FindPropertyRelative("first")
|
|
||||||
.objectReferenceValue as Shader;
|
|
||||||
if (shaderRef != null && !m_RegisteredShaders.Contains(shaderRef))
|
|
||||||
{
|
|
||||||
m_RegisteredShaders.Add(shaderRef);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_RegisteredShaders.Clear();
|
||||||
|
m_RegisteredShaders.AddRange(shadersInSVC);
|
||||||
EditorUtility.SetDirty(owner);
|
EditorUtility.SetDirty(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void RegisterVariant(Material material, string path)
|
internal void RegisterVariant(Material material, string path)
|
||||||
{
|
{
|
||||||
if (material == null || material.shader == null || m_Asset == null) return;
|
if (material == null || material.shader == null || m_Asset == null) return;
|
||||||
|
m_UnregisteredVariants = m_UnregisteredVariants ?? new List<StringPair>();
|
||||||
|
|
||||||
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] RegisterVariant");
|
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] RegisterVariant");
|
||||||
var (variant, pair) = GetVariant(material);
|
var (variant, pair) = GetVariant(material);
|
||||||
|
|||||||
@@ -66,9 +66,16 @@ namespace Coffee.UIEffectInternal
|
|||||||
CanvasUpdateRegistry.IsRebuildingLayout();
|
CanvasUpdateRegistry.IsRebuildingLayout();
|
||||||
#if TMP_ENABLE
|
#if TMP_ENABLE
|
||||||
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
|
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
|
||||||
var _ = typeof(TMPro.TMP_UpdateManager)
|
var property = typeof(TMPro.TMP_UpdateManager)
|
||||||
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
|
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static);
|
||||||
.GetValue(null);
|
if (property == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("Could not retrieve the TextMeshPro update manager.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var _ = property.GetValue(null);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
|
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
|
||||||
Canvas.willRenderCanvases += OnAfterCanvasRebuild;
|
Canvas.willRenderCanvases += OnAfterCanvasRebuild;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Coffee.UIEffects.Timeline
|
|||||||
public Color Get(float time)
|
public Color Get(float time)
|
||||||
{
|
{
|
||||||
return m_Tween
|
return m_Tween
|
||||||
? Color.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
|
? Color.Lerp(m_From, m_Value, m_Curve != null ? m_Curve.Evaluate(time) : time)
|
||||||
: m_Value;
|
: m_Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Coffee.UIEffects.Timeline
|
|||||||
public float Get(float time)
|
public float Get(float time)
|
||||||
{
|
{
|
||||||
return m_Tween
|
return m_Tween
|
||||||
? Mathf.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
|
? Mathf.Lerp(m_From, m_Value, m_Curve != null ? m_Curve.Evaluate(time) : time)
|
||||||
: m_Value;
|
: m_Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace Coffee.UIEffects.Timeline
|
|||||||
|
|
||||||
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
||||||
{
|
{
|
||||||
var playable = ScriptPlayable<T>.Create(graph, m_Data);
|
var playable = ScriptPlayable<T>.Create(graph, m_Data ??= new T());
|
||||||
var behaviour = playable.GetBehaviour();
|
var behaviour = playable.GetBehaviour();
|
||||||
behaviour.clip = this;
|
behaviour.clip = this;
|
||||||
return playable;
|
return playable;
|
||||||
@@ -126,7 +126,11 @@ namespace Coffee.UIEffects.Timeline
|
|||||||
|
|
||||||
var playableInput = (ScriptPlayable<TBehavior>)playable.GetInput(i);
|
var playableInput = (ScriptPlayable<TBehavior>)playable.GetInput(i);
|
||||||
var input = playableInput.GetBehaviour();
|
var input = playableInput.GetBehaviour();
|
||||||
var normalizedTime = (float)(playableInput.GetTime() / input.clip.timelineClip.duration);
|
var clip = input != null ? input.clip : null;
|
||||||
|
var timelineClip = clip != null ? clip.timelineClip : null;
|
||||||
|
if (timelineClip == null || timelineClip.duration <= 0) return;
|
||||||
|
|
||||||
|
var normalizedTime = (float)(playableInput.GetTime() / timelineClip.duration);
|
||||||
|
|
||||||
value = Add(value, input.Get(normalizedTime), weight / totalWeight);
|
value = Add(value, input.Get(normalizedTime), weight / totalWeight);
|
||||||
totalWeight += weight;
|
totalWeight += weight;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using UnityEngine.Rendering;
|
|||||||
|
|
||||||
namespace Coffee.UIEffects
|
namespace Coffee.UIEffects
|
||||||
{
|
{
|
||||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
[Icon("Packages/com.coffee.ui-effect/Editor/Icons/UIEffectIconIcon.png")]
|
||||||
[ExecuteAlways]
|
[ExecuteAlways]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
public class UIEffect : UIEffectBase
|
public class UIEffect : UIEffectBase
|
||||||
@@ -266,6 +266,12 @@ namespace Coffee.UIEffects
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Vector2 m_DetailTexSpeed = new Vector2(0, 0);
|
protected Vector2 m_DetailTexSpeed = new Vector2(0, 0);
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
protected RoundCornerMode m_RoundCornerMode = RoundCornerMode.Off;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
protected Vector4 m_RoundCornerRadius = new Vector4(20, 20, 20, 20);
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected RectTransform m_CustomRoot = null;
|
protected RectTransform m_CustomRoot = null;
|
||||||
|
|
||||||
@@ -843,7 +849,7 @@ namespace Coffee.UIEffects
|
|||||||
if (m_ShadowMode == value) return;
|
if (m_ShadowMode == value) return;
|
||||||
context.m_ShadowMode = m_ShadowMode = value;
|
context.m_ShadowMode = m_ShadowMode = value;
|
||||||
SetVerticesDirty();
|
SetVerticesDirty();
|
||||||
SetVerticesDirty();
|
SetMaterialDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1423,6 +1429,71 @@ namespace Coffee.UIEffects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector4 roundCornerRadius
|
||||||
|
{
|
||||||
|
get => m_RoundCornerRadius;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
value = new Vector4(
|
||||||
|
Mathf.Max(0, value.x),
|
||||||
|
Mathf.Max(0, value.y),
|
||||||
|
Mathf.Max(0, value.z),
|
||||||
|
Mathf.Max(0, value.w));
|
||||||
|
if (m_RoundCornerRadius.x == value.x
|
||||||
|
&& m_RoundCornerRadius.y == value.y
|
||||||
|
&& m_RoundCornerRadius.z == value.z
|
||||||
|
&& m_RoundCornerRadius.w == value.w)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
context.m_RoundCornerRadius = m_RoundCornerRadius = value;
|
||||||
|
SetMaterialDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoundCornerMode roundCornerMode
|
||||||
|
{
|
||||||
|
get => m_RoundCornerMode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (m_RoundCornerMode == value) return;
|
||||||
|
context.m_RoundCornerMode = m_RoundCornerMode = value;
|
||||||
|
SetMaterialDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float roundCornerRadiusTopLeft
|
||||||
|
{
|
||||||
|
get => m_RoundCornerRadius.x;
|
||||||
|
set => SetRoundCornerRadius(0, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float roundCornerRadiusTopRight
|
||||||
|
{
|
||||||
|
get => m_RoundCornerRadius.y;
|
||||||
|
set => SetRoundCornerRadius(1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float roundCornerRadiusBottomRight
|
||||||
|
{
|
||||||
|
get => m_RoundCornerRadius.z;
|
||||||
|
set => SetRoundCornerRadius(2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float roundCornerRadiusBottomLeft
|
||||||
|
{
|
||||||
|
get => m_RoundCornerRadius.w;
|
||||||
|
set => SetRoundCornerRadius(3, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetRoundCornerRadius(int index, float value)
|
||||||
|
{
|
||||||
|
var radius = m_RoundCornerRadius;
|
||||||
|
radius[index] = value;
|
||||||
|
roundCornerRadius = radius;
|
||||||
|
}
|
||||||
|
|
||||||
public bool allowToModifyMeshShape
|
public bool allowToModifyMeshShape
|
||||||
{
|
{
|
||||||
get => m_AllowToModifyMeshShape;
|
get => m_AllowToModifyMeshShape;
|
||||||
@@ -1473,6 +1544,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
protected override void OnDestroy()
|
protected override void OnDestroy()
|
||||||
{
|
{
|
||||||
|
base.OnDestroy();
|
||||||
InternalListPool<UIEffectReplica>.Return(ref _replicas);
|
InternalListPool<UIEffectReplica>.Return(ref _replicas);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1487,6 +1559,8 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
|
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
|
||||||
{
|
{
|
||||||
|
if (selection == null) return;
|
||||||
|
|
||||||
var selected = 0 < selection.Length
|
var selected = 0 < selection.Length
|
||||||
&& (selection.Contains(gameObject)
|
&& (selection.Contains(gameObject)
|
||||||
|| replicas.Any(x => x != null && selection.Contains(x.gameObject)));
|
|| replicas.Any(x => x != null && selection.Contains(x.gameObject)));
|
||||||
@@ -1538,6 +1612,7 @@ namespace Coffee.UIEffects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetGradientKeys(Gradient gradient)
|
public void SetGradientKeys(Gradient gradient)
|
||||||
{
|
{
|
||||||
|
if (gradient == null) return;
|
||||||
SetGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
|
SetGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1557,6 +1632,7 @@ namespace Coffee.UIEffects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetTransitionGradientKeys(Gradient gradient)
|
public void SetTransitionGradientKeys(Gradient gradient)
|
||||||
{
|
{
|
||||||
|
if (gradient == null) return;
|
||||||
SetTransitionGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
|
SetTransitionGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1605,7 +1681,7 @@ namespace Coffee.UIEffects
|
|||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (!replicas[i]) continue;
|
if (!replicas[i]) continue;
|
||||||
replicas[i].ApplyContextToMaterial(material);
|
replicas[i].ApplyContextToMaterial(replicas[i].effectMaterial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1832,6 +1908,12 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!append || src.m_RoundCornerMode != RoundCornerMode.Off)
|
||||||
|
{
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
}
|
||||||
|
|
||||||
if (!append || src.m_Flip != 0)
|
if (!append || src.m_Flip != 0)
|
||||||
{
|
{
|
||||||
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
||||||
@@ -1964,6 +2046,12 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!append || src.m_RoundCornerMode != RoundCornerMode.Off)
|
||||||
|
{
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
}
|
||||||
|
|
||||||
if (!append || src.m_Flip != 0)
|
if (!append || src.m_Flip != 0)
|
||||||
{
|
{
|
||||||
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
||||||
@@ -2020,9 +2108,13 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
|
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
|
||||||
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
|
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
|
||||||
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
|
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
|
||||||
dst.m_TransitionGradient.SetKeys(src.m_TransitionGradient.colorKeys,
|
if (src.m_TransitionGradient != null)
|
||||||
src.m_TransitionGradient.alphaKeys);
|
{
|
||||||
dst.m_TransitionGradient.mode = src.m_TransitionGradient.mode;
|
dst.m_TransitionGradient ??= new Gradient();
|
||||||
|
dst.m_TransitionGradient.SetKeys(src.m_TransitionGradient.colorKeys,
|
||||||
|
src.m_TransitionGradient.alphaKeys);
|
||||||
|
dst.m_TransitionGradient.mode = src.m_TransitionGradient.mode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!append || src.m_TargetMode != TargetMode.None)
|
if (!append || src.m_TargetMode != TargetMode.None)
|
||||||
@@ -2075,8 +2167,14 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_GradationColor2 = src.m_GradationColor2;
|
dst.m_GradationColor2 = src.m_GradationColor2;
|
||||||
dst.m_GradationColor3 = src.m_GradationColor3;
|
dst.m_GradationColor3 = src.m_GradationColor3;
|
||||||
dst.m_GradationColor4 = src.m_GradationColor4;
|
dst.m_GradationColor4 = src.m_GradationColor4;
|
||||||
dst.m_GradationGradient.SetKeys(src.m_GradationGradient.colorKeys, src.m_GradationGradient.alphaKeys);
|
if (src.m_GradationGradient != null)
|
||||||
dst.m_GradationGradient.mode = src.m_GradationGradient.mode;
|
{
|
||||||
|
dst.m_GradationGradient ??= new Gradient();
|
||||||
|
dst.m_GradationGradient.SetKeys(src.m_GradationGradient.colorKeys,
|
||||||
|
src.m_GradationGradient.alphaKeys);
|
||||||
|
dst.m_GradationGradient.mode = src.m_GradationGradient.mode;
|
||||||
|
}
|
||||||
|
|
||||||
dst.m_GradationOffset = src.m_GradationOffset;
|
dst.m_GradationOffset = src.m_GradationOffset;
|
||||||
dst.m_GradationScale = src.m_GradationScale;
|
dst.m_GradationScale = src.m_GradationScale;
|
||||||
dst.m_GradationRotation = src.m_GradationRotation;
|
dst.m_GradationRotation = src.m_GradationRotation;
|
||||||
@@ -2096,6 +2194,12 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!append || src.m_RoundCornerMode != RoundCornerMode.Off)
|
||||||
|
{
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
}
|
||||||
|
|
||||||
if (!append || src.m_Flip != 0)
|
if (!append || src.m_Flip != 0)
|
||||||
{
|
{
|
||||||
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
dst.m_Flip = append ? dst.m_Flip | src.m_Flip : src.m_Flip;
|
||||||
@@ -2189,6 +2293,9 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
|
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
|
||||||
dst.m_Flip = src.m_Flip;
|
dst.m_Flip = src.m_Flip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,10 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
private void OnAfterCanvasRebuild()
|
private void OnAfterCanvasRebuild()
|
||||||
{
|
{
|
||||||
if (_material == null || graphic == null || canvas == null || context == null) return;
|
var g = graphic;
|
||||||
|
var c = canvas;
|
||||||
|
var ctx = context;
|
||||||
|
if (_material == null || g == null || c == null || ctx == null) return;
|
||||||
|
|
||||||
if (_isContextDirty)
|
if (_isContextDirty)
|
||||||
{
|
{
|
||||||
@@ -145,9 +148,14 @@ namespace Coffee.UIEffects
|
|||||||
ApplyContextToMaterial(GetCurrentMaterial());
|
ApplyContextToMaterial(GetCurrentMaterial());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!context.useViewMatrix) return;
|
if (!ctx.useViewMatrix) return;
|
||||||
|
|
||||||
context.UpdateViewMatrix(GetCurrentMaterial(), transitionRoot, canvas.rootCanvas);
|
var material = GetCurrentMaterial();
|
||||||
|
var root = transitionRoot;
|
||||||
|
var rootCanvas = c.rootCanvas;
|
||||||
|
if (material == null || root == null || rootCanvas == null) return;
|
||||||
|
|
||||||
|
ctx.UpdateViewMatrix(material, root, rootCanvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnCanvasHierarchyChanged()
|
protected override void OnCanvasHierarchyChanged()
|
||||||
@@ -162,12 +170,17 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public virtual void ModifyMesh(VertexHelper vh)
|
public virtual void ModifyMesh(VertexHelper vh)
|
||||||
{
|
{
|
||||||
if (!isActiveAndEnabled || context == null) return;
|
if (!isActiveAndEnabled || vh == null) return;
|
||||||
|
|
||||||
|
var g = graphic;
|
||||||
|
var ctx = context;
|
||||||
|
var root = transitionRoot;
|
||||||
|
if (g == null || ctx == null || root == null) return;
|
||||||
|
|
||||||
_canModifyMesh = CanModifyMesh();
|
_canModifyMesh = CanModifyMesh();
|
||||||
if (_canModifyMesh)
|
if (_canModifyMesh)
|
||||||
{
|
{
|
||||||
context.ModifyMesh(graphic, canvas, transitionRoot, vh, canModifyShape);
|
ctx.ModifyMesh(g, canvas, root, vh, canModifyShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,6 +191,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
// The transitionRoot is same as the transform => true.
|
// The transitionRoot is same as the transform => true.
|
||||||
var root = transitionRoot;
|
var root = transitionRoot;
|
||||||
|
if (root == null) return false;
|
||||||
if (transform == root) return true;
|
if (transform == root) return true;
|
||||||
|
|
||||||
// The transitionRoot is not visible => false.
|
// The transitionRoot is not visible => false.
|
||||||
@@ -251,22 +265,22 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public virtual void SetVerticesDirty()
|
public virtual void SetVerticesDirty()
|
||||||
{
|
{
|
||||||
if (graphic != null)
|
var g = graphic;
|
||||||
{
|
if (g == null) return;
|
||||||
graphic.SetVerticesDirty();
|
|
||||||
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, enabled);
|
g.SetVerticesDirty();
|
||||||
Misc.QueuePlayerLoopUpdate();
|
GraphicProxy.Find(g)?.SetVerticesDirty(g, enabled);
|
||||||
}
|
Misc.QueuePlayerLoopUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetMaterialDirty()
|
public virtual void SetMaterialDirty()
|
||||||
{
|
{
|
||||||
if (graphic != null)
|
var g = graphic;
|
||||||
{
|
if (g == null) return;
|
||||||
graphic.SetMaterialDirty();
|
|
||||||
SetMaterialContextDirty();
|
g.SetMaterialDirty();
|
||||||
Misc.QueuePlayerLoopUpdate();
|
SetMaterialContextDirty();
|
||||||
}
|
Misc.QueuePlayerLoopUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetMaterialContextDirty()
|
public virtual void SetMaterialContextDirty()
|
||||||
@@ -274,6 +288,13 @@ namespace Coffee.UIEffects
|
|||||||
_isContextDirty = true;
|
_isContextDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetMaterialContextAllDirty()
|
||||||
|
{
|
||||||
|
_isContextDirty = true;
|
||||||
|
context.SetGradationDirty();
|
||||||
|
context.SetTransitionGradationDirty();
|
||||||
|
}
|
||||||
|
|
||||||
internal void ReleaseMaterial()
|
internal void ReleaseMaterial()
|
||||||
{
|
{
|
||||||
MaterialRepository.Release(ref _material);
|
MaterialRepository.Release(ref _material);
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ namespace Coffee.UIEffects
|
|||||||
private static readonly int s_DetailTex = Shader.PropertyToID("_DetailTex");
|
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_ST = Shader.PropertyToID("_DetailTex_ST");
|
||||||
private static readonly int s_DetailTex_Speed = Shader.PropertyToID("_DetailTex_Speed");
|
private static readonly int s_DetailTex_Speed = Shader.PropertyToID("_DetailTex_Speed");
|
||||||
|
private static readonly int s_RoundCornerRadius = Shader.PropertyToID("_RoundCornerRadius");
|
||||||
|
private static readonly int s_RoundCornerRectSize = Shader.PropertyToID("_RoundCornerRectSize");
|
||||||
private static readonly int s_GradationIntensity = Shader.PropertyToID("_GradationIntensity");
|
private static readonly int s_GradationIntensity = Shader.PropertyToID("_GradationIntensity");
|
||||||
private static readonly int s_GradationColorFilter = Shader.PropertyToID("_GradationColorFilter");
|
private static readonly int s_GradationColorFilter = Shader.PropertyToID("_GradationColorFilter");
|
||||||
private static readonly int s_GradationColor1 = Shader.PropertyToID("_GradationColor1");
|
private static readonly int s_GradationColor1 = Shader.PropertyToID("_GradationColor1");
|
||||||
@@ -67,8 +69,11 @@ namespace Coffee.UIEffects
|
|||||||
private static readonly int s_GradationTex_ST = Shader.PropertyToID("_GradationTex_ST");
|
private static readonly int s_GradationTex_ST = Shader.PropertyToID("_GradationTex_ST");
|
||||||
private static readonly int s_GradationRadial = Shader.PropertyToID("_GradationRadial");
|
private static readonly int s_GradationRadial = Shader.PropertyToID("_GradationRadial");
|
||||||
private static readonly int s_RootViewMatrix = Shader.PropertyToID("_RootViewMatrix");
|
private static readonly int s_RootViewMatrix = Shader.PropertyToID("_RootViewMatrix");
|
||||||
|
private static readonly int s_RoundCornerViewMatrix = Shader.PropertyToID("_RoundCornerViewMatrix");
|
||||||
private static readonly int s_GradViewMatrix = Shader.PropertyToID("_GradViewMatrix");
|
private static readonly int s_GradViewMatrix = Shader.PropertyToID("_GradViewMatrix");
|
||||||
private static readonly int s_MirrorRootViewMatrix = Shader.PropertyToID("_MirrorRootViewMatrix");
|
private static readonly int s_MirrorRootViewMatrix = Shader.PropertyToID("_MirrorRootViewMatrix");
|
||||||
|
private static readonly int s_MirrorRoundCornerViewMatrix =
|
||||||
|
Shader.PropertyToID("_MirrorRoundCornerViewMatrix");
|
||||||
private static readonly int s_MirrorGradViewMatrix = Shader.PropertyToID("_MirrorGradViewMatrix");
|
private static readonly int s_MirrorGradViewMatrix = Shader.PropertyToID("_MirrorGradViewMatrix");
|
||||||
private static readonly int s_CanvasToWorldMatrix = Shader.PropertyToID("_CanvasToWorldMatrix");
|
private static readonly int s_CanvasToWorldMatrix = Shader.PropertyToID("_CanvasToWorldMatrix");
|
||||||
|
|
||||||
@@ -147,6 +152,12 @@ namespace Coffee.UIEffects
|
|||||||
"GRADATION_COLOR4"
|
"GRADATION_COLOR4"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static readonly string[] s_RoundCornerKeywords =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"ROUND_CORNER_ON"
|
||||||
|
};
|
||||||
|
|
||||||
private static readonly Vector2[][] s_ShadowVectors = new[]
|
private static readonly Vector2[][] s_ShadowVectors = new[]
|
||||||
{
|
{
|
||||||
Array.Empty<Vector2>(), // None
|
Array.Empty<Vector2>(), // None
|
||||||
@@ -243,8 +254,17 @@ namespace Coffee.UIEffects
|
|||||||
public Vector2 m_DetailTexOffset;
|
public Vector2 m_DetailTexOffset;
|
||||||
public Vector2 m_DetailTexSpeed;
|
public Vector2 m_DetailTexSpeed;
|
||||||
|
|
||||||
|
public RoundCornerMode m_RoundCornerMode;
|
||||||
|
public Vector4 m_RoundCornerRadius;
|
||||||
|
|
||||||
public Flip m_Flip;
|
public Flip m_Flip;
|
||||||
|
|
||||||
|
private bool hasRoundCorner => m_RoundCornerMode == RoundCornerMode.On
|
||||||
|
&& (0 < m_RoundCornerRadius.x
|
||||||
|
|| 0 < m_RoundCornerRadius.y
|
||||||
|
|| 0 < m_RoundCornerRadius.z
|
||||||
|
|| 0 < m_RoundCornerRadius.w);
|
||||||
|
|
||||||
public bool willModifyMaterial => m_ToneFilter != ToneFilter.None
|
public bool willModifyMaterial => m_ToneFilter != ToneFilter.None
|
||||||
|| m_ColorFilter != ColorFilter.None
|
|| m_ColorFilter != ColorFilter.None
|
||||||
|| m_SamplingFilter != SamplingFilter.None
|
|| m_SamplingFilter != SamplingFilter.None
|
||||||
@@ -254,14 +274,16 @@ namespace Coffee.UIEffects
|
|||||||
|| m_ShadowMode != ShadowMode.None
|
|| m_ShadowMode != ShadowMode.None
|
||||||
|| m_EdgeMode != EdgeMode.None
|
|| m_EdgeMode != EdgeMode.None
|
||||||
|| m_DetailFilter != DetailFilter.None
|
|| m_DetailFilter != DetailFilter.None
|
||||||
|| m_GradationMode != GradationMode.None;
|
|| m_GradationMode != GradationMode.None
|
||||||
|
|| hasRoundCorner;
|
||||||
|
|
||||||
public bool willModifyVertex => willModifyMaterial;
|
public bool willModifyVertex => willModifyMaterial;
|
||||||
|
|
||||||
public bool useViewMatrix => m_TransitionFilter != TransitionFilter.None
|
public bool useViewMatrix => m_TransitionFilter != TransitionFilter.None
|
||||||
|| m_GradationMode != GradationMode.None
|
|| m_GradationMode != GradationMode.None
|
||||||
|| m_DetailFilter != DetailFilter.None
|
|| m_DetailFilter != DetailFilter.None
|
||||||
|| m_EdgeMode == EdgeMode.Shiny;
|
|| m_EdgeMode == EdgeMode.Shiny
|
||||||
|
|| hasRoundCorner;
|
||||||
|
|
||||||
private Texture2D _gradationRampTex;
|
private Texture2D _gradationRampTex;
|
||||||
private Texture2D _transitionRampTex;
|
private Texture2D _transitionRampTex;
|
||||||
@@ -299,7 +321,7 @@ namespace Coffee.UIEffects
|
|||||||
{
|
{
|
||||||
var x = m_GradationReverse ? w - 1 - i : i;
|
var x = m_GradationReverse ? w - 1 - i : i;
|
||||||
var t = (float)i / (w - 1);
|
var t = (float)i / (w - 1);
|
||||||
s_Colors[x] = ApplyColorSpace(m_GradationGradient.Evaluate(t));
|
s_Colors[x] = ApplyColorSpaceForGradient(m_GradationGradient.Evaluate(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
_gradationRampTex.wrapMode = m_GradationWrapMode;
|
_gradationRampTex.wrapMode = m_GradationWrapMode;
|
||||||
@@ -325,7 +347,7 @@ namespace Coffee.UIEffects
|
|||||||
for (var i = 0; i < w; i++)
|
for (var i = 0; i < w; i++)
|
||||||
{
|
{
|
||||||
var t = (float)i / (w - 1);
|
var t = (float)i / (w - 1);
|
||||||
s_Colors[i] = ApplyColorSpace(m_TransitionGradient.Evaluate(t));
|
s_Colors[i] = ApplyColorSpaceForGradient(m_TransitionGradient.Evaluate(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
s_Colors[w - 1].a = 0;
|
s_Colors[w - 1].a = 0;
|
||||||
@@ -434,6 +456,9 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
|
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
|
||||||
dst.m_Flip = src.m_Flip;
|
dst.m_Flip = src.m_Flip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,6 +564,8 @@ namespace Coffee.UIEffects
|
|||||||
new Vector4(m_DetailTexScale.x, m_DetailTexScale.y,
|
new Vector4(m_DetailTexScale.x, m_DetailTexScale.y,
|
||||||
m_DetailTexOffset.x, m_DetailTexOffset.y));
|
m_DetailTexOffset.x, m_DetailTexOffset.y));
|
||||||
material.SetVector(s_DetailTex_Speed, m_DetailTexSpeed);
|
material.SetVector(s_DetailTex_Speed, m_DetailTexSpeed);
|
||||||
|
material.SetVector(s_RoundCornerRadius, Vector4.zero);
|
||||||
|
material.SetVector(s_RoundCornerRectSize, Vector2.one);
|
||||||
|
|
||||||
SetKeyword(material, s_ToneKeywords, (int)m_ToneFilter);
|
SetKeyword(material, s_ToneKeywords, (int)m_ToneFilter);
|
||||||
SetKeyword(material, s_ColorKeywords, m_ColorFilter != 0 || m_ShadowMode != 0 ? 1 : 0);
|
SetKeyword(material, s_ColorKeywords, m_ColorFilter != 0 || m_ShadowMode != 0 ? 1 : 0);
|
||||||
@@ -547,6 +574,7 @@ namespace Coffee.UIEffects
|
|||||||
SetKeyword(material, s_EdgeKeywords, (int)m_EdgeMode);
|
SetKeyword(material, s_EdgeKeywords, (int)m_EdgeMode);
|
||||||
SetKeyword(material, s_DetailKeywords, (int)m_DetailFilter);
|
SetKeyword(material, s_DetailKeywords, (int)m_DetailFilter);
|
||||||
SetKeyword(material, s_TargetKeywords, (int)m_TargetMode);
|
SetKeyword(material, s_TargetKeywords, (int)m_TargetMode);
|
||||||
|
SetKeyword(material, s_RoundCornerKeywords, (int)m_RoundCornerMode);
|
||||||
|
|
||||||
switch (m_GradationMode)
|
switch (m_GradationMode)
|
||||||
{
|
{
|
||||||
@@ -589,7 +617,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public void UpdateViewMatrix(Material material, RectTransform transitionRoot, Canvas canvas)
|
public void UpdateViewMatrix(Material material, RectTransform transitionRoot, Canvas canvas)
|
||||||
{
|
{
|
||||||
if (material == null) return;
|
if (material == null || transitionRoot == null || canvas == null) return;
|
||||||
|
|
||||||
var size = transitionRoot.rect.size;
|
var size = transitionRoot.rect.size;
|
||||||
var scale = new Vector3(1f / size.x, 1f / size.y, 1f);
|
var scale = new Vector3(1f / size.x, 1f / size.y, 1f);
|
||||||
@@ -608,6 +636,26 @@ namespace Coffee.UIEffects
|
|||||||
var offset = (transitionRoot.pivot - (Vector2)pivot) * size;
|
var offset = (transitionRoot.pivot - (Vector2)pivot) * size;
|
||||||
var w2LMat = Matrix4x4.Translate(offset) * transitionRoot.worldToLocalMatrix;
|
var w2LMat = Matrix4x4.Translate(offset) * transitionRoot.worldToLocalMatrix;
|
||||||
|
|
||||||
|
var roundCornerNormalization = Mathf.Min(size.x, size.y);
|
||||||
|
var roundCornerRectSize = Vector2.one;
|
||||||
|
var roundCornerRadius = Vector4.zero;
|
||||||
|
if (m_RoundCornerMode == RoundCornerMode.On && 0 < roundCornerNormalization)
|
||||||
|
{
|
||||||
|
roundCornerRectSize = size / roundCornerNormalization;
|
||||||
|
roundCornerRadius = new Vector4(
|
||||||
|
Mathf.Clamp(m_RoundCornerRadius.x / roundCornerNormalization, 0, 0.5f),
|
||||||
|
Mathf.Clamp(m_RoundCornerRadius.y / roundCornerNormalization, 0, 0.5f),
|
||||||
|
Mathf.Clamp(m_RoundCornerRadius.z / roundCornerNormalization, 0, 0.5f),
|
||||||
|
Mathf.Clamp(m_RoundCornerRadius.w / roundCornerNormalization, 0, 0.5f));
|
||||||
|
}
|
||||||
|
|
||||||
|
material.SetVector(s_RoundCornerRadius, roundCornerRadius);
|
||||||
|
material.SetVector(s_RoundCornerRectSize, roundCornerRectSize);
|
||||||
|
|
||||||
|
var roundCornerScale = new Vector3(1f / size.x, 1f / size.y, 1f);
|
||||||
|
material.SetMatrix(s_RoundCornerViewMatrix,
|
||||||
|
Matrix4x4.TRS(pivot, Quaternion.identity, roundCornerScale) * w2LMat);
|
||||||
|
|
||||||
var rootRotation = Quaternion.Euler(0, 0, m_TransitionRotation);
|
var rootRotation = Quaternion.Euler(0, 0, m_TransitionRotation);
|
||||||
var rootScale = 1f / GetMultiplier(m_TransitionRotation);
|
var rootScale = 1f / GetMultiplier(m_TransitionRotation);
|
||||||
material.SetMatrix(s_RootViewMatrix, Matrix4x4.TRS(pivot, rootRotation, scale * rootScale) * w2LMat);
|
material.SetMatrix(s_RootViewMatrix, Matrix4x4.TRS(pivot, rootRotation, scale * rootScale) * w2LMat);
|
||||||
@@ -624,6 +672,8 @@ namespace Coffee.UIEffects
|
|||||||
var mirrorScale = new Vector3(1, mirrorInv, 1);
|
var mirrorScale = new Vector3(1, mirrorInv, 1);
|
||||||
var udScale = new Vector3(scale.x, -scale.y, scale.z);
|
var udScale = new Vector3(scale.x, -scale.y, scale.z);
|
||||||
var mirrorTranslation = Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat;
|
var mirrorTranslation = Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat;
|
||||||
|
material.SetMatrix(s_MirrorRoundCornerViewMatrix,
|
||||||
|
Matrix4x4.TRS(pivot, Quaternion.identity, roundCornerScale) * mirrorTranslation);
|
||||||
material.SetMatrix(
|
material.SetMatrix(
|
||||||
s_MirrorRootViewMatrix,
|
s_MirrorRootViewMatrix,
|
||||||
Matrix4x4.TRS(pivot, rootRotation, udScale * rootScale) * mirrorTranslation
|
Matrix4x4.TRS(pivot, rootRotation, udScale * rootScale) * mirrorTranslation
|
||||||
@@ -715,6 +765,8 @@ namespace Coffee.UIEffects
|
|||||||
public void ModifyMesh(Graphic graphic, Canvas canvas, RectTransform transitionRoot, VertexHelper vh,
|
public void ModifyMesh(Graphic graphic, Canvas canvas, RectTransform transitionRoot, VertexHelper vh,
|
||||||
bool canModifyShape)
|
bool canModifyShape)
|
||||||
{
|
{
|
||||||
|
if (graphic == null || transitionRoot == null || vh == null) return;
|
||||||
|
|
||||||
// Apply flip (without effect).
|
// Apply flip (without effect).
|
||||||
ApplyFlipWithoutEffect(vh, m_Flip);
|
ApplyFlipWithoutEffect(vh, m_Flip);
|
||||||
|
|
||||||
@@ -722,6 +774,7 @@ namespace Coffee.UIEffects
|
|||||||
if (!willModifyVertex || count == 0) return;
|
if (!willModifyVertex || count == 0) return;
|
||||||
|
|
||||||
var effectProxy = GraphicProxy.Find(graphic);
|
var effectProxy = GraphicProxy.Find(graphic);
|
||||||
|
if (effectProxy == null) return;
|
||||||
var isText = effectProxy.IsText(graphic);
|
var isText = effectProxy.IsText(graphic);
|
||||||
effectProxy.OnPreModifyMesh(graphic, canvas);
|
effectProxy.OnPreModifyMesh(graphic, canvas);
|
||||||
|
|
||||||
@@ -848,6 +901,19 @@ namespace Coffee.UIEffects
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Color ApplyColorSpace(Color color)
|
private static Color ApplyColorSpace(Color color)
|
||||||
|
{
|
||||||
|
// v5.11.9 or later, color correction is applied to the color filter and gradation colors.
|
||||||
|
if (UIEffectProjectSettings.enableColorCorrection)
|
||||||
|
{
|
||||||
|
return QualitySettings.activeColorSpace == ColorSpace.Linear ? color : color.gamma;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return QualitySettings.activeColorSpace == ColorSpace.Linear ? color.linear : color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Color ApplyColorSpaceForGradient(Color color)
|
||||||
{
|
{
|
||||||
return QualitySettings.activeColorSpace == ColorSpace.Linear ? color.linear : color;
|
return QualitySettings.activeColorSpace == ColorSpace.Linear ? color.linear : color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,10 +117,15 @@ namespace Coffee.UIEffects
|
|||||||
public Vector2 m_DetailTexOffset = new Vector2(0, 0);
|
public Vector2 m_DetailTexOffset = new Vector2(0, 0);
|
||||||
public Vector2 m_DetailTexSpeed = new Vector2(0, 0);
|
public Vector2 m_DetailTexSpeed = new Vector2(0, 0);
|
||||||
|
|
||||||
|
public RoundCornerMode m_RoundCornerMode = RoundCornerMode.Off;
|
||||||
|
public Vector4 m_RoundCornerRadius = new Vector4(20, 20, 20, 20);
|
||||||
|
|
||||||
public Flip m_Flip = 0;
|
public Flip m_Flip = 0;
|
||||||
|
|
||||||
public void UpdateContext(UIEffectContext dst)
|
public void UpdateContext(UIEffectContext dst)
|
||||||
{
|
{
|
||||||
|
if (dst == null) return;
|
||||||
|
|
||||||
var src = this;
|
var src = this;
|
||||||
dst.m_ToneFilter = src.m_ToneFilter;
|
dst.m_ToneFilter = src.m_ToneFilter;
|
||||||
dst.m_ToneIntensity = src.m_ToneIntensity;
|
dst.m_ToneIntensity = src.m_ToneIntensity;
|
||||||
@@ -204,6 +209,9 @@ namespace Coffee.UIEffects
|
|||||||
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
||||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||||
|
|
||||||
|
dst.m_RoundCornerMode = src.m_RoundCornerMode;
|
||||||
|
dst.m_RoundCornerRadius = src.m_RoundCornerRadius;
|
||||||
|
|
||||||
dst.m_Flip = src.m_Flip;
|
dst.m_Flip = src.m_Flip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,23 @@ namespace Coffee.UIEffects
|
|||||||
{
|
{
|
||||||
public class UIEffectProjectSettings : PreloadedProjectSettings<UIEffectProjectSettings>
|
public class UIEffectProjectSettings : PreloadedProjectSettings<UIEffectProjectSettings>
|
||||||
{
|
{
|
||||||
[Header("Setting")]
|
[HideInInspector]
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
internal List<UIEffect> m_RuntimePresets = new List<UIEffect>();
|
internal List<UIEffect> m_RuntimePresets = new List<UIEffect>();
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
internal List<UIEffectPreset> m_RuntimePresetsV2 = new List<UIEffectPreset>();
|
internal List<UIEffectPreset> m_RuntimePresetsV2 = new List<UIEffectPreset>();
|
||||||
|
|
||||||
|
[Header("Settings")]
|
||||||
|
[Tooltip("Whether to enable the color correction feature added in v5.11.9.\n" +
|
||||||
|
"If disabled, the color picker will not display the correct colors, but compatibility with previous versions can be maintained.")]
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField] private bool m_EnableColorCorrection = true;
|
||||||
|
|
||||||
[Header("Editor")]
|
[Header("Editor")]
|
||||||
[Tooltip("Use HDR color pickers on color fields.")]
|
[Tooltip("Use HDR color pickers on color fields.")]
|
||||||
|
[HideInInspector]
|
||||||
[SerializeField] private bool m_UseHDRColorPicker = true;
|
[SerializeField] private bool m_UseHDRColorPicker = true;
|
||||||
|
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
@@ -36,6 +44,16 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public static ShaderVariantCollection shaderVariantCollection => shaderRegistry.shaderVariantCollection;
|
public static ShaderVariantCollection shaderVariantCollection => shaderRegistry.shaderVariantCollection;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to enable the color correction feature added in v5.11.9.
|
||||||
|
/// If disabled, the color picker will not display the correct colors, but compatibility with previous
|
||||||
|
/// versions can be maintained.
|
||||||
|
/// </summary>
|
||||||
|
public static bool enableColorCorrection => instance.m_EnableColorCorrection;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to use HDR color pickers on color fields.
|
||||||
|
/// </summary>
|
||||||
public static bool useHdrColorPicker
|
public static bool useHdrColorPicker
|
||||||
{
|
{
|
||||||
get => instance.m_UseHDRColorPicker;
|
get => instance.m_UseHDRColorPicker;
|
||||||
@@ -101,11 +119,12 @@ namespace Coffee.UIEffects
|
|||||||
{
|
{
|
||||||
#if !LEGACY_TMP_ENABLE
|
#if !LEGACY_TMP_ENABLE
|
||||||
const string tmpSupport = "TextMeshPro Support (Unity 6)";
|
const string tmpSupport = "TextMeshPro Support (Unity 6)";
|
||||||
const string version = "v5.11.0 (Unity 6)";
|
const string version = "v5.15.0 (Unity 6)";
|
||||||
#else
|
#else
|
||||||
const string tmpSupport = "TextMeshPro Support";
|
const string tmpSupport = "TextMeshPro Support";
|
||||||
const string version = "v5.11.0";
|
const string version = "v5.15.0";
|
||||||
#endif
|
#endif
|
||||||
|
ShaderSampleImporter.RegisterReadmeUrl("https://github.com/mob-sakai/UIEffect#import-additional-resources");
|
||||||
ShaderSampleImporter.RegisterShaderSamples(new[]
|
ShaderSampleImporter.RegisterShaderSamples(new[]
|
||||||
{
|
{
|
||||||
// TextMeshPro Support/TextMeshPro Support (Unity 6)
|
// TextMeshPro Support/TextMeshPro Support (Unity 6)
|
||||||
@@ -119,8 +138,8 @@ namespace Coffee.UIEffects
|
|||||||
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version),
|
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version),
|
||||||
|
|
||||||
// ShaderGraph Support
|
// ShaderGraph Support
|
||||||
("Shader Graphs/UISample (UIEffect)", "ShaderGraph Support (Unity 6 BuiltIn)", "v5.11.0"),
|
("Shader Graphs/UISample (UIEffect)", "ShaderGraph Support (Unity 6 BuiltIn)", "v5.15.0"),
|
||||||
("Shader Graphs/UISampleURP (UIEffect)", "ShaderGraph Support (Unity 6 URP)", "v5.11.0")
|
("Shader Graphs/UISampleURP (UIEffect)", "ShaderGraph Support (Unity 6 URP)", "v5.15.0")
|
||||||
});
|
});
|
||||||
ShaderSampleImporter.RegisterShaderAliases(new[]
|
ShaderSampleImporter.RegisterShaderAliases(new[]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace Coffee.UIEffects
|
namespace Coffee.UIEffects
|
||||||
{
|
{
|
||||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
[Icon("Packages/com.coffee.ui-effect/Editor/Icons/UIEffectIconIcon.png")]
|
||||||
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
|
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
|
||||||
{
|
{
|
||||||
[SerializeField] private UIEffect m_Target;
|
[SerializeField] private UIEffect m_Target;
|
||||||
|
|||||||
@@ -2,11 +2,10 @@
|
|||||||
using Coffee.UIEffectInternal;
|
using Coffee.UIEffectInternal;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.Serialization;
|
|
||||||
|
|
||||||
namespace Coffee.UIEffects
|
namespace Coffee.UIEffects
|
||||||
{
|
{
|
||||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
[Icon("Packages/com.coffee.ui-effect/Editor/Icons/UIEffectIconIcon.png")]
|
||||||
[ExecuteAlways]
|
[ExecuteAlways]
|
||||||
[RequireComponent(typeof(UIEffectBase))]
|
[RequireComponent(typeof(UIEffectBase))]
|
||||||
public class UIEffectTweener : MonoBehaviour
|
public class UIEffectTweener : MonoBehaviour
|
||||||
@@ -94,7 +93,6 @@ namespace Coffee.UIEffects
|
|||||||
[Range(0f, 10)]
|
[Range(0f, 10)]
|
||||||
private float m_Interval;
|
private float m_Interval;
|
||||||
|
|
||||||
[FormerlySerializedAs("m_ResetTimeOnEnable")]
|
|
||||||
[Tooltip("Play the tween when the component is enabled.")]
|
[Tooltip("Play the tween when the component is enabled.")]
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private PlayOnEnable m_PlayOnEnable = PlayOnEnable.Forward;
|
private PlayOnEnable m_PlayOnEnable = PlayOnEnable.Forward;
|
||||||
@@ -315,7 +313,7 @@ namespace Coffee.UIEffects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public AnimationCurve curve
|
public AnimationCurve curve
|
||||||
{
|
{
|
||||||
get => m_Curve;
|
get => m_Curve ??= AnimationCurve.Linear(0, 0, 1, 1);
|
||||||
set => m_Curve = value;
|
set => m_Curve = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,19 +325,19 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public AnimationCurve reverseCurve
|
public AnimationCurve reverseCurve
|
||||||
{
|
{
|
||||||
get => m_ReverseCurve;
|
get => m_ReverseCurve ??= AnimationCurve.Linear(0, 0, 1, 1);
|
||||||
set => m_ReverseCurve = value;
|
set => m_ReverseCurve = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event to invoke when the tween has completed.
|
/// Event to invoke when the tween has completed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UnityEvent onComplete => m_OnComplete;
|
public UnityEvent onComplete => m_OnComplete ??= new UnityEvent();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event to invoke when the rate was changed.
|
/// Event to invoke when the rate was changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TweenerEvent onChangedRate => m_OnChangedRate;
|
public TweenerEvent onChangedRate => m_OnChangedRate ??= new TweenerEvent();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is the tween playing?
|
/// Is the tween playing?
|
||||||
@@ -423,7 +421,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
if (!isTweening)
|
if (!isTweening)
|
||||||
{
|
{
|
||||||
m_OnComplete.Invoke();
|
onComplete.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +442,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
if (!isTweening)
|
if (!isTweening)
|
||||||
{
|
{
|
||||||
m_OnComplete.Invoke();
|
onComplete.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +463,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
if (!isTweening)
|
if (!isTweening)
|
||||||
{
|
{
|
||||||
m_OnComplete.Invoke();
|
onComplete.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,7 +540,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
if (prevTweening && !isTweening)
|
if (prevTweening && !isTweening)
|
||||||
{
|
{
|
||||||
m_OnComplete.Invoke();
|
onComplete.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -576,7 +574,7 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
if (prevTweening && !isTweening)
|
if (prevTweening && !isTweening)
|
||||||
{
|
{
|
||||||
m_OnComplete.Invoke();
|
onComplete.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public static void Register(GraphicProxy proxy)
|
public static void Register(GraphicProxy proxy)
|
||||||
{
|
{
|
||||||
|
if (proxy == null) throw new ArgumentNullException(nameof(proxy));
|
||||||
|
|
||||||
// Register only once.
|
// Register only once.
|
||||||
var count = s_Proxies.Count;
|
var count = s_Proxies.Count;
|
||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
|
|||||||
@@ -54,6 +54,13 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
public override void SetVerticesDirty(Graphic graphic, bool enabled)
|
public override void SetVerticesDirty(Graphic graphic, bool enabled)
|
||||||
{
|
{
|
||||||
|
// TMP submeshes are updated only when the parent is rebuilt, so queue the parent even if the replica is disabled. (#416)
|
||||||
|
if (graphic is TMP_SubMeshUI subMeshUI)
|
||||||
|
{
|
||||||
|
graphic = subMeshUI.textComponent as TextMeshProUGUI;
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
|
||||||
{
|
{
|
||||||
if (enabled)
|
if (enabled)
|
||||||
@@ -213,6 +220,12 @@ namespace Coffee.UIEffects
|
|||||||
|
|
||||||
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
|
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
|
||||||
{
|
{
|
||||||
|
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) return;
|
||||||
|
if (textMeshProUGUI.textInfo == null || textMeshProUGUI.textInfo.meshInfo == null) return;
|
||||||
|
|
||||||
|
var canvasRenderer = textMeshProUGUI.canvasRenderer;
|
||||||
|
if (canvasRenderer == null) return;
|
||||||
|
|
||||||
if (s_Mesh == null)
|
if (s_Mesh == null)
|
||||||
{
|
{
|
||||||
s_Mesh = new Mesh();
|
s_Mesh = new Mesh();
|
||||||
@@ -229,18 +242,18 @@ namespace Coffee.UIEffects
|
|||||||
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
|
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
|
||||||
{
|
{
|
||||||
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
|
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
|
||||||
if (meshInfo.vertexCount == 0)
|
if (meshInfo.vertexCount == 0 || meshInfo.mesh == null)
|
||||||
{
|
{
|
||||||
// Clear mesh if no vertices.
|
// Clear mesh if no vertices.
|
||||||
s_Mesh.Clear(false);
|
s_Mesh.Clear(false);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
|
canvasRenderer.SetMesh(s_Mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, meshInfo.mesh, i - 1);
|
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, meshInfo.mesh, i - 1);
|
||||||
if (subMeshUI != null)
|
if (subMeshUI != null && subMeshUI.canvasRenderer != null)
|
||||||
{
|
{
|
||||||
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
||||||
}
|
}
|
||||||
@@ -259,7 +272,7 @@ namespace Coffee.UIEffects
|
|||||||
}
|
}
|
||||||
|
|
||||||
s_VertexHelper.FillMesh(s_Mesh);
|
s_VertexHelper.FillMesh(s_Mesh);
|
||||||
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
|
canvasRenderer.SetMesh(s_Mesh);
|
||||||
}
|
}
|
||||||
else if (i - 1 < subMeshes.Count)
|
else if (i - 1 < subMeshes.Count)
|
||||||
{
|
{
|
||||||
@@ -290,7 +303,10 @@ namespace Coffee.UIEffects
|
|||||||
}
|
}
|
||||||
|
|
||||||
s_VertexHelper.FillMesh(s_Mesh);
|
s_VertexHelper.FillMesh(s_Mesh);
|
||||||
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
if (subMeshUI.canvasRenderer != null)
|
||||||
|
{
|
||||||
|
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -541,8 +541,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Combination! <sprite=5>
|
m_text: Combination! <sprite=5>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -952,8 +952,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Soft Outline! <sprite=1>
|
m_text: Soft Outline! <sprite=1>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -1966,8 +1966,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: RETRO! <sprite=4>
|
m_text: RETRO! <sprite=4>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -2119,8 +2119,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Transition! <sprite=4>
|
m_text: Transition! <sprite=4>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -3271,8 +3271,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Feaver! <sprite=11>
|
m_text: Feaver! <sprite=11>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -4570,8 +4570,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Shiny! <sprite=3>
|
m_text: Shiny! <sprite=3>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -4942,8 +4942,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Scratch! <sprite=10>
|
m_text: Scratch! <sprite=10>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
@@ -5335,8 +5335,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Dot Pattern! <sprite=2>
|
m_text: Dot Pattern! <sprite=2>
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||||
m_sharedMaterial: {fileID: 4843226154402761971, guid: 9379b7b2236ab4c0e9f8d9f7db9936a8,
|
m_sharedMaterial: {fileID: 4843226154402761971, guid: bc6ef582a0efa420683ff976adff235a,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
|
|||||||
@@ -631,16 +631,16 @@ MonoBehaviour:
|
|||||||
m_SamplingWidth: 1
|
m_SamplingWidth: 1
|
||||||
m_SamplingScale: 1
|
m_SamplingScale: 1
|
||||||
m_TransitionFilter: 7
|
m_TransitionFilter: 7
|
||||||
m_TransitionRate: 0.25
|
m_TransitionRate: 0.187
|
||||||
m_TransitionReverse: 1
|
m_TransitionReverse: 1
|
||||||
m_TransitionTex: {fileID: 2800000, guid: 54e40a17ecd6a4b5a8a73a28042cdaa0, type: 3}
|
m_TransitionTex: {fileID: 2800000, guid: 54e40a17ecd6a4b5a8a73a28042cdaa0, type: 3}
|
||||||
m_TransitionTexScale: {x: 1.46, y: 2.46}
|
m_TransitionTexScale: {x: 1.46, y: 2.4}
|
||||||
m_TransitionTexOffset: {x: 0, y: 0}
|
m_TransitionTexOffset: {x: 0, y: 0}
|
||||||
m_TransitionTexSpeed: {x: 0.02, y: 0}
|
m_TransitionTexSpeed: {x: 0.05, y: 0}
|
||||||
m_TransitionRotation: 0
|
m_TransitionRotation: 0
|
||||||
m_TransitionKeepAspectRatio: 1
|
m_TransitionKeepAspectRatio: 1
|
||||||
m_TransitionWidth: 0.709
|
m_TransitionWidth: 1
|
||||||
m_TransitionSoftness: 0.39
|
m_TransitionSoftness: 0.592
|
||||||
m_TransitionRange:
|
m_TransitionRange:
|
||||||
m_Min: 0
|
m_Min: 0
|
||||||
m_Max: 1
|
m_Max: 1
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e428a82723f244e77b64d08fd256159d
|
|
||||||
@@ -48,6 +48,7 @@ namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
|
|||||||
.AddKeywordForUIEffect("DETAIL", "s_DetailKeywords") // add detail keywords
|
.AddKeywordForUIEffect("DETAIL", "s_DetailKeywords") // add detail keywords
|
||||||
.AddKeywordForUIEffect("TARGET", "s_TargetKeywords") // add target keywords
|
.AddKeywordForUIEffect("TARGET", "s_TargetKeywords") // add target keywords
|
||||||
.AddKeywordForUIEffect("GRADATION", "s_GradationKeywords") // add gradation keywords
|
.AddKeywordForUIEffect("GRADATION", "s_GradationKeywords") // add gradation keywords
|
||||||
|
.AddKeywordForUIEffect("ROUND_CORNER", "s_RoundCornerKeywords") // add round corner keywords
|
||||||
.AddKeywordForUIEffect("UIEFFECT_EDITOR", KeywordScope.Global) // add UIEffect editor keywords
|
.AddKeywordForUIEffect("UIEFFECT_EDITOR", KeywordScope.Global) // add UIEffect editor keywords
|
||||||
.AddKeywordForUIEffect("SOFTMASK_EDITOR", KeywordScope.Global) // add softmask editor keywords
|
.AddKeywordForUIEffect("SOFTMASK_EDITOR", KeywordScope.Global) // add softmask editor keywords
|
||||||
.AddKeywordForUIEffect("SOFTMASKABLE"); // add softmaskable keywords
|
.AddKeywordForUIEffect("SOFTMASKABLE"); // add softmaskable keywords
|
||||||
@@ -170,7 +171,12 @@ namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
|
|||||||
BlockFields.SurfaceDescription.Alpha,
|
BlockFields.SurfaceDescription.Alpha,
|
||||||
BlockFields.SurfaceDescription.AlphaClipThreshold
|
BlockFields.SurfaceDescription.AlphaClipThreshold
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if UNITY_6000_6_OR_NEWER
|
||||||
|
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(EntityId.None, graphItem, name, null, null);
|
||||||
|
#else
|
||||||
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, graphItem, name, null, null);
|
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, graphItem, name, null, null);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -4,7 +4,7 @@ ScriptedImporter:
|
|||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "com.coffee.ui-effect.shadergraph-builtin",
|
||||||
|
"displayName": "UI Effect - ShaderGraph Support (Unity 6 BuiltIn)",
|
||||||
|
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 BuiltIn).",
|
||||||
|
"version": "5.15.0",
|
||||||
|
"unity": "2020.3",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/mob-sakai/UIEffect.git"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "mob-sakai",
|
||||||
|
"email": "sakai861104@gmail.com",
|
||||||
|
"url": "https://github.com/mob-sakai"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"com.coffee.ui-effect": "5.15.0"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"ui",
|
||||||
|
"effect"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a1b972071582443e2845278a859a1533
|
guid: 2243ea0ee3ea34ea096e46b623d926bd
|
||||||
folderAsset: yes
|
TextScriptImporter:
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9d5fb70c6201e408ebe2e8941a0e5944
|
guid: 1982008f495034475a69725f8ac1e89f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
@@ -4,7 +4,7 @@ ScriptedImporter:
|
|||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e428a82723f244e77b64d08fd256159d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "com.coffee.ui-effect.shadergraph-urp",
|
||||||
|
"displayName": "UI Effect - ShaderGraph Support (Unity 6 URP)",
|
||||||
|
"description": "An extension for UI Effect that adds ShaderGraph support (Unity 6 URP).",
|
||||||
|
"version": "5.15.0",
|
||||||
|
"unity": "2020.3",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/mob-sakai/UIEffect.git"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "mob-sakai",
|
||||||
|
"email": "sakai861104@gmail.com",
|
||||||
|
"url": "https://github.com/mob-sakai"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"com.coffee.ui-effect": "5.15.0",
|
||||||
|
"com.coffee.ui-effect-shadergraph-builtin": "5.15.0"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"ui",
|
||||||
|
"effect"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c3e0358c9a5534ade85d2ae0f2847c55
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -66,6 +66,7 @@ SubShader {
|
|||||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
||||||
|
#pragma shader_feature_local_fragment _ ROUND_CORNER_ON
|
||||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||||
// ==== UIEFFECT END ====
|
// ==== UIEFFECT END ====
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 63a1dba10bff94661a909d63808a9a3b
|
guid: aaea88b5c038546249cc2fbbfd433653
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
nonModifiableTextures: []
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
@@ -65,6 +65,7 @@ SubShader{
|
|||||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
||||||
|
#pragma shader_feature_local_fragment _ ROUND_CORNER_ON
|
||||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||||
// ==== UIEFFECT END ====
|
// ==== UIEFFECT END ====
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: d1cb940e3804b4adcaf9b22083fadfad
|
guid: d7fcf3435fe6345a5995f77557af7796
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
nonModifiableTextures: []
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
@@ -135,6 +135,7 @@ SubShader {
|
|||||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
||||||
|
#pragma shader_feature_local_fragment _ ROUND_CORNER_ON
|
||||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||||
// ==== UIEFFECT END ====
|
// ==== UIEFFECT END ====
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 03ea49e29b5ad4fbe8e340af208fe8e7
|
guid: 3c531490ebb14455cb551108307bb116
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
nonModifiableTextures: []
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
@@ -135,6 +135,7 @@ SubShader {
|
|||||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
||||||
|
#pragma shader_feature_local_fragment _ ROUND_CORNER_ON
|
||||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||||
// ==== UIEFFECT END ====
|
// ==== UIEFFECT END ====
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 26b66f9b09b8d4ac6a2790c3fa8b21c1
|
guid: 55cf683721795488da0a0a4c9f0fa332
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
nonModifiableTextures: []
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
@@ -97,6 +97,7 @@ SubShader {
|
|||||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
|
||||||
|
#pragma shader_feature_local_fragment _ ROUND_CORNER_ON
|
||||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||||
// ==== UIEFFECT END ====
|
// ==== UIEFFECT END ====
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 16f26337621974eaf998b9857bac39c6
|
guid: 4ded3bac41bfc44e3a4447d0be85c08c
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
nonModifiableTextures: []
|
||||||
userData: v5.11.0
|
userData: v5.15.0
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||