mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
Compare commits
158 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6fa44a0b6 | |||
| 26da24dbc4 | |||
| 6014ab54d0 | |||
| dbdb99b52a | |||
| 3b095bcebd | |||
| 2a900987f5 | |||
| 974e3e8769 | |||
| 909281c66b | |||
| 75ed355e27 | |||
| a0dd316df6 | |||
| 4f66bbfb4d | |||
| 91d5519356 | |||
| 76be0fc860 | |||
| a7e826c4f9 | |||
| 78fbc9a330 | |||
| abc9a4184c | |||
| 3e2c5c1613 | |||
| cb0e8d283b | |||
| def49c34f5 | |||
| a0ac27291b | |||
| 8388d59045 | |||
| 53db1e6254 | |||
| aa4ec8d9c4 | |||
| e965b9e9ab | |||
| 202601c96d | |||
| 396d06f774 | |||
| 8ad57c828e | |||
| 952a94f50b | |||
| 2540b75349 | |||
| 6b8dc5ec33 | |||
| de918718d0 | |||
| 045db9c3b7 | |||
| 6542543422 | |||
| 3db94e00f8 | |||
| 946217069f | |||
| 51cd6d8525 | |||
| 65457e2636 | |||
| 3eb775dcf5 | |||
| 1af89af2c5 | |||
| f0a76424e6 | |||
| f2753e9a3d | |||
| 91e5be706d | |||
| 8513970e6f | |||
| 3f5a7dcd2d | |||
| a748adf1bd | |||
| 40ff828ff0 | |||
| bdbf293c14 | |||
| 8155f94943 | |||
| 0a99bb7765 | |||
| 6b6ff3e1d8 | |||
| 8cbcd765ed | |||
| 6f6a8c95f8 | |||
| fbc697ce85 | |||
| 9f8f9f3e7a | |||
| 8930b563cb | |||
| b72a1c05c6 | |||
| fc09152b93 | |||
| fa9c53a0d0 | |||
| a959fddd34 | |||
| 32558d4481 | |||
| bbb1f965fd | |||
| b778d02131 | |||
| 365c43e21d | |||
| 31b16329bc | |||
| 7529a7c4cd | |||
| c51b5f34bb | |||
| 63de3742ec | |||
| e9b32e14fd | |||
| f4ea151244 | |||
| fd39abf5a7 | |||
| 27a04ca294 | |||
| 8edf1f1128 | |||
| c5dfc3bd35 | |||
| 372519d01f | |||
| 6be2ab7a4f | |||
| e326bb7753 | |||
| 7a765c32d8 | |||
| b57e98b64c | |||
| eadb477bcd | |||
| 33b1177815 | |||
| 792db85b79 | |||
| 889c7ff578 | |||
| 5994f8875e | |||
| b2d70af9c3 | |||
| da535854cc | |||
| bc1578b0ca | |||
| d3779f9f57 | |||
| 213daa85e9 | |||
| 6e4d4ab03d | |||
| 4222d72318 | |||
| 8159c091e8 | |||
| 2b44837bb9 | |||
| 1d849e54cb | |||
| 811f5762e6 | |||
| 2f63adfba0 | |||
| 7cb8325e44 | |||
| eafb9ce365 | |||
| 0ef6027371 | |||
| 92f9611a39 | |||
| edf694313f | |||
| 894c5610d0 | |||
| f7175c0373 | |||
| 238a17d57d | |||
| 97237b3aa8 | |||
| 1be0cd45db | |||
| 9799069633 | |||
| 43bc2e29a8 | |||
| 4a6007a467 | |||
| 08e9ba73d7 | |||
| aeb78ed577 | |||
| 7fc8b1599a | |||
| c9fe854b5d | |||
| 20a6ca0815 | |||
| f2df1889d1 | |||
| bbe57df7a0 | |||
| e9522d3f0e | |||
| d0a3ca6090 | |||
| a66baea1e8 | |||
| 5bee8adc83 | |||
| 9a97c50c54 | |||
| bc20f28ac9 | |||
| d9bf0e12fe | |||
| 2b43bc42d4 | |||
| 23ac3985d2 | |||
| e17b4a0bfd | |||
| 155873669d | |||
| 54825eedc8 | |||
| bdd8e08572 | |||
| 88609f5e36 | |||
| 476a0ba23d | |||
| 9d98c5d3e1 | |||
| bc11095020 | |||
| f74279fb83 | |||
| 3d23cbfcdb | |||
| 5889486f18 | |||
| f39097a73f | |||
| c893cb0ce2 | |||
| 73747478a4 | |||
| 36bd7892fa | |||
| 5d0b03a39c | |||
| 40df577dbc | |||
| f0823aa985 | |||
| 952adb3c26 | |||
| 53e6b41b9d | |||
| ef028058a7 | |||
| e8e14c8d15 | |||
| bd3428d3c1 | |||
| 74f0dc4d5c | |||
| d40a0198c4 | |||
| a4f85cb0ee | |||
| 1306e19cab | |||
| e2c1605c19 | |||
| 3bdc61c2ef | |||
| 4adb58ca61 | |||
| 4e069a45d9 | |||
| 0424295dfc | |||
| 20c040284c | |||
| 1bd04e712c |
+212
@@ -0,0 +1,212 @@
|
||||
root = true
|
||||
|
||||
[*.json]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.asmdef]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
csharp_style_namespace_declarations = block_scoped
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = false
|
||||
resharper_object_creation_when_type_evident = explicitly_typed
|
||||
|
||||
# Keep
|
||||
csharp_keep_existing_attribute_arrangement = true
|
||||
csharp_keep_existing_embedded_arrangement = true
|
||||
csharp_keep_user_linebreaks = true
|
||||
csharp_keep_existing_linebreaks = true
|
||||
csharp_place_simple_embedded_statement_on_same_line = false
|
||||
csharp_place_simple_blocks_on_single_line = false
|
||||
csharp_keep_existing_initializer_arrangement = true
|
||||
csharp_keep_existing_arrangement = true
|
||||
|
||||
# Standard properties
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# Brace preferences
|
||||
csharp_brace_style = next_line
|
||||
csharp_braces_for_ifelse = required_for_multiline_statement
|
||||
csharp_braces_for_for = required
|
||||
csharp_braces_for_foreach = required
|
||||
csharp_braces_for_while = required
|
||||
csharp_braces_for_dowhile = required
|
||||
csharp_braces_for_using = required
|
||||
csharp_case_block_braces = next_line
|
||||
csharp_initializer_braces = next_line
|
||||
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = false
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
|
||||
# avoid this. unless absolutely necessary
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
|
||||
# Types: use keywords instead of BCL types, and permit var only when the type is clear
|
||||
csharp_style_var_for_built_in_types = true:suggestion
|
||||
csharp_style_var_when_type_is_apparent = true:none
|
||||
csharp_style_var_elsewhere = true:suggestion
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
#
|
||||
resharper_keep_existing_embedded_arrangement = true
|
||||
|
||||
# Arguments
|
||||
csharp_arguments_literal = named:suggestion
|
||||
csharp_arguments_string_literal = named:suggestion
|
||||
|
||||
# Naming: public and protected fields -> camelCase
|
||||
dotnet_naming_rule.protected_public_fields.severity = suggestion
|
||||
dotnet_naming_rule.protected_public_fields.symbols = protected_public_fields
|
||||
dotnet_naming_rule.protected_public_fields.style = camel_case
|
||||
dotnet_naming_symbols.protected_public_fields.applicable_kinds = field, event
|
||||
dotnet_naming_symbols.protected_public_fields.applicable_accessibilities = public, protected
|
||||
dotnet_naming_style.camel_case.capitalization = camel_case
|
||||
|
||||
# Naming: properties -> camelCase
|
||||
dotnet_naming_rule.properties.severity = suggestion
|
||||
dotnet_naming_rule.properties.symbols = properties
|
||||
dotnet_naming_rule.properties.style = camel_case
|
||||
dotnet_naming_symbols.properties.applicable_kinds = property
|
||||
|
||||
# Naming: constant fields -> k_PascalCase
|
||||
dotnet_naming_rule.constant_fields.severity = suggestion
|
||||
dotnet_naming_rule.constant_fields.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields.style = k_pascal_case
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
dotnet_naming_style.k_pascal_case.required_prefix = k_
|
||||
dotnet_naming_style.k_pascal_case.capitalization = pascal_case
|
||||
|
||||
# Naming: static fields -> s_PascalCase
|
||||
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
|
||||
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
|
||||
dotnet_naming_rule.static_fields_should_have_prefix.style = s_pascal_case
|
||||
dotnet_naming_symbols.static_fields.applicable_kinds = field, property
|
||||
dotnet_naming_symbols.static_fields.required_modifiers = static
|
||||
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
|
||||
dotnet_naming_style.s_pascal_case.required_prefix = s_
|
||||
dotnet_naming_style.s_pascal_case.capitalization = pascal_case
|
||||
|
||||
# Naming: internal and private fields -> _camelCase
|
||||
dotnet_naming_rule.private_internal_fields.severity = suggestion
|
||||
dotnet_naming_rule.private_internal_fields.symbols = private_internal_fields
|
||||
dotnet_naming_rule.private_internal_fields.style = _camel_case
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
|
||||
dotnet_naming_style._camel_case.required_prefix = _
|
||||
dotnet_naming_style._camel_case.capitalization = camel_case
|
||||
|
||||
# Code style defaults
|
||||
dotnet_sort_system_directives_first = true
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_prefer_static_local_function = true:suggestion
|
||||
csharp_prefer_simple_using_statement = false:none
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_methods = false:suggestion
|
||||
csharp_style_expression_bodied_constructors = false:suggestion
|
||||
csharp_style_expression_bodied_operators = false:suggestion
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_indexers = false:suggestion
|
||||
csharp_style_expression_bodied_lambdas = when_on_single_line:silent
|
||||
csharp_style_expression_bodied_local_functions = false:suggestion
|
||||
|
||||
# Pattern matching
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
|
||||
# Null checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Other features
|
||||
csharp_style_prefer_index_operator = false:none
|
||||
csharp_style_prefer_range_operator = false:none
|
||||
csharp_style_pattern_local_over_anonymous_function = false:none
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# ReSharper inspection severities
|
||||
resharper_check_namespace_highlighting = none
|
||||
resharper_for_can_be_converted_to_foreach_highlighting = none
|
||||
resharper_xmldoc_indent_text = ZeroIndent
|
||||
@@ -0,0 +1,6 @@
|
||||
# This is a comment.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
# https://docs.github.com/ja/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
|
||||
|
||||
# Default owners
|
||||
* @mob-sakai
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: mob-sakai # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: mob_sakai # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: mob-sakai
|
||||
|
||||
---
|
||||
|
||||
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- Version [e.g. 1.0.0]
|
||||
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
|
||||
- Unity version: [e.g. 2018.2.8f1]
|
||||
- Build options: [e.g. IL2CPP, .Net 4.x, LWRP]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: mob-sakai
|
||||
|
||||
---
|
||||
|
||||
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question about this project
|
||||
title: ''
|
||||
labels: question
|
||||
assignees: mob-sakai
|
||||
|
||||
---
|
||||
|
||||
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
|
||||
|
||||
**Describe what help do you need**
|
||||
A description of the question.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the question here.
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
# Pull Request Template
|
||||
|
||||
## Description
|
||||
|
||||
- Please include a summary of the change and which issue is fixed.
|
||||
- Please also include relevant motivation and context.
|
||||
- List any dependencies that are required for this change.
|
||||
|
||||
Fixes #{issue_number}
|
||||
|
||||
## Type of change
|
||||
|
||||
Please write the commit message in the format corresponding to the change type.
|
||||
Please see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information.
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Update documentations
|
||||
- [ ] Others (refactoring, style changes, etc.)
|
||||
|
||||
## Test environment
|
||||
|
||||
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
|
||||
- Unity version: [e.g. 2022.2.0f1]
|
||||
- Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP]
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] This pull request is for merging into the `develop` branch
|
||||
- [ ] My code follows the style guidelines of this project
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have checked my code and corrected any misspellings
|
||||
@@ -0,0 +1,28 @@
|
||||
name: 🚀 Deploy with Zip
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
zip:
|
||||
description: "The url to the zip file"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: 🚀 Deploy
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: 📦 Download zip file To '_site'
|
||||
run: |
|
||||
curl -L ${{ github.event.inputs.zip }} -o _site.zip
|
||||
unzip _site.zip -d _site
|
||||
find _site -name __MACOSX | xargs rm -rf
|
||||
|
||||
- name: 📦 Upload '_site'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
|
||||
- name: 🚀 Deploy To GitHub Pages
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -0,0 +1,44 @@
|
||||
name: 🔖 Release
|
||||
run-name: 🔖 Release (${{ github.ref_name }})
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- preview
|
||||
- main
|
||||
- v*.x
|
||||
tags-ignore:
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: 🔖 Release (${{ github.ref_name }})
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
outputs:
|
||||
channel: ${{ steps.release.outputs.new_release_channel }}
|
||||
released: ${{ steps.release.outputs.new_release_published }}
|
||||
tag: ${{ steps.release.outputs.new_release_git_tag }}
|
||||
steps:
|
||||
- name: 🚚 Checkout (${{ github.ref_name }})
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔖 Run semantic release
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
id: release
|
||||
with:
|
||||
working_directory: Packages/src
|
||||
extra_plugins: |
|
||||
@semantic-release/changelog
|
||||
@semantic-release/git
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- run: |
|
||||
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
|
||||
echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY
|
||||
echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY
|
||||
@@ -0,0 +1,124 @@
|
||||
# Required secrets
|
||||
# UNITY_LICENSE: The contents of Unity license file
|
||||
# UNITY_EMAIL: Unity user email to login
|
||||
# UNITY_PASSWORD: Unity user password to login
|
||||
name: 🧪 Test
|
||||
run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})
|
||||
|
||||
env:
|
||||
# MINIMUM_VERSION: The minimum version of Unity.
|
||||
MINIMUM_VERSION: 2020.3
|
||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
usePeriodVersions:
|
||||
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
|
||||
required: false
|
||||
default: "true"
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- "develop-*"
|
||||
tags:
|
||||
- "!*"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: ⚙️ Setup
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
unityVersions: ${{ steps.setup.outputs.unityVersions }}
|
||||
steps:
|
||||
- name: ⚙️ Find target Unity versions
|
||||
id: setup
|
||||
run: |
|
||||
echo "==== Target Unity Versions ===="
|
||||
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
|
||||
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
||||
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
|
||||
else
|
||||
ADDITIONAL_VERSIONS=[]
|
||||
fi
|
||||
|
||||
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
|
||||
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
|
||||
echo "unityVersions=${VERSIONS}" | tee $GITHUB_OUTPUT
|
||||
|
||||
test:
|
||||
name: 🧪 Run tests
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
contents: read
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 6
|
||||
matrix:
|
||||
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
||||
steps:
|
||||
- name: 🚚 Checkout ($${{ github.ref }})
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🚚 Checkout pull request (pull_request_target)
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🚚 Marge pull request (pull_request_target)
|
||||
if: github.event_name == 'pull_request_target'
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
|
||||
|
||||
- name: 📥 Cache library
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: Library
|
||||
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
restore-keys: |
|
||||
Library-${{ matrix.unityVersion }}-
|
||||
Library-
|
||||
|
||||
- name: 🛠️ Build Unity Project (Test)
|
||||
uses: game-ci/unity-builder@v4
|
||||
timeout-minutes: 45
|
||||
with:
|
||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||
targetPlatform: StandaloneLinux64
|
||||
allowDirtyBuild: true
|
||||
customParameters: -nographics
|
||||
env:
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
|
||||
- name: 🧪 Run tests
|
||||
uses: game-ci/unity-test-runner@v4
|
||||
timeout-minutes: 45
|
||||
with:
|
||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||
# unityVersion: ${{ matrix.unityVersion }}
|
||||
customParameters: -nographics
|
||||
checkName: ${{ matrix.unityVersion }} Test Results
|
||||
githubToken: ${{ github.token }}
|
||||
env:
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
@@ -1,3 +0,0 @@
|
||||
issues-wo-labels=false
|
||||
pr-wo-labels=false
|
||||
exclude_labels=duplicate,question,invalid,wontfix,Duplicate,Question,Invalid,Wontfix,Meta: Exclude From Changelog
|
||||
+25
-34
@@ -1,38 +1,29 @@
|
||||
[Ll]ibrary/
|
||||
[Tt]emp/
|
||||
[Oo]bj/
|
||||
[Bb]uild/
|
||||
/[Bb]uilds/
|
||||
/Assets/AssetStoreTools*
|
||||
# Windows
|
||||
Thumbs.db
|
||||
Desktop.ini
|
||||
/*.csproj
|
||||
/*.sln
|
||||
|
||||
# Autogenerated VS/MD solution and project files
|
||||
ExportedObj/
|
||||
*.csproj
|
||||
*.unityproj
|
||||
*.sln
|
||||
*.suo
|
||||
*.tmp
|
||||
*.user
|
||||
*.userprefs
|
||||
*.pidb
|
||||
*.booproj
|
||||
*.svd
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
|
||||
# Unity3D generated meta files
|
||||
*.pidb.meta
|
||||
# Unity
|
||||
/Logs
|
||||
/Library
|
||||
/Temp
|
||||
Assets/Plugins.meta
|
||||
Assets/Plugins/
|
||||
|
||||
# Unity3D Generated File On Crash Reports
|
||||
sysinfo.txt
|
||||
|
||||
# Mac
|
||||
*.DS_Store
|
||||
|
||||
# Builds
|
||||
*.apk
|
||||
|
||||
|
||||
# Packages
|
||||
*.unitypackage
|
||||
build.app
|
||||
unity.log
|
||||
# VS
|
||||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
obj/
|
||||
bin/
|
||||
UserSettings/
|
||||
*.app/
|
||||
Build/
|
||||
Assets/TextMeshPro Support*
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
./../../../../CHANGELOG.md
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
@@ -1,92 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42fa8c34958b97442a6de1f23f479c99
|
||||
timeCreated: 1528469143
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 2
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,44 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class UIEffect_Demo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] RectMask2D mask;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
if (mask)
|
||||
{
|
||||
mask.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTimeScale(float scale)
|
||||
{
|
||||
Time.timeScale = scale;
|
||||
}
|
||||
|
||||
public void Open(Animator anim)
|
||||
{
|
||||
anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
|
||||
anim.gameObject.SetActive(true);
|
||||
anim.SetTrigger("Open");
|
||||
}
|
||||
|
||||
public void Close(Animator anim)
|
||||
{
|
||||
anim.SetTrigger("Close");
|
||||
}
|
||||
|
||||
public void Capture(Animator anim)
|
||||
{
|
||||
anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
|
||||
anim.SetTrigger("Capture");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 177 KiB |
@@ -1,185 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 975570a90d56c477582e12d440dc9931
|
||||
timeCreated: 1528964000
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
21300000: old_detail
|
||||
21300002: old_fast
|
||||
21300004: old_medium
|
||||
21300006: UIEffect_Demo_Dark_Silhouette
|
||||
21300008: UIEffect_Demo_Pattern
|
||||
21300010: UIEffect_Demo_red
|
||||
21300012: UIEffect_Demo_Unity-chan
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: old_detail
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 192
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: old_fast
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 125
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: old_medium
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 288
|
||||
width: 106
|
||||
height: 159
|
||||
alignment: 0
|
||||
pivot: {x: 53, y: 79.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_Dark_Silhouette
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 116
|
||||
y: 0
|
||||
width: 140
|
||||
height: 121
|
||||
alignment: 0
|
||||
pivot: {x: 70, y: 60.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_red
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 355
|
||||
width: 100
|
||||
height: 100
|
||||
alignment: 0
|
||||
pivot: {x: 50, y: 50}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
- serializedVersion: 2
|
||||
name: UIEffect_Demo_Unity-chan
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 112
|
||||
height: 188
|
||||
alignment: 0
|
||||
pivot: {x: 56, y: 94}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
tessellationDetail: -1
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,823 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &-1746834952
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Open
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 34
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 1
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_BlocksRaycasts
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 1574349066
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 3739863151
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.5
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 34
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 1
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 1
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_BlocksRaycasts
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!1102 &-1537770706
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Animation
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: 0}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!74 &7415318
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Close
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: -2
|
||||
outSlope: -2
|
||||
tangentMode: 34
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: -2
|
||||
outSlope: -2
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 1574349066
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.5
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: -2
|
||||
outSlope: -2
|
||||
tangentMode: 34
|
||||
- serializedVersion: 2
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: -2
|
||||
outSlope: -2
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7450624
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 3
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: 1 to 0
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_ToneLevel
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 2148837408
|
||||
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
|
||||
classID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 3
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 3
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_ToneLevel
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7451788
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 3
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: 0 to 1
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 0}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 0
|
||||
script: {fileID: 0}
|
||||
classID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
pptrCurveMapping:
|
||||
- {fileID: 0}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.083333336
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!74 &7487404
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Closed
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_BlocksRaycasts
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- path: 0
|
||||
attribute: 3739863151
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
- path: 0
|
||||
attribute: 1574349066
|
||||
script: {fileID: 0}
|
||||
classID: 225
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 34
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_Alpha
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_BlocksRaycasts
|
||||
path:
|
||||
classID: 225
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_IsEmpty: 0
|
||||
m_Events: []
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UIEffect_Demo_Dialog
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: Open
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Close
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 110755890}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &110107960
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Open
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110244674}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &110173032
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110201538}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &110180378
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Close
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110202250}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &110200840
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: 1 to 0 (Exported)
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: 0}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1102 &110201538
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Closed
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 110107960}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 0
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: 7487404}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1102 &110202250
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Close
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 110173032}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 0
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: 7415318}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1102 &110244674
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Open
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 110180378}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 0
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_Motion: {fileID: -1746834952}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1107 &110755890
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110244674}
|
||||
m_Position: {x: 480, y: 48, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110201538}
|
||||
m_Position: {x: 336, y: -12, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110202250}
|
||||
m_Position: {x: 336, y: 120, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 144, y: 72, z: 0}
|
||||
m_EntryPosition: {x: 144, y: -12, z: 0}
|
||||
m_ExitPosition: {x: 144, y: 108, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 110201538}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 172 KiB |
@@ -1,100 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 529a51ce456fc487db93a64ec7937211
|
||||
timeCreated: 1502934796
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 1
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 512
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 2
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 256
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
./../../../../LICENSE.txt
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39ac2ac7853a94fbc9d9e3d1151b9dfe
|
||||
folderAsset: yes
|
||||
timeCreated: 1515203270
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,214 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 8
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _NoiseTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21162286589123374
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Fill
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: FILL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _NoiseTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21841578701121694
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Subtract
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: SUBTRACT
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _NoiseTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21939717441729078
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Dissolve-Add
|
||||
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
|
||||
m_ShaderKeywords: ADD
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _NoiseTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -1,148 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-HSV
|
||||
m_Shader: {fileID: 4800000, guid: 7fc74090480c84f8b977cfcd55cdfe82, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Cutoff
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
- first:
|
||||
name: _GlossMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _Glossiness
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _GlossyReflections
|
||||
second: 1
|
||||
- first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
- first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
- first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
- first:
|
||||
name: _Parallax
|
||||
second: 0.02
|
||||
- first:
|
||||
name: _SmoothnessTextureChannel
|
||||
second: 0
|
||||
- first:
|
||||
name: _SpecularHighlights
|
||||
second: 1
|
||||
- first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
- first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
- first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -1,49 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Shiny
|
||||
m_Shader: {fileID: 4800000, guid: 20ffe76c2439c403aabdd25bd94bf011, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -1,942 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 8
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21030718755001428
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Nega
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: NEGA
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21035471806006108
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Cutoff
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: CUTOFF
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21048363040754768
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21103468552951452
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-FastBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FASTBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21165426070421698
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Sepia
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: SEPIA
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21217090983920726
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Add
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: ADD
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21397352971802982
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21433706607038904
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Hue
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: HUE
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21436055995319614
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: GRAYSCALE
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21553036001917316
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: MEDIUMBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21582814526197946
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale-Fill-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL GRAYSCALE MEDIUMBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21593680702607820
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Cutoff-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: CUTOFF FILL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21613091319250600
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21640785413581468
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill-DetailBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: DETAILBLUR FILL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21660598935221184
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Fill-MediumBlur
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL MEDIUMBLUR
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21730298716655380
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Subtract
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: SUBTRACT
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21748420970599250
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Mono
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: MONO
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21811646848630374
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Pixel
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: PIXEL
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!21 &21972152714168334
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 9
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: UI-Effect-Transition-Grayscale-Fill
|
||||
m_Shader: {fileID: 4800000, guid: 85ad24dd0759947ddb117625e108d49c, type: 3}
|
||||
m_ShaderKeywords: FILL GRAYSCALE
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _ColorMask
|
||||
second: 15
|
||||
- first:
|
||||
name: _Stencil
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilComp
|
||||
second: 8
|
||||
- first:
|
||||
name: _StencilOp
|
||||
second: 0
|
||||
- first:
|
||||
name: _StencilReadMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _StencilWriteMask
|
||||
second: 255
|
||||
- first:
|
||||
name: _UseUIAlphaClip
|
||||
second: 0
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aee96bc531e6eba468ec405e536f515f
|
||||
timeCreated: 1516545204
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a1a8e44196ca754a9a7b9cb80e17573
|
||||
timeCreated: 1516545204
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
@@ -1 +0,0 @@
|
||||
./../../../../README.md
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public enum BlurMode
|
||||
{
|
||||
None = 0,
|
||||
FastBlur = 1,
|
||||
MediumBlur = 2,
|
||||
DetailBlur = 3,
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public enum ColorMode
|
||||
{
|
||||
Multiply = 0,
|
||||
Fill = 1,
|
||||
Add = 2,
|
||||
Subtract = 3,
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Area for effect.
|
||||
/// </summary>
|
||||
public enum EffectArea
|
||||
{
|
||||
RectTransform,
|
||||
Fit,
|
||||
Character,
|
||||
}
|
||||
|
||||
public static class EffectAreaExtensions
|
||||
{
|
||||
static readonly Rect rectForCharacter = new Rect(0, 0, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Gets effect for area.
|
||||
/// </summary>
|
||||
public static Rect GetEffectArea(this EffectArea area, VertexHelper vh, Graphic graphic)
|
||||
{
|
||||
switch (area)
|
||||
{
|
||||
case EffectArea.RectTransform:
|
||||
return graphic.rectTransform.rect;
|
||||
case EffectArea.Character:
|
||||
return rectForCharacter;
|
||||
case EffectArea.Fit:
|
||||
{
|
||||
// Fit to contents.
|
||||
Rect rect = default(Rect);
|
||||
UIVertex vertex = default(UIVertex);
|
||||
rect.xMin = rect.yMin = float.MaxValue;
|
||||
rect.xMax = rect.yMax = float.MinValue;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
rect.xMin = Mathf.Min(rect.xMin, vertex.position.x);
|
||||
rect.yMin = Mathf.Min(rect.yMin, vertex.position.y);
|
||||
rect.xMax = Mathf.Max(rect.xMax, vertex.position.x);
|
||||
rect.yMax = Mathf.Max(rect.yMax, vertex.position.y);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
default:
|
||||
return graphic.rectTransform.rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class MaterialCache
|
||||
{
|
||||
public ulong hash { get; private set; }
|
||||
public int referenceCount { get; private set; }
|
||||
public Texture texture { get; private set; }
|
||||
public Material material { get; private set; }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
static void ClearCache()
|
||||
{
|
||||
materialCache.Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
public static List<MaterialCache> materialCache = new List<MaterialCache>();
|
||||
|
||||
public static MaterialCache Register(ulong hash, Texture texture, System.Func<Material> onCreateMaterial)
|
||||
{
|
||||
var cache = materialCache.FirstOrDefault(x => x.hash == hash);
|
||||
if (cache != null)
|
||||
{
|
||||
cache.referenceCount++;
|
||||
}
|
||||
if (cache == null)
|
||||
{
|
||||
cache = new MaterialCache()
|
||||
{
|
||||
hash = hash,
|
||||
texture = texture,
|
||||
material = onCreateMaterial(),
|
||||
referenceCount = 1,
|
||||
};
|
||||
materialCache.Add(cache);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
public static void Unregister(MaterialCache cache)
|
||||
{
|
||||
if (cache == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
cache.referenceCount--;
|
||||
if (cache.referenceCount <= 0)
|
||||
{
|
||||
MaterialCache.materialCache.Remove(cache);
|
||||
cache.material = null;
|
||||
cache.texture = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class MaterialResolver
|
||||
{
|
||||
static readonly StringBuilder s_StringBuilder = new StringBuilder ();
|
||||
|
||||
public static Material GetOrGenerateMaterialVariant (Shader shader, params object[] append)
|
||||
{
|
||||
if (!shader) {
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] keywords = append.Where (x => 0 < (int)x)
|
||||
.Select (x => x.ToString ().ToUpper ())
|
||||
.ToArray ();
|
||||
Material mat = GetMaterial (shader, append);
|
||||
if (mat) {
|
||||
if(!mat.shaderKeywords.OrderBy(x=>x).SequenceEqual(keywords.OrderBy(x=>x)))
|
||||
{
|
||||
mat.shaderKeywords = keywords;
|
||||
EditorUtility.SetDirty (mat);
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
}
|
||||
}
|
||||
return mat;
|
||||
}
|
||||
|
||||
var variantName = GetVariantName (shader, append);
|
||||
Debug.Log ("Generate material : " + variantName);
|
||||
mat = new Material (shader);
|
||||
mat.shaderKeywords = keywords;
|
||||
|
||||
mat.name = variantName;
|
||||
mat.hideFlags |= HideFlags.NotEditable;
|
||||
|
||||
#if UIEFFECT_SEPARATE
|
||||
string dir = Path.GetDirectoryName(GetDefaultMaterialPath (shader));
|
||||
string materialPath = Path.Combine(Path.Combine(dir, "Separated"), mat.name + ".mat");
|
||||
|
||||
Directory.CreateDirectory (Path.GetDirectoryName (materialPath));
|
||||
AssetDatabase.CreateAsset (mat, materialPath);
|
||||
AssetDatabase.SaveAssets ();
|
||||
#else
|
||||
if (append.Cast<int> ().All (x => x == 0)) {
|
||||
string materialPath = GetDefaultMaterialPath (shader);
|
||||
Directory.CreateDirectory (Path.GetDirectoryName (materialPath));
|
||||
AssetDatabase.CreateAsset (mat, materialPath);
|
||||
AssetDatabase.SaveAssets ();
|
||||
} else {
|
||||
GetOrGenerateMaterialVariant (shader);
|
||||
string materialPath = GetDefaultMaterialPath (shader);
|
||||
mat.hideFlags |= HideFlags.HideInHierarchy;
|
||||
AssetDatabase.AddObjectToAsset (mat, materialPath);
|
||||
}
|
||||
#endif
|
||||
return mat;
|
||||
}
|
||||
|
||||
public static Material GetMaterial (Shader shader, params object[] append)
|
||||
{
|
||||
string variantName = GetVariantName (shader, append);
|
||||
return AssetDatabase.FindAssets ("t:Material " + Path.GetFileName (shader.name))
|
||||
.Select (x => AssetDatabase.GUIDToAssetPath (x))
|
||||
.SelectMany (x => AssetDatabase.LoadAllAssetsAtPath (x))
|
||||
.OfType<Material> ()
|
||||
.FirstOrDefault (x => x.name == variantName);
|
||||
}
|
||||
|
||||
public static string GetDefaultMaterialPath (Shader shader)
|
||||
{
|
||||
var name = Path.GetFileName (shader.name);
|
||||
return AssetDatabase.FindAssets ("t:Material " + name)
|
||||
.Select (x => AssetDatabase.GUIDToAssetPath (x))
|
||||
.FirstOrDefault (x => Path.GetFileNameWithoutExtension (x) == name)
|
||||
?? ("Assets/" + name + ".mat");
|
||||
}
|
||||
|
||||
public static string GetVariantName (Shader shader, params object[] append)
|
||||
{
|
||||
s_StringBuilder.Length = 0;
|
||||
|
||||
#if UIEFFECT_SEPARATE
|
||||
s_StringBuilder.Append("[Separated] ");
|
||||
#endif
|
||||
s_StringBuilder.Append (Path.GetFileName (shader.name));
|
||||
foreach (object mode in append.Where(x=>0<(int)x)) {
|
||||
s_StringBuilder.Append ("-");
|
||||
s_StringBuilder.Append (mode.ToString ());
|
||||
}
|
||||
return s_StringBuilder.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Matrix2x3.
|
||||
/// </summary>
|
||||
struct Matrix2x3
|
||||
{
|
||||
public float m00, m01, m02, m10, m11, m12;
|
||||
|
||||
public Matrix2x3(Rect rect, float cos, float sin)
|
||||
{
|
||||
const float center = 0.5f;
|
||||
float dx = -rect.xMin / rect.width - center;
|
||||
float dy = -rect.yMin / rect.height - center;
|
||||
m00 = cos / rect.width;
|
||||
m01 = -sin / rect.height;
|
||||
m02 = dx * cos - dy * sin + center;
|
||||
m10 = sin / rect.width;
|
||||
m11 = cos / rect.height;
|
||||
m12 = dx * sin + dy * cos + center;
|
||||
}
|
||||
|
||||
public static Vector2 operator*(Matrix2x3 m, Vector2 v)
|
||||
{
|
||||
return new Vector2(
|
||||
(m.m00 * v.x) + (m.m01 * v.y) + m.m02,
|
||||
(m.m10 * v.x) + (m.m11 * v.y) + m.m12
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public static class Packer
|
||||
{
|
||||
/// <summary>
|
||||
/// Pack 4 low-precision [0-1] floats values to a float.
|
||||
/// Each value [0-1] has 64 steps(6 bits).
|
||||
/// </summary>
|
||||
public static float ToFloat(float x, float y, float z, float w)
|
||||
{
|
||||
const int PRECISION = (1 << 6) - 1;
|
||||
return (Mathf.FloorToInt(w * PRECISION) << 18)
|
||||
+ (Mathf.FloorToInt(z * PRECISION) << 12)
|
||||
+ (Mathf.FloorToInt(y * PRECISION) << 6)
|
||||
+ Mathf.FloorToInt(x * PRECISION);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pack 4 low-precision [0-1] floats values to a float.
|
||||
/// Each value [0-1] has 64 steps(6 bits).
|
||||
/// </summary>
|
||||
public static float ToFloat(Vector4 factor)
|
||||
{
|
||||
return ToFloat(Mathf.Clamp01(factor.x), Mathf.Clamp01(factor.y), Mathf.Clamp01(factor.z), Mathf.Clamp01(factor.w));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pack 3 low-precision [0-1] floats values to a float.
|
||||
/// Each value [0-1] has 256 steps(8 bits).
|
||||
/// </summary>
|
||||
public static float ToFloat(float x, float y, float z)
|
||||
{
|
||||
const int PRECISION = (1 << 8) - 1;
|
||||
return (Mathf.FloorToInt(z * PRECISION) << 16)
|
||||
+ (Mathf.FloorToInt(y * PRECISION) << 8)
|
||||
+ Mathf.FloorToInt(x * PRECISION);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pack 2 low-precision [0-1] floats values to a float.
|
||||
/// Each value [0-1] has 4096 steps(12 bits).
|
||||
/// </summary>
|
||||
public static float ToFloat(float x, float y)
|
||||
{
|
||||
const int PRECISION = (1 << 12) - 1;
|
||||
return (Mathf.FloorToInt(y * PRECISION) << 12)
|
||||
+ Mathf.FloorToInt(x * PRECISION);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Shadow effect style.
|
||||
/// </summary>
|
||||
public enum ShadowStyle
|
||||
{
|
||||
None = 0,
|
||||
Shadow,
|
||||
Outline,
|
||||
Outline8,
|
||||
Shadow3,
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public enum ToneMode
|
||||
{
|
||||
None = 0,
|
||||
Grayscale = 1,
|
||||
Sepia = 2,
|
||||
Nega = 3,
|
||||
Pixel = 4,
|
||||
Mono = 5,
|
||||
Cutoff = 6,
|
||||
Hue = 7,
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract effect base for UI.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public abstract class UIEffectBase : BaseMeshEffect
|
||||
{
|
||||
protected static readonly Vector2[] splitedCharacterPosition = { Vector2.up, Vector2.one, Vector2.right, Vector2.zero };
|
||||
protected static readonly List<UIVertex> tempVerts = new List<UIVertex>();
|
||||
|
||||
[SerializeField] protected Material m_EffectMaterial;
|
||||
|
||||
/// <summary>
|
||||
/// Gets target graphic for effect.
|
||||
/// </summary>
|
||||
public Graphic targetGraphic { get { return graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets material for effect.
|
||||
/// </summary>
|
||||
public Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
OnValidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the validate event.
|
||||
/// </summary>
|
||||
protected override void OnValidate ()
|
||||
{
|
||||
var mat = GetMaterial();
|
||||
if (m_EffectMaterial != mat)
|
||||
{
|
||||
m_EffectMaterial = mat;
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
ModifyMaterial();
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected virtual Material GetMaterial()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
public virtual void ModifyMaterial()
|
||||
{
|
||||
targetGraphic.material = isActiveAndEnabled ? m_EffectMaterial : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
ModifyMaterial();
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the behaviour becomes disabled () or inactive.
|
||||
/// </summary>
|
||||
protected override void OnDisable()
|
||||
{
|
||||
ModifyMaterial();
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the UIEffect as dirty.
|
||||
/// </summary>
|
||||
protected void SetDirty()
|
||||
{
|
||||
if (targetGraphic)
|
||||
{
|
||||
targetGraphic.SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UICustomEffect))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UICustomEffectEditor : Editor
|
||||
{
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
SerializedProperty spCustomFactor1X;
|
||||
SerializedProperty spCustomFactor1Y;
|
||||
SerializedProperty spCustomFactor1Z;
|
||||
SerializedProperty spCustomFactor1W;
|
||||
SerializedProperty spCustomFactor2X;
|
||||
SerializedProperty spCustomFactor2Y;
|
||||
SerializedProperty spCustomFactor2Z;
|
||||
SerializedProperty spCustomFactor2W;
|
||||
SerializedProperty _spEffectMaterial;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
var spCustomFactor1 = serializedObject.FindProperty("m_CustomFactor1");
|
||||
spCustomFactor1X = spCustomFactor1.FindPropertyRelative("x");
|
||||
spCustomFactor1Y = spCustomFactor1.FindPropertyRelative("y");
|
||||
spCustomFactor1Z = spCustomFactor1.FindPropertyRelative("z");
|
||||
spCustomFactor1W = spCustomFactor1.FindPropertyRelative("w");
|
||||
|
||||
var spCustomFactor2 = serializedObject.FindProperty("m_CustomFactor2");
|
||||
spCustomFactor2X = spCustomFactor2.FindPropertyRelative("x");
|
||||
spCustomFactor2Y = spCustomFactor2.FindPropertyRelative("y");
|
||||
spCustomFactor2Z = spCustomFactor2.FindPropertyRelative("z");
|
||||
spCustomFactor2W = spCustomFactor2.FindPropertyRelative("w");
|
||||
|
||||
_spEffectMaterial = serializedObject.FindProperty("m_EffectMaterial");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implement this function to make a custom inspector.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(_spEffectMaterial);
|
||||
|
||||
EditorGUILayout.Slider(spCustomFactor1X, 0, 1, "CustomFactor1.X");
|
||||
EditorGUILayout.Slider(spCustomFactor1Y, 0, 1, "CustomFactor1.Y");
|
||||
EditorGUILayout.Slider(spCustomFactor1Z, 0, 1, "CustomFactor1.Z");
|
||||
EditorGUILayout.Slider(spCustomFactor1W, 0, 1, "CustomFactor1.W");
|
||||
EditorGUILayout.Slider(spCustomFactor2X, 0, 1, "CustomFactor2.X");
|
||||
EditorGUILayout.Slider(spCustomFactor2Y, 0, 1, "CustomFactor2.Y");
|
||||
EditorGUILayout.Slider(spCustomFactor2Z, 0, 1, "CustomFactor2.Z");
|
||||
EditorGUILayout.Slider(spCustomFactor2W, 0, 1, "CustomFactor2.W");
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
var graphic = (target as UIEffectBase).targetGraphic;
|
||||
if(graphic)
|
||||
{
|
||||
var canvas = graphic.canvas;
|
||||
if( canvas && 0 == (canvas.additionalShaderChannels & AdditionalCanvasShaderChannels.TexCoord1))
|
||||
{
|
||||
using (new GUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.HelpBox("[Unity5.6+] Enable TexCoord1 of Canvas.additionalShaderChannels to use UICustomEffect.", MessageType.Warning);
|
||||
if (GUILayout.Button("Fix"))
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.UI;
|
||||
using UnityEngine;
|
||||
using DesamplingRate = Coffee.UIExtensions.UIEffectCapturedImage.DesamplingRate;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffectCapturedImage editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIEffectCapturedImage))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIEffectCapturedImageEditor : RawImageEditor
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
|
||||
public enum QualityMode : int
|
||||
{
|
||||
Fast = (DesamplingRate.x2 << 0) + (DesamplingRate.x2 << 4) + (FilterMode.Bilinear << 8) + (2 << 10),
|
||||
Medium = (DesamplingRate.x1 << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (3 << 10),
|
||||
Detail = (DesamplingRate.None << 0) + (DesamplingRate.x1 << 4) + (FilterMode.Bilinear << 8) + (5 << 10),
|
||||
Custom = -1,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Public/Protected Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_spTexture = serializedObject.FindProperty("m_Texture");
|
||||
_spColor = serializedObject.FindProperty("m_Color");
|
||||
_spRaycastTarget = serializedObject.FindProperty("m_RaycastTarget");
|
||||
_spDesamplingRate = serializedObject.FindProperty("m_DesamplingRate");
|
||||
_spReductionRate = serializedObject.FindProperty("m_ReductionRate");
|
||||
_spFilterMode = serializedObject.FindProperty("m_FilterMode");
|
||||
_spIterations = serializedObject.FindProperty("m_BlurIterations");
|
||||
_spKeepSizeToRootCanvas = serializedObject.FindProperty("m_KeepCanvasSize");
|
||||
_spTargetTexture = serializedObject.FindProperty("m_TargetTexture");
|
||||
_spBlurMode = serializedObject.FindProperty("m_BlurMode");
|
||||
|
||||
|
||||
_customAdvancedOption = (qualityMode == QualityMode.Custom) || _spTargetTexture.objectReferenceValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implement this function to make a custom inspector.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
//================
|
||||
// Basic properties.
|
||||
//================
|
||||
EditorGUILayout.PropertyField(_spTexture);
|
||||
EditorGUILayout.PropertyField(_spColor);
|
||||
EditorGUILayout.PropertyField(_spRaycastTarget);
|
||||
|
||||
//================
|
||||
// Capture effect.
|
||||
//================
|
||||
GUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Capture Effect", EditorStyles.boldLabel);
|
||||
UIEffectEditor.DrawEffectProperties(UIEffectCapturedImage.shaderName, serializedObject);
|
||||
|
||||
//================
|
||||
// Advanced option.
|
||||
//================
|
||||
GUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Advanced Option", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
QualityMode quality = qualityMode;
|
||||
quality = (QualityMode)EditorGUILayout.EnumPopup("Quality Mode", quality);
|
||||
if(EditorGUI.EndChangeCheck())
|
||||
{
|
||||
_customAdvancedOption = (quality == QualityMode.Custom) || _spTargetTexture.objectReferenceValue;
|
||||
qualityMode = quality;
|
||||
}
|
||||
|
||||
// When qualityMode is `Custom`, show advanced option.
|
||||
if (_customAdvancedOption)
|
||||
{
|
||||
if(_spBlurMode.intValue != 0)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spIterations);// Iterations.
|
||||
}
|
||||
EditorGUILayout.PropertyField(_spKeepSizeToRootCanvas);// Keep Graphic Size To RootCanvas.
|
||||
DrawDesamplingRate(_spReductionRate);// Reduction rate.
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Result Texture Setting", EditorStyles.boldLabel);
|
||||
|
||||
if(!_spTargetTexture.objectReferenceValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spFilterMode);// Filter Mode.
|
||||
DrawDesamplingRate(_spDesamplingRate);// Desampling rate.
|
||||
}
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spTargetTexture);// Target Texture.
|
||||
Texture t = _spTargetTexture.objectReferenceValue as Texture;
|
||||
if (t)
|
||||
{
|
||||
GUILayout.Label(string.Format("{0}x{1}", t.width, t.height), EditorStyles.miniLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
// Debug.
|
||||
using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox))
|
||||
{
|
||||
GUILayout.Label("Debug");
|
||||
|
||||
if (GUILayout.Button("Capture", "ButtonLeft"))
|
||||
UpdateTexture(true);
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!(target as UIEffectCapturedImage).capturedTexture);
|
||||
if (GUILayout.Button("Release", "ButtonRight"))
|
||||
UpdateTexture(false);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
// Warning message for overlay rendering.
|
||||
var graphic = (target as UIEffectCapturedImage);
|
||||
if(graphic && graphic.canvas)
|
||||
{
|
||||
var canvas = graphic.canvas.rootCanvas;
|
||||
if( canvas && canvas.renderMode != RenderMode.ScreenSpaceCamera)
|
||||
{
|
||||
using (new GUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.HelpBox("'ScreenSpace - Overlay' and 'WorldSpace - Camera' render modes are not supported. Change render mode of root canvas to 'ScreenSpace - Camera'.", MessageType.Warning);
|
||||
if (GUILayout.Button("Canvas"))
|
||||
{
|
||||
Selection.activeGameObject = canvas.gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
const int Bits4 = (1 << 4) - 1;
|
||||
const int Bits2 = (1 << 2) - 1;
|
||||
bool _customAdvancedOption = false;
|
||||
SerializedProperty _spTexture;
|
||||
SerializedProperty _spColor;
|
||||
SerializedProperty _spRaycastTarget;
|
||||
SerializedProperty _spDesamplingRate;
|
||||
SerializedProperty _spReductionRate;
|
||||
SerializedProperty _spFilterMode;
|
||||
SerializedProperty _spBlurMode;
|
||||
SerializedProperty _spIterations;
|
||||
SerializedProperty _spKeepSizeToRootCanvas;
|
||||
SerializedProperty _spTargetTexture;
|
||||
|
||||
QualityMode qualityMode
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_customAdvancedOption)
|
||||
return QualityMode.Custom;
|
||||
|
||||
int qualityValue = (_spDesamplingRate.intValue << 0)
|
||||
+ (_spReductionRate.intValue << 4)
|
||||
+ (_spFilterMode.intValue << 8)
|
||||
+ (_spIterations.intValue << 10);
|
||||
|
||||
return System.Enum.IsDefined(typeof(QualityMode), qualityValue) ? (QualityMode)qualityValue : QualityMode.Custom;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != QualityMode.Custom)
|
||||
{
|
||||
int qualityValue = (int)value;
|
||||
_spDesamplingRate.intValue = (qualityValue >> 0) & Bits4;
|
||||
_spReductionRate.intValue = (qualityValue >> 4) & Bits4;
|
||||
_spFilterMode.intValue = (qualityValue >> 8) & Bits2;
|
||||
_spIterations.intValue = (qualityValue >> 10) & Bits4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the desampling rate.
|
||||
/// </summary>
|
||||
void DrawDesamplingRate(SerializedProperty sp)
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PropertyField(sp);
|
||||
int w, h;
|
||||
(target as UIEffectCapturedImage).GetDesamplingSize((UIEffectCapturedImage.DesamplingRate)sp.intValue, out w, out h);
|
||||
GUILayout.Label(string.Format("{0}x{1}", w, h), EditorStyles.miniLabel);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the texture.
|
||||
/// </summary>
|
||||
void UpdateTexture(bool capture)
|
||||
{
|
||||
var current = target as UIEffectCapturedImage;
|
||||
bool enable = current.enabled;
|
||||
current.enabled = false;
|
||||
current.Release();
|
||||
if (capture)
|
||||
current.Capture();
|
||||
|
||||
EditorApplication.delayCall += () => current.enabled = enable;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIEffect))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIEffectEditor : Editor
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Draw effect properties.
|
||||
/// </summary>
|
||||
public static void DrawEffectProperties(string shaderName, SerializedObject serializedObject)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
//================
|
||||
// Effect material.
|
||||
//================
|
||||
var spMaterial = serializedObject.FindProperty("m_EffectMaterial");
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUILayout.PropertyField(spMaterial);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
//================
|
||||
// Tone setting.
|
||||
//================
|
||||
var spToneMode = serializedObject.FindProperty("m_ToneMode");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(spToneMode);
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When tone is enable, show parameters.
|
||||
if (spToneMode.intValue != (int)ToneMode.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ToneLevel"));
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
//================
|
||||
// Color setting.
|
||||
//================
|
||||
var spColorMode = serializedObject.FindProperty("m_ColorMode");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(spColorMode);
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When color is enable, show parameters.
|
||||
if (spColorMode.intValue != (int)ColorMode.Multiply)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectColor"));
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
//================
|
||||
// Blur setting.
|
||||
//================
|
||||
var spBlurMode = serializedObject.FindProperty("m_BlurMode");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(spBlurMode);
|
||||
changed |= EditorGUI.EndChangeCheck();
|
||||
|
||||
// When blur is enable, show parameters.
|
||||
if (spBlurMode.intValue != (int)BlurMode.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Blur"));
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// // Set effect material.
|
||||
// if (!serializedObject.isEditingMultipleObjects && spToneMode.intValue == 0 && spColorMode.intValue == 0 && spBlurMode.intValue == 0)
|
||||
// {
|
||||
// spMaterial.objectReferenceValue = null;
|
||||
// }
|
||||
// else if (changed || !serializedObject.isEditingMultipleObjects)
|
||||
// {
|
||||
// spMaterial.objectReferenceValue = UIEffect.GetOrGenerateMaterialVariant(Shader.Find(shaderName),
|
||||
// (UIEffect.ToneMode)spToneMode.intValue,
|
||||
// (UIEffect.ColorMode)spColorMode.intValue,
|
||||
// (UIEffect.BlurMode)spBlurMode.intValue
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
ReorderableList _roAdditionalShadows;
|
||||
SerializedProperty _spAdditionalShadows;
|
||||
SerializedProperty _spBlurMode;
|
||||
SerializedProperty _spCustomEffect;
|
||||
SerializedProperty _spEffectMaterial;
|
||||
SerializedProperty _spEffectColor;
|
||||
SerializedProperty _spCustomFactorX;
|
||||
SerializedProperty _spCustomFactorY;
|
||||
SerializedProperty _spCustomFactorZ;
|
||||
SerializedProperty _spCustomFactorW;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_spAdditionalShadows = serializedObject.FindProperty("m_AdditionalShadows");
|
||||
_spBlurMode = serializedObject.FindProperty("m_BlurMode");
|
||||
_spEffectColor = serializedObject.FindProperty("m_EffectColor");
|
||||
|
||||
_spCustomEffect = serializedObject.FindProperty("m_CustomEffect");
|
||||
_spEffectMaterial = serializedObject.FindProperty("m_EffectMaterial");
|
||||
var spFactor = serializedObject.FindProperty("m_CustomFactor");
|
||||
_spCustomFactorX = spFactor.FindPropertyRelative("x");
|
||||
_spCustomFactorY = spFactor.FindPropertyRelative("y");
|
||||
_spCustomFactorZ = spFactor.FindPropertyRelative("z");
|
||||
_spCustomFactorW = spFactor.FindPropertyRelative("w");
|
||||
|
||||
_roAdditionalShadows = new ReorderableList(serializedObject, _spAdditionalShadows, true, true, true, true);
|
||||
_roAdditionalShadows.drawElementCallback = DrawElementCallback;
|
||||
_roAdditionalShadows.drawHeaderCallback = (rect) => EditorGUI.LabelField(rect, "Additional Shadows");
|
||||
_roAdditionalShadows.onAddCallback = OnAddCallback;
|
||||
_roAdditionalShadows.elementHeightCallback = ElementHeightCallback;
|
||||
|
||||
}
|
||||
|
||||
void OnAddCallback(ReorderableList ro)
|
||||
{
|
||||
_spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
|
||||
var element = _spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
|
||||
element.FindPropertyRelative("shadowMode").intValue = (int)ShadowStyle.Shadow;
|
||||
element.FindPropertyRelative("shadowColor").colorValue = Color.black;
|
||||
element.FindPropertyRelative("effectDistance").vector2Value = new Vector2(1f, -1f);
|
||||
element.FindPropertyRelative("useGraphicAlpha").boolValue = true;
|
||||
element.FindPropertyRelative("shadowBlur").floatValue = 0.25f;
|
||||
}
|
||||
|
||||
float ElementHeightCallback(int index)
|
||||
{
|
||||
var element = _spAdditionalShadows.GetArrayElementAtIndex(index);
|
||||
if (element.FindPropertyRelative("shadowMode").intValue == (int)ShadowStyle.None)
|
||||
return 16;
|
||||
|
||||
return (_spBlurMode.intValue == (int)BlurMode.None ? 66 : 84) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void DrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
|
||||
{
|
||||
var sp = _roAdditionalShadows.serializedProperty.GetArrayElementAtIndex(index);
|
||||
|
||||
Rect r = new Rect(rect);
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
var spMode = sp.FindPropertyRelative("shadowMode");
|
||||
EditorGUI.PropertyField(r, spMode);
|
||||
if (spMode.intValue == (int)ShadowStyle.None)
|
||||
return;
|
||||
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("shadowColor"));
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("effectDistance"));
|
||||
r.y += EditorGUIUtility.wideMode ? r.height : r.height * 2;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("useGraphicAlpha"));
|
||||
|
||||
if (_spBlurMode.intValue != (int)BlurMode.None)
|
||||
{
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("shadowBlur"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implement this function to make a custom inspector.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
// Custom effect.
|
||||
EditorGUILayout.PropertyField(_spCustomEffect);
|
||||
if(_spCustomEffect.boolValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_spEffectMaterial);
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.Slider(_spCustomFactorX, 0, 1, new GUIContent("Effect Factor X"));
|
||||
EditorGUILayout.Slider(_spCustomFactorY, 0, 1, new GUIContent("Effect Factor Y"));
|
||||
EditorGUILayout.Slider(_spCustomFactorZ, 0, 1, new GUIContent("Effect Factor Z"));
|
||||
EditorGUILayout.Slider(_spCustomFactorW, 0, 1, new GUIContent("Effect Factor W"));
|
||||
EditorGUILayout.PropertyField(_spEffectColor);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawEffectProperties(UIEffect.shaderName, serializedObject);
|
||||
}
|
||||
|
||||
//================
|
||||
// Shadow setting.
|
||||
//================
|
||||
var spShadowMode = serializedObject.FindProperty("m_ShadowStyle");
|
||||
EditorGUILayout.PropertyField(spShadowMode);
|
||||
|
||||
// When shadow is enable, show parameters.
|
||||
if (spShadowMode.intValue != (int)ShadowStyle.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectDistance"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowColor"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_UseGraphicAlpha"));
|
||||
|
||||
if (_spBlurMode.intValue != (int)BlurMode.None)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ShadowBlur"));
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
//================
|
||||
// Additional shadow setting.
|
||||
//================
|
||||
_roAdditionalShadows.DoLayoutList();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
var graphic = (target as UIEffectBase).targetGraphic;
|
||||
if(graphic)
|
||||
{
|
||||
var canvas = graphic.canvas;
|
||||
if( canvas && 0 == (canvas.additionalShaderChannels & AdditionalCanvasShaderChannels.TexCoord1))
|
||||
{
|
||||
using (new GUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.HelpBox("[Unity5.6+] Enable TexCoord1 of Canvas.additionalShaderChannels to use UIEffect.", MessageType.Warning);
|
||||
if (GUILayout.Button("Fix"))
|
||||
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIGradient))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIGradientEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
//================
|
||||
// Direction.
|
||||
//================
|
||||
var spDirection = serializedObject.FindProperty("m_Direction");
|
||||
EditorGUILayout.PropertyField(spDirection);
|
||||
|
||||
|
||||
//================
|
||||
// Color.
|
||||
//================
|
||||
var spColor1 = serializedObject.FindProperty("m_Color1");
|
||||
var spColor2 = serializedObject.FindProperty("m_Color2");
|
||||
var spColor3 = serializedObject.FindProperty("m_Color3");
|
||||
var spColor4 = serializedObject.FindProperty("m_Color4");
|
||||
switch ((UIGradient.Direction)spDirection.intValue)
|
||||
{
|
||||
case UIGradient.Direction.Horizontal:
|
||||
EditorGUILayout.PropertyField(spColor1, new GUIContent("Left"));
|
||||
EditorGUILayout.PropertyField(spColor2, new GUIContent("Right"));
|
||||
break;
|
||||
case UIGradient.Direction.Vertical:
|
||||
EditorGUILayout.PropertyField(spColor1, new GUIContent("Top"));
|
||||
EditorGUILayout.PropertyField(spColor2, new GUIContent("Bottom"));
|
||||
break;
|
||||
case UIGradient.Direction.Angle:
|
||||
EditorGUILayout.PropertyField(spColor1, new GUIContent("Color 1"));
|
||||
EditorGUILayout.PropertyField(spColor2, new GUIContent("Color 2"));
|
||||
break;
|
||||
case UIGradient.Direction.Diagonal:
|
||||
Rect r = EditorGUILayout.GetControlRect(false, 34);
|
||||
|
||||
r = EditorGUI.PrefixLabel(r, new GUIContent("Diagonal Color"));
|
||||
float w = r.width / 2;
|
||||
|
||||
EditorGUI.PropertyField(new Rect(r.x, r.y, w, 16), spColor3, GUIContent.none);
|
||||
EditorGUI.PropertyField(new Rect(r.x + w, r.y, w, 16), spColor4, GUIContent.none);
|
||||
EditorGUI.PropertyField(new Rect(r.x, r.y + 18, w, 16), spColor1, GUIContent.none);
|
||||
EditorGUI.PropertyField(new Rect(r.x + w, r.y + 18, w, 16), spColor2, GUIContent.none);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//================
|
||||
// Angle.
|
||||
//================
|
||||
if ((int)UIGradient.Direction.Angle <= spDirection.intValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Rotation"));
|
||||
}
|
||||
|
||||
|
||||
//================
|
||||
// Offset.
|
||||
//================
|
||||
if ((int)UIGradient.Direction.Diagonal == spDirection.intValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset1"), new GUIContent("Vertical Offset"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset2"), new GUIContent("Horizontal Offset"));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset1"), new GUIContent("Offset"));
|
||||
}
|
||||
|
||||
|
||||
//================
|
||||
// Advanced options.
|
||||
//================
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Advanced Options", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
{
|
||||
if ((target as UIGradient).graphic is Text)
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_GradientStyle"));
|
||||
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ColorSpace"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_IgnoreAspectRatio"));
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c28dcc885fbba4a5187a6a1aa5fb1b3b
|
||||
timeCreated: 1515895646
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,116 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIShadow editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIShadow))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIShadowEditor : Editor
|
||||
{
|
||||
ReorderableList roAdditionalShadows;
|
||||
SerializedProperty spAdditionalShadows;
|
||||
UIEffect uiEffect;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
uiEffect = (target as UIShadow).GetComponent<UIEffect>();
|
||||
spAdditionalShadows = serializedObject.FindProperty("m_AdditionalShadows");
|
||||
|
||||
roAdditionalShadows = new ReorderableList(serializedObject, spAdditionalShadows, true, true, true, true);
|
||||
roAdditionalShadows.drawElementCallback = DrawElementCallback;
|
||||
roAdditionalShadows.drawHeaderCallback = (rect) => EditorGUI.LabelField(rect, "Additional Shadows");
|
||||
roAdditionalShadows.onAddCallback = OnAddCallback;
|
||||
roAdditionalShadows.elementHeightCallback = ElementHeightCallback;
|
||||
|
||||
}
|
||||
|
||||
void OnAddCallback(ReorderableList ro)
|
||||
{
|
||||
spAdditionalShadows.InsertArrayElementAtIndex(ro.count);
|
||||
var element = spAdditionalShadows.GetArrayElementAtIndex(ro.count - 1);
|
||||
element.FindPropertyRelative("style").intValue = (int)ShadowStyle.Shadow;
|
||||
element.FindPropertyRelative("effectColor").colorValue = Color.black;
|
||||
element.FindPropertyRelative("effectDistance").vector2Value = new Vector2(1f, -1f);
|
||||
element.FindPropertyRelative("useGraphicAlpha").boolValue = true;
|
||||
element.FindPropertyRelative("blur").floatValue = 0.25f;
|
||||
}
|
||||
|
||||
float ElementHeightCallback(int index)
|
||||
{
|
||||
var element = spAdditionalShadows.GetArrayElementAtIndex(index);
|
||||
if (element.FindPropertyRelative("style").intValue == (int)ShadowStyle.None)
|
||||
return 16;
|
||||
|
||||
return (uiEffect && uiEffect.blurMode != BlurMode.None ? 84 : 64) + (EditorGUIUtility.wideMode ? 0 : 18);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void DrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
|
||||
{
|
||||
var sp = roAdditionalShadows.serializedProperty.GetArrayElementAtIndex(index);
|
||||
|
||||
Rect r = new Rect(rect);
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
var spMode = sp.FindPropertyRelative("style");
|
||||
EditorGUI.PropertyField(r, spMode);
|
||||
if (spMode.intValue == (int)ShadowStyle.None)
|
||||
return;
|
||||
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("effectColor"));
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("effectDistance"));
|
||||
r.y += EditorGUIUtility.wideMode ? r.height : r.height * 2;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("useGraphicAlpha"));
|
||||
|
||||
if (uiEffect && uiEffect.blurMode != BlurMode.None)
|
||||
{
|
||||
r.y += r.height;
|
||||
EditorGUI.PropertyField(r, sp.FindPropertyRelative("blur"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implement this function to make a custom inspector.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
//================
|
||||
// Shadow setting.
|
||||
//================
|
||||
var spShadowMode = serializedObject.FindProperty("m_Style");
|
||||
EditorGUILayout.PropertyField(spShadowMode);
|
||||
|
||||
// When shadow is enable, show parameters.
|
||||
if (spShadowMode.intValue != (int)ShadowStyle.None)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectDistance"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_EffectColor"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_UseGraphicAlpha"));
|
||||
|
||||
if (uiEffect && uiEffect.blurMode != BlurMode.None)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Blur"));
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
//================
|
||||
// Additional shadow setting.
|
||||
//================
|
||||
roAdditionalShadows.DoLayoutList();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public class UICustomEffect : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] Vector4 m_CustomFactor1 = new Vector4();
|
||||
[SerializeField] Vector4 m_CustomFactor2 = new Vector4();
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Custom effect factor 1.
|
||||
/// </summary>
|
||||
public Vector4 customFactor1 { get { return m_CustomFactor1; } set { m_CustomFactor1 = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Custom effect factor 2.
|
||||
/// </summary>
|
||||
public Vector4 customFactor2 { get { return m_CustomFactor2; } set { m_CustomFactor2 = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UIVertex vt;
|
||||
vh.GetUIVertexStream(tempVerts);
|
||||
|
||||
//================================
|
||||
// Effect modify original vertices.
|
||||
//================================
|
||||
{
|
||||
// Pack some effect factors to 1 float.
|
||||
Vector2 factor = new Vector2(
|
||||
Packer.ToFloat(m_CustomFactor1),
|
||||
Packer.ToFloat(m_CustomFactor2)
|
||||
);
|
||||
|
||||
for (int i = 0; i < tempVerts.Count; i++)
|
||||
{
|
||||
vt = tempVerts[i];
|
||||
|
||||
// Set prameters to vertex.
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
|
||||
tempVerts.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,300 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Dissolve effect for uGUI.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
public class UIDissolve : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-Dissolve";
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] [Range(0, 1)] float m_Location = 0.5f;
|
||||
[SerializeField] [Range(0, 1)] float m_Width = 0.5f;
|
||||
[SerializeField] [Range(0, 1)] float m_Softness = 0.5f;
|
||||
[SerializeField] [ColorUsage(false)] Color m_Color = new Color(0.0f, 0.25f, 1.0f);
|
||||
[SerializeField] ColorMode m_ColorMode = ColorMode.Add;
|
||||
[SerializeField] Texture m_NoiseTexture;
|
||||
[SerializeField] protected EffectArea m_EffectArea;
|
||||
[Header("Play Effect")]
|
||||
[SerializeField] bool m_Play = false;
|
||||
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
|
||||
[SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
|
||||
/// <summary>
|
||||
/// Current location[0-1] for dissolve effect. 0 is not dissolved, 1 is completely dissolved.
|
||||
/// </summary>
|
||||
public float location
|
||||
{
|
||||
get { return m_Location; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Location, value))
|
||||
{
|
||||
m_Location = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge width.
|
||||
/// </summary>
|
||||
public float width
|
||||
{
|
||||
get { return m_Width; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Width, value))
|
||||
{
|
||||
m_Width = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge softness.
|
||||
/// </summary>
|
||||
public float softness
|
||||
{
|
||||
get { return m_Softness; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Softness, value))
|
||||
{
|
||||
m_Softness = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge color.
|
||||
/// </summary>
|
||||
public Color color
|
||||
{
|
||||
get { return m_Color; }
|
||||
set
|
||||
{
|
||||
if (m_Color != value)
|
||||
{
|
||||
m_Color = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Noise texture.
|
||||
/// </summary>
|
||||
public Texture noiseTexture
|
||||
{
|
||||
get { return m_NoiseTexture; }
|
||||
set
|
||||
{
|
||||
if (m_NoiseTexture != value)
|
||||
{
|
||||
m_NoiseTexture = value;
|
||||
if (graphic)
|
||||
{
|
||||
ModifyMaterial();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The area for effect.
|
||||
/// </summary>
|
||||
public EffectArea effectArea
|
||||
{
|
||||
get { return m_EffectArea; }
|
||||
set
|
||||
{
|
||||
if (m_EffectArea != value)
|
||||
{
|
||||
m_EffectArea = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Play dissolve on enable.
|
||||
/// </summary>
|
||||
public bool play { get { return m_Play; } set { m_Play = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Dissolve duration.
|
||||
/// </summary>
|
||||
public float duration { get { return m_Duration; } set { m_Duration = Mathf.Max(value, 0.1f); } }
|
||||
|
||||
/// <summary>
|
||||
/// Dissolve update mode.
|
||||
/// </summary>
|
||||
public AnimatorUpdateMode updateMode { get { return m_UpdateMode; } set { m_UpdateMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the material.
|
||||
/// </summary>
|
||||
public override void ModifyMaterial()
|
||||
{
|
||||
ulong hash = (m_NoiseTexture ? (uint)m_NoiseTexture.GetInstanceID() : 0) + ((ulong)m_ColorMode << 32);
|
||||
if (_materialCache != null && (_materialCache.hash != hash || !isActiveAndEnabled || !m_EffectMaterial))
|
||||
{
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled || !m_EffectMaterial)
|
||||
{
|
||||
graphic.material = null;
|
||||
}
|
||||
else if (!m_NoiseTexture)
|
||||
{
|
||||
graphic.material = m_EffectMaterial;
|
||||
}
|
||||
else if (_materialCache != null && _materialCache.hash == hash)
|
||||
{
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
else
|
||||
{
|
||||
_materialCache = MaterialCache.Register(hash, m_NoiseTexture, () =>
|
||||
{
|
||||
var mat = new Material(m_EffectMaterial);
|
||||
mat.SetTexture("_NoiseTex", m_NoiseTexture);
|
||||
return mat;
|
||||
});
|
||||
graphic.material = _materialCache.material;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
return;
|
||||
|
||||
// rect.
|
||||
Rect rect = m_EffectArea.GetEffectArea(vh, graphic);
|
||||
|
||||
// Calculate vertex position.
|
||||
UIVertex vertex = default(UIVertex);
|
||||
bool effectEachCharacter = graphic is Text && m_EffectArea == EffectArea.Character;
|
||||
float x, y;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
|
||||
if (effectEachCharacter)
|
||||
{
|
||||
x = splitedCharacterPosition[i%4].x;
|
||||
y = splitedCharacterPosition[i%4].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = Mathf.Clamp01(vertex.position.x / rect.width + 0.5f);
|
||||
y = Mathf.Clamp01(vertex.position.y / rect.height + 0.5f);
|
||||
}
|
||||
vertex.uv1 = new Vector2(
|
||||
Packer.ToFloat(x, y, location, m_Width),
|
||||
Packer.ToFloat(m_Color.r, m_Color.g, m_Color.b, m_Softness)
|
||||
);
|
||||
|
||||
vh.SetUIVertex(vertex, i);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play effect.
|
||||
/// </summary>
|
||||
public void Play()
|
||||
{
|
||||
_time = 0;
|
||||
m_Play = true;
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Protected Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
_time = 0;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
MaterialCache.Unregister(_materialCache);
|
||||
_materialCache = null;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ColorMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
MaterialCache _materialCache = null;
|
||||
float _time = 0;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (!m_Play || !Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_time += m_UpdateMode == AnimatorUpdateMode.UnscaledTime
|
||||
? Time.unscaledDeltaTime
|
||||
: Time.deltaTime;
|
||||
location = _time / m_Duration;
|
||||
|
||||
if (m_Duration <= _time)
|
||||
{
|
||||
m_Play = false;
|
||||
_time = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,477 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIEffect : UIEffectBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Additional shadow.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class AdditionalShadow
|
||||
{
|
||||
/// <summary>
|
||||
/// How far is the blurring shadow from the graphic.
|
||||
/// </summary>
|
||||
[Range(0, 1)] public float shadowBlur = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle shadowMode = ShadowStyle.Shadow;
|
||||
|
||||
/// <summary>
|
||||
/// Color for the shadow effect.
|
||||
/// </summary>
|
||||
public Color shadowColor = Color.black;
|
||||
|
||||
/// <summary>
|
||||
/// How far is the shadow from the graphic.
|
||||
/// </summary>
|
||||
public Vector2 effectDistance = new Vector2(1f, -1f);
|
||||
|
||||
/// <summary>
|
||||
/// Should the shadow inherit the alpha from the graphic?
|
||||
/// </summary>
|
||||
public bool useGraphicAlpha = true;
|
||||
}
|
||||
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect";
|
||||
|
||||
// /// <summary>
|
||||
// /// Tone effect mode.
|
||||
// /// </summary>
|
||||
// public enum ToneMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Grayscale,
|
||||
// Sepia,
|
||||
// Nega,
|
||||
// Pixel,
|
||||
// Mono,
|
||||
// Cutoff,
|
||||
// Hue,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Color effect mode.
|
||||
// /// </summary>
|
||||
// public enum ColorMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Set,
|
||||
// Add,
|
||||
// Sub,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Shadow effect style.
|
||||
// /// </summary>
|
||||
// public enum ShadowStyle
|
||||
// {
|
||||
// None = 0,
|
||||
// Shadow,
|
||||
// Outline,
|
||||
// Outline8,
|
||||
// Shadow3,
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Blur effect mode.
|
||||
// /// </summary>
|
||||
// public enum BlurMode
|
||||
// {
|
||||
// None = 0,
|
||||
// Fast,
|
||||
// Medium,
|
||||
// Detail,
|
||||
// }
|
||||
//
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField][Range(0, 1)] float m_ToneLevel = 1;
|
||||
[SerializeField][Range(0, 1)] float m_Blur = 0.25f;
|
||||
[SerializeField][Range(0, 1)] float m_ShadowBlur = 0.25f;
|
||||
[SerializeField] ShadowStyle m_ShadowStyle;
|
||||
[SerializeField] ToneMode m_ToneMode;
|
||||
[SerializeField] ColorMode m_ColorMode;
|
||||
[SerializeField] BlurMode m_BlurMode;
|
||||
[SerializeField] Color m_ShadowColor = Color.black;
|
||||
[SerializeField] Vector2 m_EffectDistance = new Vector2(1f, -1f);
|
||||
[SerializeField] bool m_UseGraphicAlpha = true;
|
||||
[SerializeField] Color m_EffectColor = Color.white;
|
||||
[SerializeField] List<AdditionalShadow> m_AdditionalShadows = new List<AdditionalShadow>();
|
||||
|
||||
|
||||
[SerializeField] bool m_CustomEffect = false;
|
||||
[SerializeField] Vector4 m_CustomFactor = new Vector4();
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Graphic affected by the UIEffect.
|
||||
/// </summary>
|
||||
[System.Obsolete ("Use targetGraphic instead (UnityUpgradable) -> targetGraphic")]
|
||||
new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Tone effect level between 0(no effect) and 1(complete effect).
|
||||
/// </summary>
|
||||
public float toneLevel{ get { return m_ToneLevel; } set { m_ToneLevel = Mathf.Clamp(value, 0, 1); SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring from the graphic.
|
||||
/// </summary>
|
||||
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 1); SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring shadow from the graphic.
|
||||
/// </summary>
|
||||
public float shadowBlur { get { return m_ShadowBlur; } set { m_ShadowBlur = Mathf.Clamp(value, 0, 1); SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle shadowStyle { get { return m_ShadowStyle; } set { m_ShadowStyle = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Tone effect mode.
|
||||
/// </summary>
|
||||
public ToneMode toneMode { get { return m_ToneMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public BlurMode blurMode { get { return m_BlurMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color for the shadow effect.
|
||||
/// </summary>
|
||||
public Color shadowColor { get { return m_ShadowColor; } set { m_ShadowColor = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the shadow from the graphic.
|
||||
/// </summary>
|
||||
public Vector2 effectDistance { get { return m_EffectDistance; } set { m_EffectDistance = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Should the shadow inherit the alpha from the graphic?
|
||||
/// </summary>
|
||||
public bool useGraphicAlpha { get { return m_UseGraphicAlpha; } set { m_UseGraphicAlpha = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Color for the color effect.
|
||||
/// </summary>
|
||||
public Color effectColor { get { return m_EffectColor; } set { m_EffectColor = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Additional Shadows.
|
||||
/// </summary>
|
||||
public List<AdditionalShadow> additionalShadows { get { return m_AdditionalShadows; } }
|
||||
|
||||
/// <summary>
|
||||
/// Custom effect factor.
|
||||
/// </summary>
|
||||
public Vector4 customFactor { get { return m_CustomFactor; } set { m_CustomFactor = value; SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UIVertex vt;
|
||||
vh.GetUIVertexStream(tempVerts);
|
||||
|
||||
//================================
|
||||
// Effect modify original vertices.
|
||||
//================================
|
||||
{
|
||||
// Pack some effect factors to 1 float.
|
||||
Vector2 factor = new Vector2(
|
||||
m_CustomEffect ? Packer.ToFloat(m_CustomFactor) : Packer.ToFloat(toneLevel, 0, blur, 0),
|
||||
Packer.ToFloat(effectColor.r, effectColor.g, effectColor.b, effectColor.a)
|
||||
);
|
||||
|
||||
for (int i = 0; i < tempVerts.Count; i++)
|
||||
{
|
||||
vt = tempVerts[i];
|
||||
|
||||
// Set UIEffect prameters to vertex.
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
//================================
|
||||
// Append shadow vertices.
|
||||
//================================
|
||||
{
|
||||
var inputVertCount = tempVerts.Count;
|
||||
var start = 0;
|
||||
var end = inputVertCount;
|
||||
|
||||
// Additional Shadows.
|
||||
for (int i = additionalShadows.Count - 1; 0 <= i; i--)
|
||||
{
|
||||
AdditionalShadow shadow = additionalShadows[i];
|
||||
_ApplyShadow(tempVerts, ref start, ref end, shadow.shadowMode, toneLevel, shadow.shadowBlur, shadow.effectDistance, shadow.shadowColor, shadow.useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Shadow.
|
||||
_ApplyShadow(tempVerts, ref start, ref end, shadowStyle, toneLevel, shadowBlur, effectDistance, shadowColor, useGraphicAlpha);
|
||||
}
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
|
||||
tempVerts.Clear();
|
||||
}
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
//
|
||||
// protected override void OnValidate ()
|
||||
// {
|
||||
// base.OnValidate ();
|
||||
// EditorApplication.delayCall += () => UpdateMaterial(false);
|
||||
// }
|
||||
//
|
||||
// public override void OnAfterDeserialize()
|
||||
// {
|
||||
// if (!m_CustomEffect)
|
||||
// {
|
||||
// EditorApplication.delayCall += () => UpdateMaterial (true);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void UpdateMaterial(bool onlyEditMode)
|
||||
// {
|
||||
// if(!this || onlyEditMode && Application.isPlaying)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// var mat = (0 == toneMode) && (0 == colorMode) && (0 == blurMode)
|
||||
// ? null
|
||||
// : GetOrGenerateMaterialVariant(Shader.Find(shaderName), toneMode, colorMode, blurMode);
|
||||
//
|
||||
// if (m_EffectMaterial != mat || targetGraphic.material != mat)
|
||||
// {
|
||||
// targetGraphic.material = m_EffectMaterial = mat;
|
||||
// EditorUtility.SetDirty(this);
|
||||
// EditorUtility.SetDirty(targetGraphic);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// public static Material GetOrGenerateMaterialVariant(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
|
||||
// {
|
||||
// if (!shader)
|
||||
// return null;
|
||||
//
|
||||
// Material mat = GetMaterial(shader, tone, color, blur);
|
||||
//
|
||||
// if (!mat)
|
||||
// {
|
||||
// Debug.Log("Generate material : " + GetVariantName(shader, tone, color, blur));
|
||||
// mat = new Material(shader);
|
||||
//
|
||||
// if (0 < tone)
|
||||
// mat.EnableKeyword("" + tone.ToString().ToUpper());
|
||||
// if (0 < color)
|
||||
// mat.EnableKeyword("UI_COLOR_" + color.ToString().ToUpper());
|
||||
// if (0 < blur)
|
||||
// mat.EnableKeyword("UI_BLUR_" + blur.ToString().ToUpper());
|
||||
//
|
||||
// mat.name = GetVariantName(shader, tone, color, blur);
|
||||
// mat.hideFlags |= HideFlags.NotEditable;
|
||||
//
|
||||
//#if UIEFFECT_SEPARATE
|
||||
// bool isMainAsset = true;
|
||||
// string dir = Path.GetDirectoryName(GetDefaultMaterialPath (shader));
|
||||
// string materialPath = Path.Combine(Path.Combine(dir, "Separated"), mat.name + ".mat");
|
||||
//#else
|
||||
// bool isMainAsset = (0 == tone) && (0 == color) && (0 == blur);
|
||||
// string materialPath = GetDefaultMaterialPath (shader);
|
||||
//#endif
|
||||
// if (isMainAsset)
|
||||
// {
|
||||
// Directory.CreateDirectory(Path.GetDirectoryName(materialPath));
|
||||
// AssetDatabase.CreateAsset(mat, materialPath);
|
||||
// AssetDatabase.SaveAssets();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// mat.hideFlags |= HideFlags.HideInHierarchy;
|
||||
// AssetDatabase.AddObjectToAsset(mat, materialPath);
|
||||
// }
|
||||
// }
|
||||
// return mat;
|
||||
// }
|
||||
//
|
||||
// public static Material GetMaterial(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
|
||||
// {
|
||||
// string variantName = GetVariantName(shader, tone, color, blur);
|
||||
// return AssetDatabase.FindAssets("t:Material " + Path.GetFileName(shader.name))
|
||||
// .Select(x => AssetDatabase.GUIDToAssetPath(x))
|
||||
// .SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
|
||||
// .OfType<Material>()
|
||||
// .FirstOrDefault(x => x.name == variantName);
|
||||
// }
|
||||
//
|
||||
// public static string GetDefaultMaterialPath(Shader shader)
|
||||
// {
|
||||
// var name = Path.GetFileName (shader.name);
|
||||
// return AssetDatabase.FindAssets("t:Material " + name)
|
||||
// .Select(x => AssetDatabase.GUIDToAssetPath(x))
|
||||
// .FirstOrDefault(x => Path.GetFileNameWithoutExtension(x) == name)
|
||||
// ?? ("Assets/Coffee/UIExtensions/UIEffect/Materials/" + name + ".mat");
|
||||
// }
|
||||
//
|
||||
// public static string GetVariantName(Shader shader, ToneMode tone, ColorMode color, BlurMode blur)
|
||||
// {
|
||||
// return
|
||||
//#if UIEFFECT_SEPARATE
|
||||
// "[Separated] " + Path.GetFileName(shader.name)
|
||||
//#else
|
||||
// Path.GetFileName(shader.name)
|
||||
//#endif
|
||||
// + (0 < tone ? "-" + tone : "")
|
||||
// + (0 < color ? "-" + color : "")
|
||||
// + (0 < blur ? "-" + blur : "");
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial ()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ToneMode, m_ColorMode, m_BlurMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
void _ApplyShadow(List<UIVertex> verts, ref int start, ref int end, ShadowStyle mode, float toneLevel, float blur, Vector2 effectDistance, Color color, bool useGraphicAlpha)
|
||||
{
|
||||
if (ShadowStyle.None == mode)
|
||||
return;
|
||||
|
||||
var factor = new Vector2(
|
||||
Packer.ToFloat(toneLevel, 0, blur, 0),
|
||||
Packer.ToFloat(color.r, color.g, color.b, 1)
|
||||
);
|
||||
|
||||
// Append Shadow.
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
|
||||
// Append Shadow3.
|
||||
if (ShadowStyle.Shadow3 == mode)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Append Outline.
|
||||
else if (ShadowStyle.Outline == mode)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Append Outline8.
|
||||
else if (ShadowStyle.Outline8 == mode)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, -effectDistance.x, 0, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, -effectDistance.y, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(tempVerts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
void _ApplyShadowZeroAlloc(List<UIVertex> verts, ref int start, ref int end, float x, float y, Vector2 factor, Color color, bool useGraphicAlpha)
|
||||
{
|
||||
// Check list capacity.
|
||||
var neededCapacity = verts.Count + end - start;
|
||||
if (verts.Capacity < neededCapacity)
|
||||
verts.Capacity = neededCapacity;
|
||||
|
||||
// Append shadow vertices to the front of list.
|
||||
// * The original vertex is pushed backward.
|
||||
UIVertex vt;
|
||||
for (int i = start; i < end; ++i)
|
||||
{
|
||||
vt = verts[i];
|
||||
verts.Add(vt);
|
||||
|
||||
Vector3 v = vt.position;
|
||||
vt.position.Set(v.x + x, v.y + y, v.z);
|
||||
|
||||
Color vertColor = color;
|
||||
|
||||
if(colorMode != ColorMode.Multiply)
|
||||
{
|
||||
vertColor.r = vertColor.g = vertColor.b = 1;
|
||||
}
|
||||
|
||||
vertColor.a = useGraphicAlpha ? color.a * vt.color.a / 255 : color.a;
|
||||
vt.color = vertColor;
|
||||
|
||||
// Set UIEffect prameters to vertex.
|
||||
vt.uv1 = factor;
|
||||
verts[i] = vt;
|
||||
}
|
||||
|
||||
// Update next shadow offset.
|
||||
start = end;
|
||||
end = verts.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,416 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffectCapturedImage
|
||||
/// </summary>
|
||||
public class UIEffectCapturedImage : RawImage
|
||||
#if UNITY_EDITOR
|
||||
, ISerializationCallbackReceiver
|
||||
#endif
|
||||
{
|
||||
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-EffectCapture";
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate.
|
||||
/// </summary>
|
||||
public enum DesamplingRate
|
||||
{
|
||||
None = 0,
|
||||
x1 = 1,
|
||||
x2 = 2,
|
||||
x4 = 4,
|
||||
x8 = 8,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField][Range(0, 1)] float m_ToneLevel = 1;
|
||||
[SerializeField][Range(0, 1)] float m_Blur = 0;
|
||||
[SerializeField] ToneMode m_ToneMode;
|
||||
[SerializeField] ColorMode m_ColorMode;
|
||||
[SerializeField] BlurMode m_BlurMode;
|
||||
[SerializeField] Color m_EffectColor = Color.white;
|
||||
[SerializeField] DesamplingRate m_DesamplingRate;
|
||||
[SerializeField] DesamplingRate m_ReductionRate;
|
||||
[SerializeField] FilterMode m_FilterMode = FilterMode.Bilinear;
|
||||
[SerializeField] Material m_EffectMaterial;
|
||||
[FormerlySerializedAs("m_Iterations")]
|
||||
[SerializeField][Range(1, 8)] int m_BlurIterations = 1;
|
||||
[SerializeField] bool m_KeepCanvasSize = true;
|
||||
[SerializeField] RenderTexture m_TargetTexture;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Tone effect level between 0(no effect) and 1(complete effect).
|
||||
/// </summary>
|
||||
public float toneLevel { get { return m_ToneLevel; } set { m_ToneLevel = Mathf.Clamp(value, 0, 1); } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring from the graphic.
|
||||
/// </summary>
|
||||
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 4); } }
|
||||
|
||||
/// <summary>
|
||||
/// Tone effect mode.
|
||||
/// </summary>
|
||||
public ToneMode toneMode { get { return m_ToneMode; } set { m_ToneMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
/// </summary>
|
||||
public ColorMode colorMode { get { return m_ColorMode; } set { m_ColorMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
/// </summary>
|
||||
public BlurMode blurMode { get { return m_BlurMode; } set { m_BlurMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Color for the color effect.
|
||||
/// </summary>
|
||||
public Color effectColor { get { return m_EffectColor; } set { m_EffectColor = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Effect material.
|
||||
/// </summary>
|
||||
public virtual Material effectMaterial { get { return m_EffectMaterial; } }
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate of the generated RenderTexture.
|
||||
/// </summary>
|
||||
public DesamplingRate desamplingRate { get { return m_DesamplingRate; } set { m_DesamplingRate = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Desampling rate of reduction buffer to apply effect.
|
||||
/// </summary>
|
||||
public DesamplingRate reductionRate { get { return m_ReductionRate; } set { m_ReductionRate = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// FilterMode for capture.
|
||||
/// </summary>
|
||||
public FilterMode filterMode { get { return m_FilterMode; } set { m_FilterMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Captured texture.
|
||||
/// </summary>
|
||||
public RenderTexture capturedTexture { get { return m_TargetTexture ? m_TargetTexture : _rt; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur iterations.
|
||||
/// </summary>
|
||||
[System.Obsolete("Use blurIterations instead (UnityUpgradable) -> blurIterations")]
|
||||
public int iterations { get { return m_BlurIterations; } set { m_BlurIterations = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Blur iterations.
|
||||
/// </summary>
|
||||
public int blurIterations { get { return m_BlurIterations; } set { m_BlurIterations = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Fits graphic size to the root canvas.
|
||||
/// </summary>
|
||||
public bool keepCanvasSize { get { return m_KeepCanvasSize; } set { m_KeepCanvasSize = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Target RenderTexture to capture.
|
||||
/// </summary>
|
||||
public RenderTexture targetTexture { get { return m_TargetTexture; } set { m_TargetTexture = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the MonoBehaviour will be destroyed.
|
||||
/// </summary>
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
_Release(true);
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback function when a UI element needs to generate vertices.
|
||||
/// </summary>
|
||||
protected override void OnPopulateMesh(VertexHelper vh)
|
||||
{
|
||||
// When not displaying, clear vertex.
|
||||
if (texture == null || effectColor.a < 1 / 255f || canvasRenderer.GetAlpha() < 1 / 255f)
|
||||
vh.Clear();
|
||||
else
|
||||
base.OnPopulateMesh(vh);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the desampling.
|
||||
/// </summary>
|
||||
public void GetDesamplingSize(DesamplingRate rate, out int w, out int h)
|
||||
{
|
||||
var cam = canvas.worldCamera ?? Camera.main;
|
||||
h = cam.pixelHeight;
|
||||
w = cam.pixelWidth;
|
||||
if (rate != DesamplingRate.None)
|
||||
{
|
||||
h = Mathf.ClosestPowerOfTwo(h / (int)rate);
|
||||
w = Mathf.ClosestPowerOfTwo(w / (int)rate);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Capture rendering result.
|
||||
/// </summary>
|
||||
public void Capture()
|
||||
{
|
||||
// Camera for command buffer.
|
||||
_camera = canvas.worldCamera ?? Camera.main;
|
||||
|
||||
// Cache id for RT.
|
||||
if (s_CopyId == 0)
|
||||
{
|
||||
s_CopyId = Shader.PropertyToID("_UIEffectCapturedImage_ScreenCopyId");
|
||||
s_EffectId1 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId1");
|
||||
s_EffectId2 = Shader.PropertyToID("_UIEffectCapturedImage_EffectId2");
|
||||
|
||||
s_EffectFactorId = Shader.PropertyToID("_EffectFactor");
|
||||
s_ColorFactorId = Shader.PropertyToID("_ColorFactor");
|
||||
}
|
||||
|
||||
// If size of generated result RT has changed, relese it.
|
||||
int w, h;
|
||||
GetDesamplingSize(m_DesamplingRate, out w, out h);
|
||||
if (m_TargetTexture)
|
||||
{
|
||||
_rtToRelease = _rt;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_rt && (_rt.width != w || _rt.height != h))
|
||||
{
|
||||
_rtToRelease = _rt;
|
||||
_rt = null;
|
||||
}
|
||||
|
||||
// Generate result RT.
|
||||
if (_rt == null)
|
||||
{
|
||||
_rt = new RenderTexture(w, h, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default);
|
||||
_rt.filterMode = m_FilterMode;
|
||||
_rt.useMipMap = false;
|
||||
_rt.wrapMode = TextureWrapMode.Clamp;
|
||||
_rt.hideFlags = HideFlags.HideAndDontSave;
|
||||
}
|
||||
}
|
||||
|
||||
// Create command buffer.
|
||||
if (_buffer == null)
|
||||
{
|
||||
var rtId = new RenderTargetIdentifier(m_TargetTexture ? m_TargetTexture : _rt);
|
||||
|
||||
// Material for effect.
|
||||
Material mat = effectMaterial;
|
||||
|
||||
_buffer = new CommandBuffer();
|
||||
_buffer.name = mat ? mat.name : "noeffect";
|
||||
if (_rt)
|
||||
{
|
||||
_rt.name = _buffer.name;
|
||||
}
|
||||
|
||||
|
||||
// Copy to temporary RT.
|
||||
_buffer.GetTemporaryRT(s_CopyId, -1, -1, 0, m_FilterMode);
|
||||
_buffer.Blit(BuiltinRenderTextureType.CurrentActive, s_CopyId);
|
||||
|
||||
// Set properties.
|
||||
_buffer.SetGlobalVector(s_EffectFactorId, new Vector4(toneLevel, 0));
|
||||
_buffer.SetGlobalVector(s_ColorFactorId, new Vector4(effectColor.r, effectColor.g, effectColor.b, effectColor.a));
|
||||
|
||||
// Blit without effect.
|
||||
if (!mat)
|
||||
{
|
||||
_buffer.Blit(s_CopyId, rtId);
|
||||
_buffer.ReleaseTemporaryRT(s_CopyId);
|
||||
}
|
||||
// Blit with effect.
|
||||
else
|
||||
{
|
||||
GetDesamplingSize(m_ReductionRate, out w, out h);
|
||||
_buffer.GetTemporaryRT(s_EffectId1, w, h, 0, m_FilterMode);
|
||||
|
||||
// Apply base effect (copied screen -> effect1).
|
||||
_buffer.Blit(s_CopyId, s_EffectId1, mat, 0);
|
||||
_buffer.ReleaseTemporaryRT(s_CopyId);
|
||||
|
||||
// Iterate the operation.
|
||||
if(m_BlurMode != BlurMode.None)
|
||||
{
|
||||
_buffer.GetTemporaryRT(s_EffectId2, w, h, 0, m_FilterMode);
|
||||
for (int i = 0; i < m_BlurIterations; i++)
|
||||
{
|
||||
// Apply effect (effect1 -> effect2, or effect2 -> effect1).
|
||||
_buffer.SetGlobalVector(s_EffectFactorId, new Vector4(blur, 0));
|
||||
_buffer.Blit(s_EffectId1, s_EffectId2, mat, 1);
|
||||
_buffer.SetGlobalVector(s_EffectFactorId, new Vector4(0, blur));
|
||||
_buffer.Blit(s_EffectId2, s_EffectId1, mat, 1);
|
||||
}
|
||||
_buffer.ReleaseTemporaryRT(s_EffectId2);
|
||||
}
|
||||
|
||||
_buffer.Blit(s_EffectId1, rtId);
|
||||
_buffer.ReleaseTemporaryRT(s_EffectId1);
|
||||
}
|
||||
}
|
||||
|
||||
// Add command buffer to camera.
|
||||
_camera.AddCommandBuffer(kCameraEvent, _buffer);
|
||||
|
||||
// StartCoroutine by CanvasScaler.
|
||||
var rootCanvas = canvas.rootCanvas;
|
||||
var scaler = rootCanvas.GetComponent<CanvasScaler>();
|
||||
scaler.StartCoroutine(_CoUpdateTextureOnNextFrame());
|
||||
if (m_KeepCanvasSize)
|
||||
{
|
||||
var rootTransform = rootCanvas.transform as RectTransform;
|
||||
var size = rootTransform.rect.size;
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size.x);
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size.y);
|
||||
rectTransform.position = rootTransform.position;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Release captured image.
|
||||
/// </summary>
|
||||
public void Release()
|
||||
{
|
||||
_Release(true);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset()
|
||||
{
|
||||
// Set parameters as 'Detail'.
|
||||
m_BlurIterations = 5;
|
||||
m_FilterMode = FilterMode.Bilinear;
|
||||
m_DesamplingRate = DesamplingRate.None;
|
||||
m_ReductionRate = DesamplingRate.x1;
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the before serialize event.
|
||||
/// </summary>
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the after deserialize event.
|
||||
/// </summary>
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += () => UpdateMaterial(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the validate event.
|
||||
/// </summary>
|
||||
protected override void OnValidate ()
|
||||
{
|
||||
base.OnValidate ();
|
||||
UnityEditor.EditorApplication.delayCall += () => UpdateMaterial(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the material.
|
||||
/// </summary>
|
||||
/// <param name="ignoreInPlayMode">If set to <c>true</c> ignore in play mode.</param>
|
||||
protected void UpdateMaterial(bool ignoreInPlayMode)
|
||||
{
|
||||
if(!this || ignoreInPlayMode && Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var mat = MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_ToneMode, m_ColorMode, m_BlurMode);
|
||||
if (m_EffectMaterial != mat)
|
||||
{
|
||||
material = null;
|
||||
m_EffectMaterial = mat;
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
const CameraEvent kCameraEvent = CameraEvent.AfterEverything;
|
||||
Camera _camera;
|
||||
RenderTexture _rt;
|
||||
RenderTexture _rtToRelease;
|
||||
CommandBuffer _buffer;
|
||||
|
||||
static int s_CopyId;
|
||||
static int s_EffectId1;
|
||||
static int s_EffectId2;
|
||||
static int s_EffectFactorId;
|
||||
static int s_ColorFactorId;
|
||||
|
||||
/// <summary>
|
||||
/// Release genarated objects.
|
||||
/// </summary>
|
||||
/// <param name="releaseRT">If set to <c>true</c> release cached RenderTexture.</param>
|
||||
void _Release(bool releaseRT)
|
||||
{
|
||||
if (releaseRT || m_TargetTexture)
|
||||
{
|
||||
texture = null;
|
||||
|
||||
if (_rt != null)
|
||||
{
|
||||
_rt.Release();
|
||||
_rt = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (_buffer != null)
|
||||
{
|
||||
if (_camera != null)
|
||||
_camera.RemoveCommandBuffer(kCameraEvent, _buffer);
|
||||
_buffer.Release();
|
||||
_buffer = null;
|
||||
}
|
||||
|
||||
if (_rtToRelease)
|
||||
{
|
||||
_rtToRelease.Release();
|
||||
_rtToRelease = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set texture on next frame.
|
||||
/// </summary>
|
||||
IEnumerator _CoUpdateTextureOnNextFrame()
|
||||
{
|
||||
yield return new WaitForEndOfFrame();
|
||||
|
||||
_Release(false);
|
||||
texture = m_TargetTexture ? m_TargetTexture : _rt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e96dacbf1b116f64da658fbad66839e2
|
||||
timeCreated: 1513158591
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- m_Material: {instanceID: 0}
|
||||
- m_Texture: {instanceID: 0}
|
||||
- m_Shader: {fileID: 4800000, guid: c7bb8dee750384818a922a942cd437f9, type: 3}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,58 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIFlip : BaseMeshEffect
|
||||
{
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] private bool m_Horizontal = false;
|
||||
[SerializeField] private bool m_Veritical = false;
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped horizontally.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
|
||||
public bool horizontal { get { return this.m_Horizontal; } set { this.m_Horizontal = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped vertically.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
|
||||
public bool vertical { get { return this.m_Veritical; } set { this.m_Veritical = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Call used to modify mesh.
|
||||
/// </summary>
|
||||
/// <param name="vh">VertexHelper.</param>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
RectTransform rt = graphic.rectTransform;
|
||||
UIVertex vt = default(UIVertex);
|
||||
Vector3 pos;
|
||||
Vector2 center = rt.rect.center;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vt, i);
|
||||
pos = vt.position;
|
||||
vt.position = new Vector3(
|
||||
m_Horizontal ? -pos.x : pos.x,
|
||||
m_Veritical ? -pos.y : pos.y
|
||||
// m_Horizontal ? (pos.x + (center.x - pos.x) * 2) : pos.x,
|
||||
// m_Veritical ? (pos.y + (center.y - pos.y) * 2) : pos.y
|
||||
);
|
||||
vh.SetUIVertex(vt, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIGradient.
|
||||
/// </summary>
|
||||
[DisallowMultipleComponent]
|
||||
public class UIGradient : BaseMeshEffect
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
|
||||
/// <summary>
|
||||
/// Gradient direction.
|
||||
/// </summary>
|
||||
public enum Direction
|
||||
{
|
||||
Horizontal,
|
||||
Vertical,
|
||||
Angle,
|
||||
Diagonal,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gradient space for Text.
|
||||
/// </summary>
|
||||
public enum GradientStyle
|
||||
{
|
||||
Rect,
|
||||
Fit,
|
||||
Split,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] Direction m_Direction;
|
||||
[SerializeField] Color m_Color1 = Color.white;
|
||||
[SerializeField] Color m_Color2 = Color.white;
|
||||
[SerializeField] Color m_Color3 = Color.white;
|
||||
[SerializeField] Color m_Color4 = Color.white;
|
||||
[SerializeField][Range(-180, 180)] float m_Rotation;
|
||||
[SerializeField][Range(-1, 1)] float m_Offset1;
|
||||
[SerializeField][Range(-1, 1)] float m_Offset2;
|
||||
[SerializeField] GradientStyle m_GradientStyle;
|
||||
[SerializeField] ColorSpace m_ColorSpace = ColorSpace.Uninitialized;
|
||||
[SerializeField] bool m_IgnoreAspectRatio = true;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gradient Direction.
|
||||
/// </summary>
|
||||
public Direction direction { get { return m_Direction; } set { if (m_Direction != value) { m_Direction = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Color1: Top or Left.
|
||||
/// </summary>
|
||||
public Color color1 { get { return m_Color1; } set { if (m_Color1 != value) { m_Color1 = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Color2: Bottom or Right.
|
||||
/// </summary>
|
||||
public Color color2 { get { return m_Color2; } set { if (m_Color2 != value) { m_Color2 = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Color3: For diagonal.
|
||||
/// </summary>
|
||||
public Color color3 { get { return m_Color3; } set { if (m_Color3 != value) { m_Color3 = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Color4: For diagonal.
|
||||
/// </summary>
|
||||
public Color color4 { get { return m_Color4; } set { if (m_Color4 != value) { m_Color4 = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Gradient rotation.
|
||||
/// </summary>
|
||||
public float rotation
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Direction == Direction.Horizontal ? -90
|
||||
: m_Direction == Direction.Vertical ? 0
|
||||
: m_Rotation;
|
||||
}
|
||||
set { if (!Mathf.Approximately(m_Rotation, value)) { m_Rotation = value; graphic.SetVerticesDirty(); } }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gradient offset for Horizontal, Vertical or Angle.
|
||||
/// </summary>
|
||||
public float offset { get { return m_Offset1; } set { if (m_Offset1 != value) { m_Offset1 = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Gradient offset for Diagonal.
|
||||
/// </summary>
|
||||
public Vector2 offset2 { get { return new Vector2(m_Offset2, m_Offset1); } set { if (m_Offset1 != value.y || m_Offset2 != value.x) { m_Offset1 = value.y; m_Offset2 = value.x; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Gradient style for Text.
|
||||
/// </summary>
|
||||
public GradientStyle gradientStyle { get { return m_GradientStyle; } set { if (m_GradientStyle != value) { m_GradientStyle = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Color space to correct color.
|
||||
/// </summary>
|
||||
public ColorSpace colorSpace { get { return m_ColorSpace; } set { if (m_ColorSpace != value) { m_ColorSpace = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
/// <summary>
|
||||
/// Ignore aspect ratio.
|
||||
/// </summary>
|
||||
public bool ignoreAspectRatio { get { return m_IgnoreAspectRatio; } set { if (m_IgnoreAspectRatio != value) { m_IgnoreAspectRatio = value; graphic.SetVerticesDirty(); } } }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Call used to modify mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!IsActive())
|
||||
return;
|
||||
|
||||
// Gradient space.
|
||||
Rect rect = default(Rect);
|
||||
UIVertex vertex = default(UIVertex);
|
||||
if (!(graphic is Text) || m_GradientStyle == GradientStyle.Rect)
|
||||
{
|
||||
// RectTransform.
|
||||
rect = graphic.rectTransform.rect;
|
||||
}
|
||||
else if (m_GradientStyle == GradientStyle.Split)
|
||||
{
|
||||
// Each characters.
|
||||
rect.Set(0, 0, 1, 1);
|
||||
}
|
||||
else if (m_GradientStyle == GradientStyle.Fit)
|
||||
{
|
||||
// Fit to contents.
|
||||
rect.xMin = rect.yMin = float.MaxValue;
|
||||
rect.xMax = rect.yMax = float.MinValue;
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
rect.xMin = Mathf.Min(rect.xMin, vertex.position.x);
|
||||
rect.yMin = Mathf.Min(rect.yMin, vertex.position.y);
|
||||
rect.xMax = Mathf.Max(rect.xMax, vertex.position.x);
|
||||
rect.yMax = Mathf.Max(rect.yMax, vertex.position.y);
|
||||
}
|
||||
}
|
||||
|
||||
// Gradient rotation.
|
||||
float rad = rotation * Mathf.Deg2Rad;
|
||||
Vector2 dir = new Vector2(Mathf.Cos(rad), Mathf.Sin(rad));
|
||||
if (!m_IgnoreAspectRatio && Direction.Angle <= m_Direction)
|
||||
{
|
||||
dir.x *= rect.height / rect.width;
|
||||
dir = dir.normalized;
|
||||
}
|
||||
|
||||
// Calculate vertex color.
|
||||
Color color;
|
||||
Vector2 nomalizedPos;
|
||||
Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix.
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
|
||||
// Normalize vertex position by local matrix.
|
||||
if (m_GradientStyle == GradientStyle.Split)
|
||||
{
|
||||
// Each characters.
|
||||
nomalizedPos = localMatrix * s_SplitedCharacterPosition[i % 4] + offset2;
|
||||
}
|
||||
else
|
||||
{
|
||||
nomalizedPos = localMatrix * vertex.position + offset2;
|
||||
}
|
||||
|
||||
// Interpolate vertex color.
|
||||
if (direction == Direction.Diagonal)
|
||||
{
|
||||
color = Color.LerpUnclamped(
|
||||
Color.LerpUnclamped(m_Color1, m_Color2, nomalizedPos.x),
|
||||
Color.LerpUnclamped(m_Color3, m_Color4, nomalizedPos.x),
|
||||
nomalizedPos.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
color = Color.LerpUnclamped(m_Color2, m_Color1, nomalizedPos.y);
|
||||
}
|
||||
|
||||
// Correct color.
|
||||
vertex.color *= (m_ColorSpace == ColorSpace.Gamma) ? color.gamma
|
||||
: (m_ColorSpace == ColorSpace.Linear) ? color.linear
|
||||
: color;
|
||||
|
||||
vh.SetUIVertex(vertex, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
static readonly Vector2[] s_SplitedCharacterPosition = { Vector2.up, Vector2.one, Vector2.right, Vector2.zero };
|
||||
|
||||
/// <summary>
|
||||
/// Matrix2x3.
|
||||
/// </summary>
|
||||
struct Matrix2x3
|
||||
{
|
||||
public float m00, m01, m02, m10, m11, m12;
|
||||
|
||||
public Matrix2x3(Rect rect, float cos, float sin)
|
||||
{
|
||||
const float center = 0.5f;
|
||||
float dx = -rect.xMin / rect.width - center;
|
||||
float dy = -rect.yMin / rect.height - center;
|
||||
m00 = cos / rect.width;
|
||||
m01 = -sin / rect.height;
|
||||
m02 = dx * cos - dy * sin + center;
|
||||
m10 = sin / rect.width;
|
||||
m11 = cos / rect.height;
|
||||
m12 = dx * sin + dy * cos + center;
|
||||
}
|
||||
|
||||
public static Vector2 operator*(Matrix2x3 m, Vector2 v)
|
||||
{
|
||||
return new Vector2(
|
||||
(m.m00 * v.x) + (m.m01 * v.y) + m.m02,
|
||||
(m.m10 * v.x) + (m.m11 * v.y) + m.m12
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// HSV Modifier.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIHsvModifier : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-HSV";
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[Header("Target")]
|
||||
[SerializeField] [ColorUsage(false)] Color m_TargetColor = Color.red;
|
||||
[SerializeField] [Range(0, 1)] float m_Range = 0.1f;
|
||||
[Header("Adjustment")]
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Hue;
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Saturation;
|
||||
[SerializeField] [Range(-0.5f, 0.5f)] float m_Value;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Target color to affect hsv shift.
|
||||
/// </summary>
|
||||
public Color targetColor
|
||||
{
|
||||
get { return m_TargetColor; }
|
||||
set
|
||||
{
|
||||
if (m_TargetColor != value)
|
||||
{
|
||||
m_TargetColor = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Color range to affect hsv shift [0 ~ 1].
|
||||
/// </summary>
|
||||
public float range
|
||||
{
|
||||
get { return m_Range; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Range, value))
|
||||
{
|
||||
m_Range = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saturation shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float saturation
|
||||
{
|
||||
get { return m_Saturation; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Saturation, value))
|
||||
{
|
||||
m_Saturation = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Value shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float value
|
||||
{
|
||||
get { return m_Value; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Value, value))
|
||||
{
|
||||
m_Value = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hue shift [-0.5 ~ 0.5].
|
||||
/// </summary>
|
||||
public float hue
|
||||
{
|
||||
get { return m_Hue; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, -0.5f, 0.5f);
|
||||
if (!Mathf.Approximately(m_Hue, value))
|
||||
{
|
||||
m_Hue = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName));
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
return;
|
||||
|
||||
vh.GetUIVertexStream(tempVerts);
|
||||
vh.Clear();
|
||||
|
||||
float h,s,v;
|
||||
Color.RGBToHSV(m_TargetColor, out h, out s, out v);
|
||||
|
||||
// Pack some effect factors to 1 float.
|
||||
Vector2 factor = new Vector2(
|
||||
Packer.ToFloat(h, s, v, m_Range),
|
||||
Packer.ToFloat(m_Hue + 0.5f, m_Saturation + 0.5f, m_Value + 0.5f)
|
||||
);
|
||||
|
||||
for (int i = 0; i < tempVerts.Count; i++)
|
||||
{
|
||||
UIVertex vt = tempVerts[i];
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
}
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
}
|
||||
}
|
||||
@@ -1,228 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(Graphic))]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIShadow : Shadow
|
||||
{
|
||||
/// <summary>
|
||||
/// Additional shadow.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class AdditionalShadow
|
||||
{
|
||||
/// <summary>
|
||||
/// How far is the blurring shadow from the graphic.
|
||||
/// </summary>
|
||||
[Range(0, 1)] public float blur = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle style = ShadowStyle.Shadow;
|
||||
|
||||
/// <summary>
|
||||
/// Color for the shadow effect.
|
||||
/// </summary>
|
||||
public Color effectColor = Color.black;
|
||||
|
||||
/// <summary>
|
||||
/// How far is the shadow from the graphic.
|
||||
/// </summary>
|
||||
public Vector2 effectDistance = new Vector2(1f, -1f);
|
||||
|
||||
/// <summary>
|
||||
/// Should the shadow inherit the alpha from the graphic?
|
||||
/// </summary>
|
||||
public bool useGraphicAlpha = true;
|
||||
}
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField][Range(0, 1)] float m_Blur = 0.25f;
|
||||
[SerializeField] ShadowStyle m_Style = ShadowStyle.Shadow;
|
||||
[SerializeField] List<AdditionalShadow> m_AdditionalShadows = new List<AdditionalShadow>();
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Graphic affected by the UIEffect.
|
||||
/// </summary>
|
||||
new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// How far is the blurring shadow from the graphic.
|
||||
/// </summary>
|
||||
public float blur { get { return m_Blur; } set { m_Blur = Mathf.Clamp(value, 0, 2); _SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Shadow effect mode.
|
||||
/// </summary>
|
||||
public ShadowStyle style { get { return m_Style; } set { m_Style = value; _SetDirty(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Additional Shadows.
|
||||
/// </summary>
|
||||
public List<AdditionalShadow> additionalShadows { get { return m_AdditionalShadows; } }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled || vh.currentVertCount <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
vh.GetUIVertexStream(s_Verts);
|
||||
|
||||
//================================
|
||||
// Append shadow vertices.
|
||||
//================================
|
||||
{
|
||||
_uiEffect = GetComponent<UIEffect>();
|
||||
var inputVertCount = s_Verts.Count;
|
||||
var start = 0;
|
||||
var end = inputVertCount;
|
||||
var toneLevel = _uiEffect && _uiEffect.isActiveAndEnabled ? _uiEffect.toneLevel : 0;
|
||||
|
||||
// Additional Shadows.
|
||||
for (int i = additionalShadows.Count - 1; 0 <= i; i--)
|
||||
{
|
||||
AdditionalShadow shadow = additionalShadows[i];
|
||||
UpdateFactor(toneLevel, shadow.blur, shadow.effectColor);
|
||||
_ApplyShadow(s_Verts, shadow.effectColor, ref start, ref end, shadow.effectDistance, shadow.style, shadow.useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Shadow.
|
||||
UpdateFactor(toneLevel, blur, effectColor);
|
||||
_ApplyShadow(s_Verts, effectColor, ref start, ref end, effectDistance, style, useGraphicAlpha);
|
||||
}
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(s_Verts);
|
||||
|
||||
s_Verts.Clear();
|
||||
}
|
||||
|
||||
UIEffect _uiEffect;
|
||||
Vector2 _factor;
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
static readonly List<UIVertex> s_Verts = new List<UIVertex>();
|
||||
|
||||
void UpdateFactor(float tone, float blur, Color color)
|
||||
{
|
||||
if (_uiEffect && _uiEffect.isActiveAndEnabled)
|
||||
{
|
||||
_factor = new Vector2(Packer.ToFloat(tone, 0, blur, 0), Packer.ToFloat(color.r, color.g, color.b, 1));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
void _ApplyShadow(List<UIVertex> verts, Color color, ref int start, ref int end, Vector2 effectDistance, ShadowStyle style, bool useGraphicAlpha)
|
||||
{
|
||||
if (style == ShadowStyle.None || color.a <= 0)
|
||||
return;
|
||||
|
||||
// Append Shadow.
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, effectDistance.y, useGraphicAlpha);
|
||||
|
||||
// Append Shadow3.
|
||||
if (ShadowStyle.Shadow3 == style)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, 0, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, effectDistance.y, useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Append Outline.
|
||||
else if (ShadowStyle.Outline == style)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, -effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, -effectDistance.y, useGraphicAlpha);
|
||||
}
|
||||
|
||||
// Append Outline8.
|
||||
else if (ShadowStyle.Outline8 == style)
|
||||
{
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, -effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, -effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, -effectDistance.x, 0, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, -effectDistance.y, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, effectDistance.x, 0, useGraphicAlpha);
|
||||
_ApplyShadowZeroAlloc(s_Verts, color, ref start, ref end, 0, effectDistance.y, useGraphicAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append shadow vertices.
|
||||
/// * It is similar to Shadow component implementation.
|
||||
/// </summary>
|
||||
void _ApplyShadowZeroAlloc(List<UIVertex> verts, Color color, ref int start, ref int end, float x, float y, bool useGraphicAlpha)
|
||||
{
|
||||
// Check list capacity.
|
||||
var neededCapacity = verts.Count + end - start;
|
||||
if (verts.Capacity < neededCapacity)
|
||||
verts.Capacity = neededCapacity;
|
||||
|
||||
// Append shadow vertices to the front of list.
|
||||
// * The original vertex is pushed backward.
|
||||
UIVertex vt;
|
||||
for (int i = start; i < end; ++i)
|
||||
{
|
||||
vt = verts[i];
|
||||
verts.Add(vt);
|
||||
|
||||
Vector3 v = vt.position;
|
||||
vt.position.Set(v.x + x, v.y + y, v.z);
|
||||
|
||||
Color vertColor = color;
|
||||
vertColor.a = useGraphicAlpha ? color.a * vt.color.a / 255 : color.a;
|
||||
vt.color = vertColor;
|
||||
|
||||
// Set UIEffect prameters to vertex.
|
||||
if(_uiEffect)
|
||||
vt.uv1 = _factor;
|
||||
verts[i] = vt;
|
||||
}
|
||||
|
||||
// Update next shadow offset.
|
||||
start = end;
|
||||
end = verts.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the UIEffect as dirty.
|
||||
/// </summary>
|
||||
void _SetDirty()
|
||||
{
|
||||
if(graphic)
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,369 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class UIShiny : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-Shiny";
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] [Range(0, 1)] float m_Location = 0;
|
||||
[SerializeField] [Range(0, 1)] float m_Width = 0.25f;
|
||||
[SerializeField] [Range(-180, 180)] float m_Rotation;
|
||||
[SerializeField][Range(0.01f, 1)] float m_Softness = 1f;
|
||||
[FormerlySerializedAs("m_Alpha")]
|
||||
[SerializeField][Range(0, 1)] float m_Brightness = 1f;
|
||||
[SerializeField][Range(0, 1)] float m_Highlight = 1;
|
||||
[SerializeField] protected EffectArea m_EffectArea;
|
||||
[Header("Play Effect")]
|
||||
[SerializeField] bool m_Play = false;
|
||||
[SerializeField] bool m_Loop = false;
|
||||
[SerializeField][Range(0.1f, 10)] float m_Duration = 1;
|
||||
[SerializeField][Range(0, 10)] float m_LoopDelay = 1;
|
||||
[SerializeField] AnimatorUpdateMode m_UpdateMode = AnimatorUpdateMode.Normal;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
// /// <summary>
|
||||
// /// Graphic affected by the UIEffect.
|
||||
// /// </summary>
|
||||
// new public Graphic graphic { get { return base.graphic; } }
|
||||
|
||||
/// <summary>
|
||||
/// Location for shiny effect.
|
||||
/// </summary>
|
||||
public float location
|
||||
{
|
||||
get { return m_Location; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Location, value))
|
||||
{
|
||||
m_Location = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Width for shiny effect.
|
||||
/// </summary>
|
||||
public float width
|
||||
{
|
||||
get { return m_Width; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Width, value))
|
||||
{
|
||||
m_Width = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Softness for shiny effect.
|
||||
/// </summary>
|
||||
public float softness
|
||||
{
|
||||
get { return m_Softness; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0.01f, 1);
|
||||
if (!Mathf.Approximately(m_Softness, value))
|
||||
{
|
||||
m_Softness = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Alpha for shiny effect.
|
||||
/// </summary>
|
||||
[System.Obsolete("Use brightness instead (UnityUpgradable) -> brightness")]
|
||||
public float alpha
|
||||
{
|
||||
get { return m_Brightness; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Brightness, value))
|
||||
{
|
||||
m_Brightness = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Brightness for shiny effect.
|
||||
/// </summary>
|
||||
public float brightness
|
||||
{
|
||||
get { return m_Brightness; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Brightness, value))
|
||||
{
|
||||
m_Brightness = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Highlight factor for shiny effect.
|
||||
/// </summary>
|
||||
public float highlight
|
||||
{
|
||||
get { return m_Highlight; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_Highlight, value))
|
||||
{
|
||||
m_Highlight = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotation for shiny effect.
|
||||
/// </summary>
|
||||
public float rotation
|
||||
{
|
||||
get { return m_Rotation; }
|
||||
set
|
||||
{
|
||||
if (!Mathf.Approximately(m_Rotation, value))
|
||||
{
|
||||
m_Rotation = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The area for effect.
|
||||
/// </summary>
|
||||
public EffectArea effectArea
|
||||
{
|
||||
get { return m_EffectArea; }
|
||||
set
|
||||
{
|
||||
if (m_EffectArea != value)
|
||||
{
|
||||
m_EffectArea = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play shinning on enable.
|
||||
/// </summary>
|
||||
public bool play { get { return m_Play; } set { m_Play = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Play shinning loop.
|
||||
/// </summary>
|
||||
public bool loop { get { return m_Loop; } set { m_Loop = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Shinning duration.
|
||||
/// </summary>
|
||||
public float duration { get { return m_Duration; } set { m_Duration = Mathf.Max(value, 0.1f); } }
|
||||
|
||||
/// <summary>
|
||||
/// Delay on loop.
|
||||
/// </summary>
|
||||
public float loopDelay { get { return m_LoopDelay; } set { m_LoopDelay = Mathf.Max(value, 0); } }
|
||||
|
||||
/// <summary>
|
||||
/// Shinning update mode.
|
||||
/// </summary>
|
||||
public AnimatorUpdateMode updateMode { get { return m_UpdateMode; } set { m_UpdateMode = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
_time = 0;
|
||||
// graphic.material = effectMaterial;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// This function is called when the behaviour becomes disabled () or inactive.
|
||||
// /// </summary>
|
||||
// protected override void OnDisable()
|
||||
// {
|
||||
// graphic.material = null;
|
||||
// base.OnDisable();
|
||||
// }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName));
|
||||
}
|
||||
|
||||
// public void OnBeforeSerialize()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public void OnAfterDeserialize()
|
||||
// {
|
||||
// var obj = this;
|
||||
// EditorApplication.delayCall += () =>
|
||||
// {
|
||||
// if (Application.isPlaying || !obj)
|
||||
// return;
|
||||
//
|
||||
// var mat = GetMaterial(shaderName);
|
||||
// if (m_EffectMaterial == mat && graphic.material == mat)
|
||||
// return;
|
||||
//
|
||||
// graphic.material = m_EffectMaterial = mat;
|
||||
// EditorUtility.SetDirty(this);
|
||||
// EditorUtility.SetDirty(graphic);
|
||||
// EditorApplication.delayCall += AssetDatabase.SaveAssets;
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// public static Material GetMaterial(string shaderName)
|
||||
// {
|
||||
// string name = Path.GetFileName(shaderName);
|
||||
// return AssetDatabase.FindAssets("t:Material " + name)
|
||||
// .Select(x => AssetDatabase.GUIDToAssetPath(x))
|
||||
// .SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
|
||||
// .OfType<Material>()
|
||||
// .FirstOrDefault(x => x.name == name);
|
||||
// }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
return;
|
||||
|
||||
// rect.
|
||||
Rect rect = m_EffectArea.GetEffectArea(vh, graphic);
|
||||
|
||||
// rotation.
|
||||
float rad = rotation * Mathf.Deg2Rad;
|
||||
Vector2 dir = new Vector2(Mathf.Cos(rad), Mathf.Sin(rad));
|
||||
dir.x *= rect.height / rect.width;
|
||||
dir = dir.normalized;
|
||||
|
||||
// Calculate vertex position.
|
||||
bool effectEachCharacter = graphic is Text && m_EffectArea == EffectArea.Character;
|
||||
|
||||
UIVertex vertex = default(UIVertex);
|
||||
Vector2 nomalizedPos;
|
||||
Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix.
|
||||
for (int i = 0; i < vh.currentVertCount; i++)
|
||||
{
|
||||
vh.PopulateUIVertex(ref vertex, i);
|
||||
|
||||
// Normalize vertex position by local matrix.
|
||||
nomalizedPos = localMatrix * vertex.position;
|
||||
|
||||
// Normalize vertex position by local matrix.
|
||||
if (effectEachCharacter)
|
||||
{
|
||||
// Each characters.
|
||||
nomalizedPos = localMatrix * splitedCharacterPosition[i % 4];
|
||||
}
|
||||
else
|
||||
{
|
||||
nomalizedPos = localMatrix * vertex.position;
|
||||
}
|
||||
|
||||
vertex.uv1 = new Vector2(
|
||||
Packer.ToFloat(Mathf.Clamp01(nomalizedPos.y), softness, width, brightness),
|
||||
Packer.ToFloat(location, highlight)
|
||||
);
|
||||
|
||||
vh.SetUIVertex(vertex, i);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play effect.
|
||||
/// </summary>
|
||||
public void Play()
|
||||
{
|
||||
_time = 0;
|
||||
m_Play = true;
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Private Members.
|
||||
//################################
|
||||
float _time = 0;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (!m_Play || !Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_time += m_UpdateMode == AnimatorUpdateMode.UnscaledTime
|
||||
? Time.unscaledDeltaTime
|
||||
: Time.deltaTime;
|
||||
location = _time / m_Duration;
|
||||
|
||||
if (m_Duration <= _time)
|
||||
{
|
||||
m_Play = m_Loop;
|
||||
_time = m_Loop ? -m_LoopDelay : 0;
|
||||
}
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// Mark the UIEffect as dirty.
|
||||
// /// </summary>
|
||||
// void _SetDirty()
|
||||
// {
|
||||
// if (graphic)
|
||||
// graphic.SetVerticesDirty();
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Transition effect.
|
||||
/// </summary>
|
||||
public class UITransitionEffect : UIEffectBase
|
||||
{
|
||||
//################################
|
||||
// Constant or Static Members.
|
||||
//################################
|
||||
public const string shaderName = "UI/Hidden/UI-Effect-Transition";
|
||||
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public enum EffectMode
|
||||
{
|
||||
None = 0,
|
||||
Mono = 1,
|
||||
Cutoff = 2,
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// Serialize Members.
|
||||
//################################
|
||||
[SerializeField] EffectMode m_EffectMode;
|
||||
[SerializeField][Range(0, 1)] float m_EffectFactor = 1;
|
||||
|
||||
|
||||
//################################
|
||||
// Public Members.
|
||||
//################################
|
||||
/// <summary>
|
||||
/// Effect factor between 0(no effect) and 1(complete effect).
|
||||
/// </summary>
|
||||
public float effectFactor
|
||||
{
|
||||
get { return m_EffectFactor; }
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0, 1);
|
||||
if (!Mathf.Approximately(m_EffectFactor, value))
|
||||
{
|
||||
m_EffectFactor = value;
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
/// </summary>
|
||||
public EffectMode effectMode { get { return m_EffectMode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Modifies the mesh.
|
||||
/// </summary>
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (!isActiveAndEnabled || m_EffectMode == EffectMode.None)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UIVertex vt;
|
||||
vh.GetUIVertexStream(tempVerts);
|
||||
|
||||
// Pack effect prameters.
|
||||
Vector2 factor = new Vector2(effectFactor, 0);
|
||||
|
||||
// Set prameters to vertex.
|
||||
for (int i = 0; i < tempVerts.Count; i++)
|
||||
{
|
||||
vt = tempVerts[i];
|
||||
vt.uv1 = factor;
|
||||
tempVerts[i] = vt;
|
||||
}
|
||||
|
||||
vh.Clear();
|
||||
vh.AddUIVertexTriangleStream(tempVerts);
|
||||
|
||||
tempVerts.Clear();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the material.
|
||||
/// </summary>
|
||||
/// <returns>The material.</returns>
|
||||
protected override Material GetMaterial()
|
||||
{
|
||||
return m_EffectMode != EffectMode.None
|
||||
? MaterialResolver.GetOrGenerateMaterialVariant(Shader.Find(shaderName), m_EffectMode)
|
||||
: null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
Shader "UI/Hidden/UI-Effect-Dissolve"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
[Header(Dissolve)]
|
||||
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
float2 uv1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
fixed4 effectFactor : TEXCOORD2;
|
||||
fixed4 effectFactor2 : TEXCOORD3;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _NoiseTex;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = IN.vertex;
|
||||
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
|
||||
//xy: Noize uv, z: Dissolve factor, w: width
|
||||
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
|
||||
|
||||
//xyz: color, w: softness
|
||||
OUT.effectFactor2 = UnpackToVec4(IN.uv1.y);
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
float cutout = tex2D(_NoiseTex, IN.effectFactor.xy).a;
|
||||
float location = IN.effectFactor.z;
|
||||
float width = IN.effectFactor.w/4;
|
||||
float factor = cutout - location * ( 1 + width ) + width;
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (min(color.a - 0.01, factor));
|
||||
#endif
|
||||
|
||||
fixed edgeLerp = step(factor, color.a) * saturate((width - factor)*16/ IN.effectFactor2.w);
|
||||
color = ApplyColorEffect(color, fixed4(IN.effectFactor2.rgb, edgeLerp));
|
||||
color.a *= saturate((factor)*32/ IN.effectFactor2.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1b48dc831eb147e9886c049033213bf
|
||||
timeCreated: 1523859834
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,141 +0,0 @@
|
||||
Shader "UI/Hidden/UI-Effect-HSV"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
float2 uv1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 wpos : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
half4 range : TEXCOORD2;
|
||||
half3 hsv : TEXCOORD3;
|
||||
};
|
||||
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.wpos = IN.vertex;
|
||||
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
OUT.texcoord = IN.texcoord;
|
||||
OUT.color = IN.color;
|
||||
|
||||
OUT.range = UnpackToVec4(IN.uv1.x);
|
||||
OUT.hsv = UnpackToVec3(IN.uv1.y) - 0.5f;
|
||||
OUT.hsv.yz *= 2;
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half3 rgb2hsv(half3 c) {
|
||||
half4 K = half4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
half4 p = lerp(half4(c.bg, K.wz), half4(c.gb, K.xy), step(c.b, c.g));
|
||||
half4 q = lerp(half4(p.xyw, c.r), half4(c.r, p.yzx), step(p.x, c.r));
|
||||
|
||||
half d = q.x - min(q.w, q.y);
|
||||
half e = 1.0e-10;
|
||||
return half3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
||||
}
|
||||
|
||||
half3 hsv2rgb(half3 c) {
|
||||
c = half3(c.x, clamp(c.yz, 0.0, 1.0));
|
||||
half4 K = half4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
half3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * lerp(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : COLOR
|
||||
{
|
||||
half4 color = tex2D(_MainTex, IN.texcoord);// + _TextureSampleAdd) * IN.color;
|
||||
|
||||
color.a *= UnityGet2DClipping(IN.wpos.xy, _ClipRect);
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
half3 hsv = rgb2hsv(color.rgb);
|
||||
half3 range = abs(hsv - IN.range.xyz);
|
||||
half diff = max(max(min(1-range.x, range.x), min(1-range.y, range.y)/10), min(1-range.z, range.z)/10);
|
||||
|
||||
fixed masked = step(diff, IN.range.w);
|
||||
color.rgb = hsv2rgb(hsv + IN.hsv.xyz * masked);
|
||||
|
||||
return (color + _TextureSampleAdd) * IN.color;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
Shader "UI/Hidden/UI-Effect-Shiny"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
float2 uv1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
half4 effectFactor : TEXCOORD2;
|
||||
half2 effectFactor2 : TEXCOORD3;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
|
||||
fixed4 UnpackToVec4(float value)
|
||||
{
|
||||
const int PACKER_STEP = 64;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed4 color;
|
||||
|
||||
color.r = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.g = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.b = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.a = (value % PACKER_STEP) / PRECISION;
|
||||
return color;
|
||||
}
|
||||
|
||||
half2 UnpackToVec2(float value)
|
||||
{
|
||||
const int PACKER_STEP = 4096;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed4 color;
|
||||
|
||||
color.x = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
color.y = (value % PACKER_STEP) / PRECISION;
|
||||
return color;
|
||||
}
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = IN.vertex;
|
||||
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
|
||||
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
|
||||
OUT.effectFactor2 = UnpackToVec2(IN.uv1.y);
|
||||
|
||||
OUT.effectFactor2.x = OUT.effectFactor2.x * 2 - 0.5;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd);
|
||||
fixed4 originAlpha = color.a;
|
||||
color *= IN.color;
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
half pos = IN.effectFactor.x - IN.effectFactor2.x;
|
||||
|
||||
half normalized = 1 - saturate(abs(pos / IN.effectFactor.z));
|
||||
half shinePower = smoothstep(0, IN.effectFactor.y*2, normalized);
|
||||
half3 reflectColor = lerp(1, color.rgb * 10, IN.effectFactor2.y);
|
||||
|
||||
color.rgb += originAlpha * (shinePower / 2) * IN.effectFactor.w * reflectColor;
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
#ifndef UI_EFFECT_INCLUDED
|
||||
#define UI_EFFECT_INCLUDED
|
||||
|
||||
#if GRAYSCALE | SEPIA | NEGA | PIXEL | MONO | CUTOFF | HUE
|
||||
#define UI_TONE
|
||||
#endif
|
||||
|
||||
#if ADD | SUBTRACT | FILL
|
||||
#define UI_COLOR
|
||||
#endif
|
||||
|
||||
#if FASTBLUR | MEDIUMBLUR | DETAILBLUR
|
||||
#define UI_BLUR
|
||||
#endif
|
||||
|
||||
// Unpack float to low-precision [0-1] fixed4.
|
||||
fixed4 UnpackToVec4(float value)
|
||||
{
|
||||
const int PACKER_STEP = 64;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed4 unpacked;
|
||||
|
||||
unpacked.x = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
unpacked.y = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
unpacked.z = (value % PACKER_STEP) / PRECISION;
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
unpacked.w = (value % PACKER_STEP) / PRECISION;
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
// Unpack float to low-precision [0-1] fixed3.
|
||||
fixed3 UnpackToVec3(float value)
|
||||
{
|
||||
const int PACKER_STEP = 256;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
fixed3 unpacked;
|
||||
|
||||
unpacked.x = (value % (PACKER_STEP)) / (PACKER_STEP - 1);
|
||||
value = floor(value / (PACKER_STEP));
|
||||
|
||||
unpacked.y = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
value = floor(value / PACKER_STEP);
|
||||
|
||||
unpacked.z = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
// Unpack float to low-precision [0-1] half2.
|
||||
half2 UnpackToVec2(float value)
|
||||
{
|
||||
const int PACKER_STEP = 4096;
|
||||
const int PRECISION = PACKER_STEP - 1;
|
||||
half2 unpacked;
|
||||
|
||||
unpacked.x = (value % (PACKER_STEP)) / (PACKER_STEP - 1);
|
||||
value = floor(value / (PACKER_STEP));
|
||||
|
||||
unpacked.y = (value % PACKER_STEP) / (PACKER_STEP - 1);
|
||||
return unpacked;
|
||||
}
|
||||
|
||||
|
||||
// Sample texture with blurring.
|
||||
// * Fast: Sample texture with 3x3 kernel.
|
||||
// * Medium: Sample texture with 5x5 kernel.
|
||||
// * Detail: Sample texture with 7x7 kernel.
|
||||
fixed4 Tex2DBlurring (sampler2D tex, half2 uv, half2 blur)
|
||||
{
|
||||
#if FASTBLUR
|
||||
const int KERNEL_SIZE = 3;
|
||||
#elif MEDIUMBLUR
|
||||
const int KERNEL_SIZE = 5;
|
||||
#elif DETAILBLUR
|
||||
const int KERNEL_SIZE = 7;
|
||||
#else
|
||||
const int KERNEL_SIZE = 1;
|
||||
#endif
|
||||
float4 o = 0;
|
||||
float sum = 0;
|
||||
float weight;
|
||||
half2 texcood;
|
||||
for(int x = -KERNEL_SIZE/2; x <= KERNEL_SIZE/2; x++)
|
||||
{
|
||||
for(int y = -KERNEL_SIZE/2; y <= KERNEL_SIZE/2; y++)
|
||||
{
|
||||
texcood = uv;
|
||||
texcood.x += blur.x * x;
|
||||
texcood.y += blur.y * y;
|
||||
weight = 1.0/(abs(x)+abs(y)+2);
|
||||
o += tex2D(tex, texcood)*weight;
|
||||
sum += weight;
|
||||
}
|
||||
}
|
||||
return o / sum;
|
||||
}
|
||||
|
||||
// Sample texture with blurring.
|
||||
// * Fast: Sample texture with 3x1 kernel.
|
||||
// * Medium: Sample texture with 5x1 kernel.
|
||||
// * Detail: Sample texture with 7x1 kernel.
|
||||
fixed4 Tex2DBlurring1D (sampler2D tex, half2 uv, half2 blur)
|
||||
{
|
||||
#if FASTBLUR
|
||||
const int KERNEL_SIZE = 3;
|
||||
#elif MEDIUMBLUR
|
||||
const int KERNEL_SIZE = 5;
|
||||
#elif DETAILBLUR
|
||||
const int KERNEL_SIZE = 7;
|
||||
#else
|
||||
const int KERNEL_SIZE = 1;
|
||||
#endif
|
||||
float4 o = 0;
|
||||
float sum = 0;
|
||||
float weight;
|
||||
half2 texcood;
|
||||
for(int i = -KERNEL_SIZE/2; i <= KERNEL_SIZE/2; i++)
|
||||
{
|
||||
texcood = uv;
|
||||
texcood.x += blur.x * i;
|
||||
texcood.y += blur.y * i;
|
||||
weight = 1.0/(abs(i)+2);
|
||||
o += tex2D(tex, texcood)*weight;
|
||||
sum += weight;
|
||||
}
|
||||
return o / sum;
|
||||
}
|
||||
|
||||
fixed3 shift_hue(fixed3 RGB, half VSU, half VSW)
|
||||
{
|
||||
fixed3 result;
|
||||
result.x = (0.299 + 0.701*VSU + 0.168*VSW)*RGB.x
|
||||
+ (0.587 - 0.587*VSU + 0.330*VSW)*RGB.y
|
||||
+ (0.114 - 0.114*VSU - 0.497*VSW)*RGB.z;
|
||||
|
||||
result.y = (0.299 - 0.299*VSU - 0.328*VSW)*RGB.x
|
||||
+ (0.587 + 0.413*VSU + 0.035*VSW)*RGB.y
|
||||
+ (0.114 - 0.114*VSU + 0.292*VSW)*RGB.z;
|
||||
|
||||
result.z = (0.299 - 0.3*VSU + 1.25*VSW)*RGB.x
|
||||
+ (0.587 - 0.588*VSU - 1.05*VSW)*RGB.y
|
||||
+ (0.114 + 0.886*VSU - 0.203*VSW)*RGB.z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Apply tone effect.
|
||||
fixed4 ApplyToneEffect(fixed4 color, fixed factor)
|
||||
{
|
||||
#ifdef GRAYSCALE
|
||||
color.rgb = lerp(color.rgb, Luminance(color.rgb), factor);
|
||||
|
||||
#elif SEPIA
|
||||
color.rgb = lerp(color.rgb, Luminance(color.rgb) * half3(1.07, 0.74, 0.43), factor);
|
||||
|
||||
#elif NEGA
|
||||
color.rgb = lerp(color.rgb, 1 - color.rgb, factor);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
// Apply color effect.
|
||||
half4 ApplyColorEffect(half4 color, half4 factor)
|
||||
{
|
||||
#ifdef FILL
|
||||
color.rgb = lerp(color.rgb, factor.rgb, factor.a);
|
||||
|
||||
#elif ADD
|
||||
color.rgb += factor.rgb * factor.a;
|
||||
|
||||
#elif SUBTRACT
|
||||
color.rgb -= factor.rgb * factor.a;
|
||||
|
||||
#else
|
||||
color.rgb = lerp(color.rgb, color.rgb * factor.rgb, factor.a);
|
||||
#endif
|
||||
|
||||
#if CUTOFF
|
||||
color.a = factor.a;
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
#endif // UI_EFFECT_INCLUDED
|
||||
@@ -1,173 +0,0 @@
|
||||
Shader "UI/Hidden/UI-Effect"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#if !defined(SHADER_API_D3D11_9X) && !defined(SHADER_API_D3D9)
|
||||
#pragma target 2.0
|
||||
#else
|
||||
#pragma target 3.0
|
||||
#endif
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL MONO CUTOFF HUE
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
float2 uv1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
fixed4 colorFactor : COLOR1;
|
||||
#endif
|
||||
|
||||
#if defined (UI_TONE) || defined (UI_BLUR)
|
||||
half4 effectFactor : TEXCOORD2;
|
||||
#endif
|
||||
#if HUE || PIXEL
|
||||
half2 extraFactor : TEXCOORD3;
|
||||
#endif
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = IN.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
|
||||
#if defined (UI_TONE) || defined (UI_BLUR)
|
||||
OUT.effectFactor = UnpackToVec4(IN.uv1.x);
|
||||
#endif
|
||||
|
||||
#if HUE
|
||||
OUT.extraFactor.x = cos(OUT.effectFactor.x*3.14159265359 * 2);
|
||||
OUT.extraFactor.y = sin(OUT.effectFactor.x*3.14159265359 * 2);
|
||||
#elif PIXEL
|
||||
OUT.extraFactor.xy = max(2, (1-OUT.effectFactor.x*0.98) * _MainTex_TexelSize.zw);
|
||||
#endif
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
OUT.colorFactor = UnpackToVec4(IN.uv1.y);
|
||||
#endif
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
#if PIXEL
|
||||
IN.texcoord = round(IN.texcoord * IN.extraFactor.xy) / IN.extraFactor.xy;
|
||||
#endif
|
||||
|
||||
#if defined (UI_BLUR)
|
||||
half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, IN.effectFactor.z * _MainTex_TexelSize.xy * 2) + _TextureSampleAdd) * IN.color;
|
||||
#else
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
#endif
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
#ifdef CUTOFF
|
||||
clip (color.a - 1 + IN.effectFactor.x * 1.001);
|
||||
#elif UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
#if MONO
|
||||
color.rgb = IN.color.rgb;
|
||||
color.a = color.a * tex2D(_MainTex, IN.texcoord).a + IN.effectFactor.x * 2 - 1;
|
||||
#elif HUE
|
||||
color.rgb = shift_hue(color.rgb, IN.extraFactor.x, IN.extraFactor.y);
|
||||
#elif defined (UI_TONE) & !CUTOFF
|
||||
color = ApplyToneEffect(color, IN.effectFactor.x);
|
||||
#endif
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
color = ApplyColorEffect(color, IN.colorFactor) * IN.color;
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b868e81d0156245e08c8646b4fb68d7a
|
||||
timeCreated: 1482973535
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,102 +0,0 @@
|
||||
Shader "UI/Hidden/UI-EffectCapture"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex("Main Texture", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
ZTest Always
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Fog{ Mode off }
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Effect-Base"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL
|
||||
#pragma shader_feature __ ADD SUBTRACT FILL
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
half4 _EffectFactor;
|
||||
fixed4 _ColorFactor;
|
||||
|
||||
v2f_img vert(appdata_img v)
|
||||
{
|
||||
v2f_img o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.texcoord;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
o.uv.y = 1 - o.uv.y;
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f_img IN) : SV_Target
|
||||
{
|
||||
half effectFactor = _EffectFactor.x;
|
||||
half blurFactor = _EffectFactor.z;
|
||||
fixed4 colorFactor = _ColorFactor;
|
||||
|
||||
#if PIXEL
|
||||
half2 pixelScale = max(2, (1 - effectFactor) * _MainTex_TexelSize.zw);
|
||||
IN.uv = round(IN.uv * pixelScale) / pixelScale;
|
||||
#endif
|
||||
|
||||
half4 color = tex2D(_MainTex, IN.uv);
|
||||
|
||||
#if defined (UI_TONE)
|
||||
color = ApplyToneEffect(color, effectFactor);
|
||||
#endif
|
||||
|
||||
#if defined (UI_COLOR)
|
||||
color = ApplyColorEffect(color, colorFactor);
|
||||
#endif
|
||||
|
||||
color.a = 1;
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Effect-Blur"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_img
|
||||
#pragma fragment frag_blur
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UI-Effect.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
half4 _EffectFactor;
|
||||
|
||||
fixed4 frag_blur(v2f_img IN) : SV_Target
|
||||
{
|
||||
half2 blurFactor = _EffectFactor.xy;
|
||||
half4 color = Tex2DBlurring1D(_MainTex, IN.uv, blurFactor * _MainTex_TexelSize.xy * 2);
|
||||
color.a = 1;
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a6f925a07c3c5846a1c782eaaeb7087
|
||||
timeCreated: 1482973535
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96837540e9d9b4d199c332f11ef9047a
|
||||
guid: f8316adc5942148aaa478bb0bd261b07
|
||||
folderAsset: yes
|
||||
timeCreated: 1487124681
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42d285bbcecf44e2fa5d34c5ce89d6ab
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
// using Coffee.UISoftMask;
|
||||
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
public class AllocTest : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject m_Target;
|
||||
[SerializeField] private bool m_SwitchActivation;
|
||||
[SerializeField] private bool m_SetDirty;
|
||||
[SerializeField] private bool m_DoTransform;
|
||||
[SerializeField] private bool m_Translate;
|
||||
[SerializeField] private bool m_Rotate;
|
||||
[SerializeField] private bool m_Scale;
|
||||
|
||||
private UIEffect[] _targets;
|
||||
|
||||
public bool switchActivation
|
||||
{
|
||||
get => m_SwitchActivation;
|
||||
set => m_SwitchActivation = value;
|
||||
}
|
||||
|
||||
public bool setDirty
|
||||
{
|
||||
get => m_SetDirty;
|
||||
set => m_SetDirty = value;
|
||||
}
|
||||
|
||||
public bool doTransform
|
||||
{
|
||||
get => m_DoTransform;
|
||||
set => m_DoTransform = value;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_targets = m_Target.GetComponentsInChildren<UIEffect>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (m_SwitchActivation)
|
||||
{
|
||||
foreach (var r in _targets)
|
||||
{
|
||||
r.enabled = true;
|
||||
}
|
||||
|
||||
m_Target.SetActive(!m_Target.activeSelf);
|
||||
}
|
||||
else if (m_SetDirty)
|
||||
{
|
||||
foreach (var r in _targets)
|
||||
{
|
||||
r.enabled = !r.enabled;
|
||||
}
|
||||
|
||||
if (!m_Target.activeSelf)
|
||||
{
|
||||
m_Target.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_DoTransform)
|
||||
{
|
||||
var v = (Mathf.PingPong(Time.timeSinceLevelLoad, 4) - 2) / 2 * Time.deltaTime;
|
||||
if (m_Translate)
|
||||
{
|
||||
m_Target.transform.Translate(v * 100f * Vector3.one);
|
||||
}
|
||||
|
||||
if (m_Rotate)
|
||||
{
|
||||
m_Target.transform.Rotate(v * 100f * Vector3.one);
|
||||
}
|
||||
|
||||
if (m_Scale)
|
||||
{
|
||||
m_Target.transform.localScale = v * 1f * Vector3.one + Vector3.one;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4970b3a69d3b472b8d66c1d92ec7bad
|
||||
timeCreated: 1527590285
|
||||
licenseType: Pro
|
||||
guid: f46f4f67d83c64958b638495664707ec
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
File diff suppressed because it is too large
Load Diff
+2
-3
@@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67e572a00c48842ae88b291d09d41b72
|
||||
timeCreated: 1527674400
|
||||
licenseType: Pro
|
||||
guid: 2181aaf36bc664251918e4afcc037e27
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97c7740b360fd49ea9da163b5b877c8e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,838 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311924, g: 0.38073963, b: 0.3587269, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &134336676
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 134336679}
|
||||
- component: {fileID: 134336678}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &134336678
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 134336676}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &134336679
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 134336676}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &973375176
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 973375179}
|
||||
- component: {fileID: 973375178}
|
||||
- component: {fileID: 973375177}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &973375177
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &973375178
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &973375179
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 973375176}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &986199151
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 986199155}
|
||||
- component: {fileID: 986199152}
|
||||
- component: {fileID: 986199154}
|
||||
- component: {fileID: 986199153}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!223 &986199152
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 134336678}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 27
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &986199153
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &986199154
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!224 &986199155
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 986199151}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1567169362}
|
||||
- {fileID: 1421004027}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1421004026
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1421004027}
|
||||
- component: {fileID: 1421004030}
|
||||
- component: {fileID: 1421004029}
|
||||
- component: {fileID: 1421004028}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1421004027
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 415.4, y: 111.41}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1421004028
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 0.875
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 0.213
|
||||
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.622
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 8
|
||||
m_TransitionRate: 0
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 2800000, guid: 40d1a96251dfd4353a7d28680e56c2e7, type: 3}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionRotation: 45
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.85
|
||||
m_TransitionSoftness: 0.475
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 1
|
||||
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0.5
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1421004029
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 4 Color Gradation
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: bc6ef582a0efa420683ff976adff235a, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: cab5405a1d5e24ca7858d78bc295cc25, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 81.94
|
||||
m_fontSizeBase: 81.94
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 100
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &1421004030
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1421004026}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1567169361
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1567169362}
|
||||
- component: {fileID: 1567169365}
|
||||
- component: {fileID: 1567169364}
|
||||
- component: {fileID: 1567169363}
|
||||
- component: {fileID: 1567169366}
|
||||
m_Layer: 5
|
||||
m_Name: Gradation
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1567169362
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1567169363
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1.4142135, g: 1.4142135, b: 1.4142135, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 0}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 11
|
||||
m_GradationColor1: {r: 0.514151, g: 1, b: 0.9449037, a: 1}
|
||||
m_GradationColor2: {r: 0.8476167, g: 1, b: 0.5330188, a: 1}
|
||||
m_GradationColor3: {r: 0.6840595, g: 0.5801887, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 0.63528705, b: 0.6273585, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 0, b: 0, a: 1}
|
||||
key1: {r: 1, g: 0.8571428, b: 0, a: 1}
|
||||
key2: {r: 0.2857144, g: 1, b: 0, a: 0}
|
||||
key3: {r: 0, g: 1, b: 0.57142854, a: 0}
|
||||
key4: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key5: {r: 0.28571415, g: 0, b: 1, a: 0}
|
||||
key6: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key7: {r: 1, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 9830
|
||||
ctime2: 18724
|
||||
ctime3: 28720
|
||||
ctime4: 38165
|
||||
ctime5: 46838
|
||||
ctime6: 56173
|
||||
ctime7: 65535
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 8
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
--- !u!114 &1567169364
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1567169365
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1567169366
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1567169361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90ac5d06c7b714c29a6b7b3b80e443a7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_CullingMask: 32
|
||||
m_Direction: 0
|
||||
m_Curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.44500732
|
||||
inSlope: 0
|
||||
outSlope: 0.21999359
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.6650009
|
||||
inSlope: 0.21999359
|
||||
outSlope: 1
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_Delay: 0
|
||||
m_Duration: 3
|
||||
m_Interval: 0
|
||||
m_PlayOnEnable: 1
|
||||
m_ResetTimeOnEnable: 1
|
||||
m_WrapMode: 3
|
||||
m_UpdateMode: 0
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9fda278a556f4bd6bf27213319aaf06
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
public class GradationTest : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
|
||||
[SerializeField] private Gradient m_Gradient;
|
||||
|
||||
public void SetGradation()
|
||||
{
|
||||
m_Target.SetGradientKeys(m_Gradient.colorKeys, m_Gradient.alphaKeys, m_Gradient.mode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c663eb03b2fb4828bc3ade4aff915c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54b78b8690dfe482aaaad53253d23214
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ae3860791588403abca27f6697b2824
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Cloner : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Text m_Counter;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject m_Origin;
|
||||
|
||||
[SerializeField]
|
||||
private Transform m_Parent;
|
||||
|
||||
private readonly List<GameObject> _instances = new List<GameObject>();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
m_Origin.SetActive(false);
|
||||
m_Counter.text = _instances.Count.ToString();
|
||||
}
|
||||
|
||||
public void Clone(int num)
|
||||
{
|
||||
for (var i = 0; i < num; i++)
|
||||
{
|
||||
var go = Instantiate(m_Origin, m_Parent);
|
||||
var t = go.transform as RectTransform;
|
||||
t.anchorMax = t.anchorMin = new Vector2(UnityEngine.Random.value, UnityEngine.Random.value);
|
||||
t.anchoredPosition3D = Vector3.zero;
|
||||
go.SetActive(true);
|
||||
_instances.Add(go);
|
||||
}
|
||||
|
||||
m_Counter.text = _instances.Count.ToString();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
foreach (var go in _instances)
|
||||
{
|
||||
Destroy(go);
|
||||
}
|
||||
|
||||
_instances.Clear();
|
||||
m_Counter.text = _instances.Count.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52449d0645f90440f9ad36b0a0ce5936
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a7d90cc463ac409fa50ecb46480ebc6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 814d44b83d5054e31b0ae65d48136166
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2a4c1061dec2448abe5ae1b412140af
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d11887dcfdae4a4faf731ca7777dd28
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5e4d71f64e124295a7ebf4cbbae4a10
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,108 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SDF - Mobile
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3cb99c58283f294a9e51c0c30046b18
|
||||
timeCreated: 1515075779
|
||||
licenseType: Free
|
||||
guid: 1f0416a8fecb64e86b4d6c301e638f2d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,109 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CarterOne-Regular SDF - Outline
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ValidKeywords:
|
||||
- OUTLINE_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.25
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.365625
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 1
|
||||
- _UnderlayOffsetX: 1
|
||||
- _UnderlayOffsetY: -1
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user