You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-15 20:50:08 +00:00
Compare commits
5 Commits
asset_upda
...
3.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6394eee4de | ||
|
|
1f1fb2a62a | ||
|
|
640cee9e34 | ||
|
|
9dedbfb48f | ||
|
|
3849a9f697 |
208
.editorconfig
208
.editorconfig
@@ -1,208 +0,0 @@
|
|||||||
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_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
|
|
||||||
|
|
||||||
# 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:none
|
|
||||||
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 = do_not_ignore
|
|
||||||
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
|
|
||||||
@@ -26,9 +26,9 @@ A clear and concise description of what you expected to happen.
|
|||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**Environment (please complete the following information):**
|
**Environment (please complete the following information):**
|
||||||
- Version [e.g. 4.0.0]
|
- Version [e.g. 1.0.0]
|
||||||
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
|
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
|
||||||
- Unity version: [e.g. 2022.3.0f1]
|
- Unity version: [e.g. 2018.2.8f1]
|
||||||
- Build options: [e.g. IL2CPP, .Net 4.x, LWRP]
|
- Build options: [e.g. IL2CPP, .Net 4.x, LWRP]
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
72
.github/workflows/release.yml
vendored
72
.github/workflows/release.yml
vendored
@@ -1,86 +1,24 @@
|
|||||||
name: 🔖 Release
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- preview
|
- preview
|
||||||
- release
|
- main
|
||||||
|
- "*.x"
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- "**"
|
- "**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: 🔖 Release (${{ github.ref_name }})
|
|
||||||
runs-on: ubuntu-latest
|
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 }}
|
|
||||||
version: ${{ steps.release.outputs.new_release_version }}
|
|
||||||
notes: ${{ steps.release.outputs.new_release_notes }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Checkout (${{ github.ref_name }})
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 🔖 Run semantic release
|
- uses: cycjimmy/semantic-release-action@v3
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
|
||||||
id: release
|
|
||||||
with:
|
with:
|
||||||
working_directory: Packages/src
|
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
@semantic-release/changelog
|
@semantic-release/changelog
|
||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
- run: |
|
|
||||||
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
|
|
||||||
echo "🔖 New release version: '${{ steps.release.outputs.new_release_version }}'" | 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
|
|
||||||
|
|
||||||
merge-to-develop:
|
|
||||||
if: needs.release.outputs.released == 'true'
|
|
||||||
needs: release
|
|
||||||
name: 🔀 Merge to develop
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: 🚚 Checkout (develop)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: develop
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: 🔀 Merge '${{ needs.release.outputs.tag }}' into 'develop'
|
|
||||||
run: |
|
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
|
|
||||||
git merge ${{ needs.release.outputs.tag }}
|
|
||||||
git push origin develop
|
|
||||||
|
|
||||||
split-to-main:
|
|
||||||
if: needs.release.outputs.released == 'true'
|
|
||||||
needs: release
|
|
||||||
name: 🔀 Split package
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: 🚚 Checkout (${{ needs.release.outputs.tag }})
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ needs.release.outputs.tag }}
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: 🔀 Split subtree 'Packages/src' to 'main'
|
|
||||||
run: |
|
|
||||||
git branch main origin/main
|
|
||||||
git subtree split --prefix=Packages/src --branch main
|
|
||||||
git tag ${{ needs.release.outputs.version }} main
|
|
||||||
git push origin ${{ needs.release.outputs.version }} main:main
|
|
||||||
|
|||||||
134
.github/workflows/test.yml
vendored
134
.github/workflows/test.yml
vendored
@@ -1,71 +1,49 @@
|
|||||||
# Required secrets
|
# Secrets
|
||||||
# UNITY_LICENSE: The contents of Unity license file
|
# UNITY_LICENSE:
|
||||||
# UNITY_EMAIL: Unity user email to login
|
name: test
|
||||||
# UNITY_PASSWORD: Unity user password to login
|
|
||||||
name: 🧪 Test
|
|
||||||
|
|
||||||
env:
|
|
||||||
# MINIMUM_VERSION: The minimum version of Unity.
|
|
||||||
MINIMUM_VERSION: 2019.4
|
|
||||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
|
||||||
EXCLUDE_FILTER: '(2020.2.0)'
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
- develop_v5
|
|
||||||
tags:
|
tags:
|
||||||
- "!*"
|
- "!*"
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
unity-test:
|
||||||
name: ⚙️ Setup
|
|
||||||
runs-on: ubuntu-latest
|
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`
|
|
||||||
# ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
|
|
||||||
ADDITIONAL_VERSIONS=[]
|
|
||||||
|
|
||||||
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
|
|
||||||
env:
|
|
||||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
||||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
||||||
permissions:
|
|
||||||
checks: write
|
|
||||||
contents: read
|
|
||||||
needs: setup
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
matrix:
|
||||||
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
unityVersion: [
|
||||||
steps:
|
"2018.3.14f1",
|
||||||
- name: 🚚 Checkout
|
"2018.4.30f1",
|
||||||
uses: actions/checkout@v4
|
"2019.1.14f1",
|
||||||
|
"2019.2.21f1",
|
||||||
|
"2019.3.15f1",
|
||||||
|
"2019.4.16f1",
|
||||||
|
"2020.1.17f1",
|
||||||
|
"2020.2.1f1",
|
||||||
|
]
|
||||||
|
|
||||||
- name: 📥 Cache library
|
steps:
|
||||||
uses: actions/cache@v4
|
# Checkout sandbox project
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: sandbox
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# Update package submodule
|
||||||
|
- name: "Update package submodule"
|
||||||
|
working-directory: Packages/dev
|
||||||
|
run: git checkout ${{ github.sha }}
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: Library
|
path: Library
|
||||||
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
|
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
|
||||||
@@ -73,22 +51,44 @@ jobs:
|
|||||||
Library-${{ matrix.unityVersion }}-
|
Library-${{ matrix.unityVersion }}-
|
||||||
Library-
|
Library-
|
||||||
|
|
||||||
- name: 🛠️ Build Unity Project
|
# Install codecoverage package
|
||||||
uses: game-ci/unity-builder@v4
|
- name: "Install codecoverage package"
|
||||||
timeout-minutes: 45
|
if: startsWith(matrix.unityVersion, '2019.4.')
|
||||||
with:
|
run: |
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
npx openupm-cli add -f com.unity.testtools.codecoverage@0.4.0-preview
|
||||||
targetPlatform: StandaloneLinux64
|
|
||||||
allowDirtyBuild: true
|
|
||||||
customParameters: -nographics
|
|
||||||
|
|
||||||
- name: 🧪 Run tests
|
# Run tests
|
||||||
uses: game-ci/unity-test-runner@v4
|
- name: "Run tests"
|
||||||
timeout-minutes: 45
|
uses: game-ci/unity-test-runner@main
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
# unityVersion: ${{ matrix.unityVersion }}
|
customParameters: -nographics -enableCodeCoverage -coverageOptions assemblyFilters:+Coffee.UIParticle.*Tests
|
||||||
customParameters: -nographics
|
env:
|
||||||
checkName: ${{ matrix.unityVersion }} Test Results
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
githubToken: ${{ github.token }}
|
|
||||||
coverageOptions: "dontClear;generateHtmlReport;generateBadgeReport;pathFilters:+**/Packages/src/**;assemblyFilters:+<packages>,-*.Editor,-*.Test"
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: TestResults-${{ matrix.unityVersion }}
|
||||||
|
path: |
|
||||||
|
artifacts/*.xml
|
||||||
|
CodeCoverage/**/TestCoverageResults_*.xml
|
||||||
|
|
||||||
|
publish:
|
||||||
|
needs: unity-test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- uses: testspace-com/setup-testspace@v1
|
||||||
|
with:
|
||||||
|
domain: ${{github.repository_owner}}
|
||||||
|
|
||||||
|
- name: Push test results
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
testspace `find . -name '*.xml' | tr '\n' ' '`
|
||||||
30
.gitignore
vendored
30
.gitignore
vendored
@@ -1,30 +0,0 @@
|
|||||||
# Windows
|
|
||||||
Thumbs.db
|
|
||||||
Desktop.ini
|
|
||||||
/*.csproj
|
|
||||||
/*.sln
|
|
||||||
|
|
||||||
# macOS
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Vim
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
# Unity
|
|
||||||
/Logs
|
|
||||||
/Library
|
|
||||||
/Temp
|
|
||||||
Assets/Plugins.meta
|
|
||||||
Assets/JMO Assets.meta
|
|
||||||
Assets/JMO Assets
|
|
||||||
Assets/EffectExamples/
|
|
||||||
Assets/EffectExamples.meta
|
|
||||||
Assets/Plugins/
|
|
||||||
|
|
||||||
# VS
|
|
||||||
.vs/
|
|
||||||
.vscode/
|
|
||||||
.idea/
|
|
||||||
obj/
|
|
||||||
bin/
|
|
||||||
UserSettings/
|
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
{
|
{
|
||||||
"branches": [
|
"branches": [
|
||||||
"release",
|
"+([0-9])?(.{+([0-9]),x}).x",
|
||||||
|
"master",
|
||||||
|
"main",
|
||||||
{
|
{
|
||||||
"name": "preview",
|
"name": "preview",
|
||||||
"prerelease": true
|
"prerelease": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"tagFormat": "${version}",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 7c9f7735cc2f24a7ca1c23043e63a6be
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
using Object = UnityEngine.Object;
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Demo
|
|
||||||
{
|
|
||||||
public class CFX_Demo_With_UIParticle : MonoBehaviour
|
|
||||||
{
|
|
||||||
private MonoBehaviour _demo;
|
|
||||||
private string _demoType;
|
|
||||||
private Toggle _spawnOnUI;
|
|
||||||
private UIParticle _uiParticle;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
_uiParticle = GetComponentInChildren<UIParticle>();
|
|
||||||
_spawnOnUI = GetComponentInChildren<Toggle>();
|
|
||||||
_demo = FindObjectOfType("CFX_Demo_New") as MonoBehaviour
|
|
||||||
?? FindObjectOfType("WFX_Demo_New") as MonoBehaviour
|
|
||||||
?? FindObjectOfType("CFXR_Demo") as MonoBehaviour;
|
|
||||||
_demoType = _demo?.GetType().Name;
|
|
||||||
|
|
||||||
SetCanvasWidth(800);
|
|
||||||
SetCanvasRenderOverlay(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (!_spawnOnUI.isOn || !_demo || !Input.GetMouseButtonDown(0)) return;
|
|
||||||
|
|
||||||
if (_demoType == "CFX_Demo_New" || _demoType == "WFX_Demo_New")
|
|
||||||
{
|
|
||||||
SpawnParticleCFX();
|
|
||||||
}
|
|
||||||
else if (_demoType == "CFXR_Demo")
|
|
||||||
{
|
|
||||||
SpawnParticleCFXR();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SpawnParticleCFXR()
|
|
||||||
{
|
|
||||||
var particle = _demo.GetType()
|
|
||||||
.GetField("currentEffect", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)
|
|
||||||
?.GetValue(_demo) as GameObject;
|
|
||||||
if (!particle) return;
|
|
||||||
|
|
||||||
var instance = Instantiate(particle);
|
|
||||||
foreach (var c in instance.GetComponentsInChildren<MonoBehaviour>())
|
|
||||||
{
|
|
||||||
if (c.GetType().Name == "CFXR_Effect")
|
|
||||||
{
|
|
||||||
c.enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_uiParticle.SetParticleSystemInstance(instance, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SpawnParticleCFX()
|
|
||||||
{
|
|
||||||
var particle = _demo.GetType()
|
|
||||||
.GetMethod("spawnParticle", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)
|
|
||||||
?.Invoke(_demo, Array.Empty<object>()) as GameObject;
|
|
||||||
if (!particle) return;
|
|
||||||
|
|
||||||
particle.transform.localScale = Vector3.one;
|
|
||||||
_uiParticle.SetParticleSystemInstance(particle, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Object FindObjectOfType(string typeName)
|
|
||||||
{
|
|
||||||
var type = AppDomain.CurrentDomain.GetAssemblies()
|
|
||||||
.SelectMany(x => x.GetTypes())
|
|
||||||
.FirstOrDefault(x => x.Name == typeName);
|
|
||||||
|
|
||||||
return type == null ? null : FindObjectOfType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCanvasWidth(int width)
|
|
||||||
{
|
|
||||||
var scaler = GetComponentInParent<CanvasScaler>();
|
|
||||||
scaler.screenMatchMode = CanvasScaler.ScreenMatchMode.MatchWidthOrHeight;
|
|
||||||
scaler.matchWidthOrHeight = 0;
|
|
||||||
var resolution = scaler.referenceResolution;
|
|
||||||
resolution.x = width;
|
|
||||||
scaler.referenceResolution = resolution;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCanvasRenderOverlay(bool enable)
|
|
||||||
{
|
|
||||||
var canvas = GetComponentInParent<Canvas>();
|
|
||||||
if (enable)
|
|
||||||
{
|
|
||||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
canvas.worldCamera = Camera.main;
|
|
||||||
canvas.renderMode = RenderMode.ScreenSpaceCamera;
|
|
||||||
canvas.planeDistance = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadScene(string scene)
|
|
||||||
{
|
|
||||||
SceneManager.LoadScene(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: ca0fd7c7ead2c49b1ae139b7963de126
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 839afb79f79094e6c942050ec5413ebf
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!21 &2100000
|
|
||||||
Material:
|
|
||||||
serializedVersion: 6
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: UIParticle_PerformanceDemo_Fire
|
|
||||||
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
|
|
||||||
m_ShaderKeywords:
|
|
||||||
m_LightmapFlags: 4
|
|
||||||
m_EnableInstancingVariants: 0
|
|
||||||
m_DoubleSidedGI: 0
|
|
||||||
m_CustomRenderQueue: -1
|
|
||||||
stringTagMap: {}
|
|
||||||
disabledShaderPasses: []
|
|
||||||
m_SavedProperties:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TexEnvs:
|
|
||||||
- _BumpMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _DetailAlbedoMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _DetailMask:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _DetailNormalMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _EmissionMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _MainTex:
|
|
||||||
m_Texture: {fileID: 2800000, guid: 294c5667b05cc4edcac3885a5899cc65, type: 3}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _MetallicGlossMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _OcclusionMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
- _ParallaxMap:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
m_Floats:
|
|
||||||
- _BumpScale: 1
|
|
||||||
- _ColorMask: 15
|
|
||||||
- _Cutoff: 0.5
|
|
||||||
- _DetailNormalMapScale: 1
|
|
||||||
- _DstBlend: 0
|
|
||||||
- _GlossMapScale: 1
|
|
||||||
- _Glossiness: 0.5
|
|
||||||
- _GlossyReflections: 1
|
|
||||||
- _Glow: 1
|
|
||||||
- _InvFade: 1
|
|
||||||
- _Metallic: 0
|
|
||||||
- _Mode: 0
|
|
||||||
- _OcclusionStrength: 1
|
|
||||||
- _Parallax: 0.02
|
|
||||||
- _SmoothnessTextureChannel: 0
|
|
||||||
- _SpecularHighlights: 1
|
|
||||||
- _SrcBlend: 1
|
|
||||||
- _Stencil: 0
|
|
||||||
- _StencilComp: 8
|
|
||||||
- _StencilOp: 0
|
|
||||||
- _StencilReadMask: 255
|
|
||||||
- _StencilWriteMask: 255
|
|
||||||
- _UVSec: 0
|
|
||||||
- _UseUIAlphaClip: 0
|
|
||||||
- _ZWrite: 1
|
|
||||||
m_Colors:
|
|
||||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3dc66b79cada243e59bcaf09f804373d
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 2100000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 585 KiB |
@@ -1,121 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 294c5667b05cc4edcac3885a5899cc65
|
|
||||||
TextureImporter:
|
|
||||||
fileIDToRecycleName: {}
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 9
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 1
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 2
|
|
||||||
aniso: 16
|
|
||||||
mipBias: -100
|
|
||||||
wrapU: -1
|
|
||||||
wrapV: -1
|
|
||||||
wrapW: -1
|
|
||||||
nPOTScale: 1
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 0
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 0
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 4096
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 4096
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 4096
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: WebGL
|
|
||||||
maxTextureSize: 4096
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: db256ad6e34f94a4a95dedcbce09ddf1
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Coffee.UIParticle.PerformanceDemo",
|
|
||||||
"references": [
|
|
||||||
"Coffee.UIParticle"
|
|
||||||
],
|
|
||||||
"optionalUnityReferences": [],
|
|
||||||
"includePlatforms": [],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": false,
|
|
||||||
"precompiledReferences": [],
|
|
||||||
"autoReferenced": false,
|
|
||||||
"defineConstraints": []
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9c1a1a5e813ba46d2b837936f34e33a7
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Serialization;
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Demo
|
|
||||||
{
|
|
||||||
public class UIParticle_PerformanceDemo : MonoBehaviour
|
|
||||||
{
|
|
||||||
[FormerlySerializedAs("copyOrigin")]
|
|
||||||
[SerializeField]
|
|
||||||
private GameObject m_CopyOrigin;
|
|
||||||
|
|
||||||
[FormerlySerializedAs("copyCount")]
|
|
||||||
[SerializeField]
|
|
||||||
public int m_CopyCount;
|
|
||||||
|
|
||||||
[FormerlySerializedAs("root")]
|
|
||||||
[SerializeField]
|
|
||||||
public Canvas m_RootCanvas;
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
Application.targetFrameRate = 60;
|
|
||||||
|
|
||||||
if (m_CopyOrigin)
|
|
||||||
{
|
|
||||||
m_CopyOrigin.SetActive(false);
|
|
||||||
|
|
||||||
var parent = m_CopyOrigin.transform.parent;
|
|
||||||
for (var i = 0; i < m_CopyCount; i++)
|
|
||||||
{
|
|
||||||
var go = Instantiate(m_CopyOrigin, parent, false);
|
|
||||||
go.name = string.Format("{0} {1}", m_CopyOrigin.name, i + 1);
|
|
||||||
go.hideFlags = HideFlags.DontSave;
|
|
||||||
|
|
||||||
go.SetActive(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UIParticle_Enable(bool flag)
|
|
||||||
{
|
|
||||||
foreach (var uip in m_RootCanvas.GetComponentsInChildren<UIParticle>(true))
|
|
||||||
{
|
|
||||||
uip.enabled = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!flag)
|
|
||||||
{
|
|
||||||
foreach (var ps in FindObjectsOfType<ParticleSystem>())
|
|
||||||
{
|
|
||||||
ps.Play(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UIParticle_MeshSharing(bool flag)
|
|
||||||
{
|
|
||||||
foreach (var uip in m_RootCanvas.GetComponentsInChildren<UIParticle>(true))
|
|
||||||
{
|
|
||||||
uip.meshSharing = flag
|
|
||||||
? UIParticle.MeshSharing.Auto
|
|
||||||
: UIParticle.MeshSharing.None;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UIParticle_RandomGroup(bool flag)
|
|
||||||
{
|
|
||||||
foreach (var uip in m_RootCanvas.GetComponentsInChildren<UIParticle>(true))
|
|
||||||
{
|
|
||||||
uip.groupMaxId = flag
|
|
||||||
? 4
|
|
||||||
: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ParticleSystem_SetScale(float scale)
|
|
||||||
{
|
|
||||||
foreach (var ps in FindObjectsOfType<ParticleSystem>())
|
|
||||||
{
|
|
||||||
ps.transform.localScale = new Vector3(scale, scale, scale);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: aacefbb114f024ec0bd6d3153b28bb36
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fc4e1d816001842709cf8a393c69dd14
|
|
||||||
TextureImporter:
|
|
||||||
fileIDToRecycleName: {}
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 9
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: -1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: -1
|
|
||||||
aniso: -1
|
|
||||||
mipBias: -100
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 1
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 8
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: iPhone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: WebGL
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID: de8a1691f8aae4be18d66008040aa1a7
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9b9aa386e19cb4bf4b7e055e962419e2
|
|
||||||
TextureImporter:
|
|
||||||
fileIDToRecycleName: {}
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 9
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: -1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 0
|
|
||||||
aniso: 16
|
|
||||||
mipBias: -100
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 1
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 8
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 2
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID: 84e9fd7e25cf94cfc81bd77bc4f1d566
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 870ee15d24ba04925bce26ece2edb10e
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a4669dfbba654429bbcddf0c9b79fb8b
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 64db617a76e9a4f1e90d0731175c1f7b
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 194d2f2eb25c64ec0af5c323c74eb518, type: 3}
|
|
||||||
m_Name: NanoMonitor
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_NanoMonitorEnabled: 1
|
|
||||||
m_BootSceneNameRegex: .*
|
|
||||||
m_DevelopmentBuildOnly: 1
|
|
||||||
m_EnabledInEditor: 1
|
|
||||||
m_AlwaysIncludeAssembly: 1
|
|
||||||
m_InstantiateOnLoad: 1
|
|
||||||
m_Prefab: {fileID: 7211429669315726685, guid: b73940fc30a2f4eb9a73783e9c1f8da6,
|
|
||||||
type: 3}
|
|
||||||
m_Opened: 1
|
|
||||||
m_Interval: 0.5
|
|
||||||
m_Anchor: 1
|
|
||||||
m_CustomMonitorItems:
|
|
||||||
- m_Format: Screen:{0}x{1}
|
|
||||||
m_Arg0:
|
|
||||||
m_Path: UnityEngine.Screen, UnityEngine.CoreModule;width
|
|
||||||
m_Arg1:
|
|
||||||
m_Path: UnityEngine.Screen, UnityEngine.CoreModule;height
|
|
||||||
m_Arg2:
|
|
||||||
m_Path:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 86087a0847f384b538391745dad4565c
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b73940fc30a2f4eb9a73783e9c1f8da6
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 94e8c16a26d334eafa227ee444387432, type: 3}
|
|
||||||
m_Name: SimpleSceneNavigator
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_NavigatorEnabled: 1
|
|
||||||
m_EnabledInEditor: 1
|
|
||||||
m_AlwaysIncludeAssembly: 1
|
|
||||||
m_InstantiateOnLoad: 1
|
|
||||||
m_Prefab: {fileID: 7211429669315726685, guid: 46deb9632f6a14713b8460bd01e879c9,
|
|
||||||
type: 3}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: be3e05903ef7041d39b3ef8ecdd47f08
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,513 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &3877588430955763108
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3877588430955763111}
|
|
||||||
- component: {fileID: 3877588430955763105}
|
|
||||||
- component: {fileID: 3877588430955763110}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Text
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &3877588430955763111
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588430955763108}
|
|
||||||
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_Children: []
|
|
||||||
m_Father: {fileID: 3877588431231610297}
|
|
||||||
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!222 &3877588430955763105
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588430955763108}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!114 &3877588430955763110
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588430955763108}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_FontData:
|
|
||||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
|
||||||
m_FontSize: 14
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 10
|
|
||||||
m_MaxSize: 40
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: '>>'
|
|
||||||
--- !u!1 &3877588431231610301
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3877588431231610297}
|
|
||||||
- component: {fileID: 3877588431231610302}
|
|
||||||
- component: {fileID: 3877588431231610303}
|
|
||||||
- component: {fileID: 3877588431231610300}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Button - >>
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &3877588431231610297
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588431231610301}
|
|
||||||
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_Children:
|
|
||||||
- {fileID: 3877588430955763111}
|
|
||||||
m_Father: {fileID: 7211429669315725985}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 1, y: 1}
|
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 30, y: 30}
|
|
||||||
m_Pivot: {x: 1, y: 1}
|
|
||||||
--- !u!222 &3877588431231610302
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588431231610301}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!114 &3877588431231610303
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588431231610301}
|
|
||||||
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_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_Type: 1
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 1
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!114 &3877588431231610300
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588431231610301}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Navigation:
|
|
||||||
m_Mode: 3
|
|
||||||
m_SelectOnUp: {fileID: 0}
|
|
||||||
m_SelectOnDown: {fileID: 0}
|
|
||||||
m_SelectOnLeft: {fileID: 0}
|
|
||||||
m_SelectOnRight: {fileID: 0}
|
|
||||||
m_Transition: 1
|
|
||||||
m_Colors:
|
|
||||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
|
||||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
|
||||||
m_ColorMultiplier: 1
|
|
||||||
m_FadeDuration: 0.1
|
|
||||||
m_SpriteState:
|
|
||||||
m_HighlightedSprite: {fileID: 0}
|
|
||||||
m_PressedSprite: {fileID: 0}
|
|
||||||
m_SelectedSprite: {fileID: 0}
|
|
||||||
m_DisabledSprite: {fileID: 0}
|
|
||||||
m_AnimationTriggers:
|
|
||||||
m_NormalTrigger: Normal
|
|
||||||
m_HighlightedTrigger: Highlighted
|
|
||||||
m_PressedTrigger: Pressed
|
|
||||||
m_SelectedTrigger: Selected
|
|
||||||
m_DisabledTrigger: Disabled
|
|
||||||
m_Interactable: 1
|
|
||||||
m_TargetGraphic: {fileID: 3877588431231610303}
|
|
||||||
m_OnClick:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
--- !u!1 &3877588432219069602
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3877588432219069614}
|
|
||||||
- component: {fileID: 3877588432219069615}
|
|
||||||
- component: {fileID: 3877588432219069612}
|
|
||||||
- component: {fileID: 3877588432219069613}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Button - <<
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &3877588432219069614
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588432219069602}
|
|
||||||
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_Children:
|
|
||||||
- {fileID: 1738594088889562266}
|
|
||||||
m_Father: {fileID: 7211429669315725985}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 30, y: 30}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!222 &3877588432219069615
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588432219069602}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!114 &3877588432219069612
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588432219069602}
|
|
||||||
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_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_Type: 1
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 1
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!114 &3877588432219069613
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3877588432219069602}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Navigation:
|
|
||||||
m_Mode: 3
|
|
||||||
m_SelectOnUp: {fileID: 0}
|
|
||||||
m_SelectOnDown: {fileID: 0}
|
|
||||||
m_SelectOnLeft: {fileID: 0}
|
|
||||||
m_SelectOnRight: {fileID: 0}
|
|
||||||
m_Transition: 1
|
|
||||||
m_Colors:
|
|
||||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
|
||||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
|
||||||
m_ColorMultiplier: 1
|
|
||||||
m_FadeDuration: 0.1
|
|
||||||
m_SpriteState:
|
|
||||||
m_HighlightedSprite: {fileID: 0}
|
|
||||||
m_PressedSprite: {fileID: 0}
|
|
||||||
m_SelectedSprite: {fileID: 0}
|
|
||||||
m_DisabledSprite: {fileID: 0}
|
|
||||||
m_AnimationTriggers:
|
|
||||||
m_NormalTrigger: Normal
|
|
||||||
m_HighlightedTrigger: Highlighted
|
|
||||||
m_PressedTrigger: Pressed
|
|
||||||
m_SelectedTrigger: Selected
|
|
||||||
m_DisabledTrigger: Disabled
|
|
||||||
m_Interactable: 1
|
|
||||||
m_TargetGraphic: {fileID: 3877588432219069612}
|
|
||||||
m_OnClick:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
--- !u!1 &7211429669315726685
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 7211429669315725985}
|
|
||||||
- component: {fileID: 7211429669315726686}
|
|
||||||
- component: {fileID: 7211429669315726687}
|
|
||||||
- component: {fileID: 7143702096253919615}
|
|
||||||
- component: {fileID: 3330778306119167604}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: SimpleSceneNavigator
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &7211429669315725985
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7211429669315726685}
|
|
||||||
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_Children:
|
|
||||||
- {fileID: 3877588432219069614}
|
|
||||||
- {fileID: 3877588431231610297}
|
|
||||||
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!223 &7211429669315726686
|
|
||||||
Canvas:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7211429669315726685}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_RenderMode: 0
|
|
||||||
m_Camera: {fileID: 0}
|
|
||||||
m_PlaneDistance: 100
|
|
||||||
m_PixelPerfect: 0
|
|
||||||
m_ReceivesEvents: 1
|
|
||||||
m_OverrideSorting: 0
|
|
||||||
m_OverridePixelPerfect: 0
|
|
||||||
m_SortingBucketNormalizedSize: 0
|
|
||||||
m_AdditionalShaderChannelsFlag: 0
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingOrder: 32000
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
--- !u!114 &7211429669315726687
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7211429669315726685}
|
|
||||||
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: 600, y: 40}
|
|
||||||
m_ScreenMatchMode: 0
|
|
||||||
m_MatchWidthOrHeight: 0
|
|
||||||
m_PhysicalUnit: 3
|
|
||||||
m_FallbackScreenDPI: 96
|
|
||||||
m_DefaultSpriteDPI: 96
|
|
||||||
m_DynamicPixelsPerUnit: 1
|
|
||||||
--- !u!114 &7143702096253919615
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7211429669315726685}
|
|
||||||
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 &3330778306119167604
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7211429669315726685}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e7db36469bd2a46658ff432d65cb62ca, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_PrevButton: {fileID: 3877588432219069613}
|
|
||||||
m_NextButton: {fileID: 3877588431231610300}
|
|
||||||
m_PrevName: {fileID: 0}
|
|
||||||
m_NextName: {fileID: 0}
|
|
||||||
--- !u!1 &8570858711609111474
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1738594088889562266}
|
|
||||||
- component: {fileID: 5485386222362727379}
|
|
||||||
- component: {fileID: 3877588430751452752}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Text
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1738594088889562266
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8570858711609111474}
|
|
||||||
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_Children: []
|
|
||||||
m_Father: {fileID: 3877588432219069614}
|
|
||||||
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!222 &5485386222362727379
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8570858711609111474}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!114 &3877588430751452752
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8570858711609111474}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_FontData:
|
|
||||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
|
||||||
m_FontSize: 14
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 10
|
|
||||||
m_MaxSize: 40
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: <<
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../Packages/src/Samples~
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2132c9464acf94912a959f8cc6a68fa6
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 57d832714402a4bc5a0ed550741823ad
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Coffee.UIParticle.Tests",
|
|
||||||
"references": [
|
|
||||||
"Coffee.UIParticle"
|
|
||||||
],
|
|
||||||
"optionalUnityReferences": [
|
|
||||||
"TestAssemblies"
|
|
||||||
],
|
|
||||||
"includePlatforms": [],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": false,
|
|
||||||
"precompiledReferences": [],
|
|
||||||
"autoReferenced": false,
|
|
||||||
"defineConstraints": []
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 0253956e76ec342d49f1377578eb86be
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c49dbc815ad044a919bd5b7d4e6c59cf
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Coffee.UIParticle.Editor.Tests",
|
|
||||||
"references": [
|
|
||||||
"Coffee.UIParticle",
|
|
||||||
"Coffee.UIParticle.Editor"
|
|
||||||
],
|
|
||||||
"optionalUnityReferences": [
|
|
||||||
"TestAssemblies"
|
|
||||||
],
|
|
||||||
"includePlatforms": [
|
|
||||||
"Editor"
|
|
||||||
],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": false,
|
|
||||||
"precompiledReferences": [],
|
|
||||||
"autoReferenced": false,
|
|
||||||
"defineConstraints": []
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 78daa55fa55814a33a3377d6ede8c43d
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using UnityEngine.TestTools;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticle.Editor.Tests
|
|
||||||
{
|
|
||||||
public class NewTestScript
|
|
||||||
{
|
|
||||||
// A Test behaves as an ordinary method
|
|
||||||
[Test]
|
|
||||||
public void NewTestScriptSimplePasses()
|
|
||||||
{
|
|
||||||
// Use the Assert class to test conditions
|
|
||||||
}
|
|
||||||
|
|
||||||
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
|
|
||||||
// `yield return null;` to skip a frame.
|
|
||||||
[UnityTest]
|
|
||||||
public IEnumerator NewTestScriptWithEnumeratorPasses()
|
|
||||||
{
|
|
||||||
// Use the Assert class to test conditions.
|
|
||||||
// Use yield to skip a frame.
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using UnityEngine.TestTools;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticle.Tests
|
|
||||||
{
|
|
||||||
public class NewTestScript
|
|
||||||
{
|
|
||||||
// A Test behaves as an ordinary method
|
|
||||||
[Test]
|
|
||||||
public void NewTestScriptSimplePasses()
|
|
||||||
{
|
|
||||||
// Use the Assert class to test conditions
|
|
||||||
}
|
|
||||||
|
|
||||||
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
|
|
||||||
// `yield return null;` to skip a frame.
|
|
||||||
[UnityTest]
|
|
||||||
public IEnumerator NewTestScriptWithEnumeratorPasses()
|
|
||||||
{
|
|
||||||
// Use the Assert class to test conditions.
|
|
||||||
// Use yield to skip a frame.
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,276 +1,16 @@
|
|||||||
## [4.6.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.6.3...v4.6.4) (2024-05-22)
|
## [3.3.14](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.13...3.3.14) (2023-08-15)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* assertion failed on expression: 'ps->array_size()' ([1b5c359](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1b5c359058289895caf5f245fe09abb643bc38eb)), closes [#278](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/278)
|
* error on InitializeIfNeeded ([1f1fb2a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1f1fb2a62a9d2ca6562e1b1e70d528aaf52bfc82)), closes [#264](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/264)
|
||||||
* lost Material.mainTexture when using AnimatableProperties ([ea04352](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ea043524c0b00f67cba26a1f9ea537ee4a56d6ff)), closes [#311](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/311)
|
|
||||||
* remove unnecessary code ([c37c014](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c37c01486499773e3d7e8296c95bb4c3fae94abb))
|
|
||||||
|
|
||||||
## [4.6.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.6.2...v4.6.3) (2024-04-04)
|
## [3.3.13](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.12...3.3.13) (2023-05-18)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* if only Trail Material is used, it will not be displayed ([2eff411](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/2eff411bd97eb4e6947d29a02b85b414bfdaee3a)), closes [#294](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/294)
|
* memory leak when using AnimatableProperty ([3849a9f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3849a9f6977bc6d2474001c8154a8e201f7e8b7b))
|
||||||
* if the UIParticle parents do not have Canvas, an exception is thrown in OnEnable ([e82c833](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e82c833d04b819f103984931ba29a3616ef50908)), closes [#300](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/300)
|
|
||||||
* particle size too small due to auto scaling ([2ec3748](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/2ec374833614d64406e7c3207ca5fe234a749dcb)), closes [#295](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/295)
|
|
||||||
|
|
||||||
## [4.6.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.6.1...v4.6.2) (2024-02-01)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix compile error in Unity 2021.1 or older ([fcae60b](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/fcae60bf29079bac07463bd3a86f8644151d72ba))
|
|
||||||
* fix demos ([ad20d12](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ad20d128a2ad033d9f30b98f0a0dab6091f5aa19))
|
|
||||||
* fix warning ([7fd4a8e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7fd4a8e343ce587dffa9db5ff186061b3ebb38a6))
|
|
||||||
|
|
||||||
## [4.6.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.6.0...v4.6.1) (2024-01-26)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* unintended scaling occurs when `AutoScalingMode=UIParticle` and `ScalingMode=Local` ([1627de1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1627de10eb1e742a015603ae9939071665a5bd89)), closes [#292](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/292)
|
|
||||||
|
|
||||||
# [4.6.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.5.2...v4.6.0) (2024-01-26)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix abnormal mesh bounds error ([772bf50](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/772bf50d168982bd401c30e58172e0a60fbafe46)), closes [#213](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/213)
|
|
||||||
* fix warning ([93d3919](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/93d3919b6fb6ac186b3e99f8baaef9a044f583f2))
|
|
||||||
* fix warning ([8a78ec1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8a78ec13ad2aad9138a22b67c332871e064a38cc))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* "[generated]" GameObjects on the hierarchy is disturbing ([7c42421](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7c4242150b591daf64390588afa27efa27368af3)), closes [#288](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/288)
|
|
||||||
* add explicit dependencies ([9a0187a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9a0187a72a35d378ff7be965bfcb7475f423fe0f))
|
|
||||||
* add icon ([0c1022c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0c1022c6224394713f62b41e5e4ef0c289610ae1))
|
|
||||||
* remove samples ([f53a7fa](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f53a7faed3ee73ac22d745a778284e818624b510))
|
|
||||||
|
|
||||||
# [4.6.0-preview.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.5.2...v4.6.0-preview.1) (2024-01-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix abnormal mesh bounds error ([772bf50](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/772bf50d168982bd401c30e58172e0a60fbafe46)), closes [#213](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/213)
|
|
||||||
* fix warning ([93d3919](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/93d3919b6fb6ac186b3e99f8baaef9a044f583f2))
|
|
||||||
* fix warning ([8a78ec1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8a78ec13ad2aad9138a22b67c332871e064a38cc))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* "[generated]" GameObjects on the hierarchy is disturbing ([7c42421](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7c4242150b591daf64390588afa27efa27368af3)), closes [#288](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/288)
|
|
||||||
* add explicit dependencies ([9a0187a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9a0187a72a35d378ff7be965bfcb7475f423fe0f))
|
|
||||||
* add icon ([0c1022c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0c1022c6224394713f62b41e5e4ef0c289610ae1))
|
|
||||||
* remove samples ([f53a7fa](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f53a7faed3ee73ac22d745a778284e818624b510))
|
|
||||||
|
|
||||||
## [4.5.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.5.1...4.5.2) (2024-01-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* (editor) sometimes crashes when entering play mode ([b80c3e6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b80c3e6c9fdd2a8fb72ff233edb85df2e3dbba3d))
|
|
||||||
|
|
||||||
## [4.5.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.5.0...4.5.1) (2023-12-23)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix material for mesh sharing group ([6126af9](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/6126af9f376dd4c100a1b9d19d9499bdef7d5566))
|
|
||||||
* the changes made to the material used by the ParticleSystem are not immediately reflected ([3184ba9](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3184ba94ae08264223c0c71443ad70acc1a1ccb2)), closes [#280](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/280)
|
|
||||||
|
|
||||||
# [4.5.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.4.0...4.5.0) (2023-12-23)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* incorrect rendering of world-space simulated particles while animating scale ([ac58475](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ac584755393d87bda2e80d9653370b7e4c68912f)), closes [#285](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/285)
|
|
||||||
* remove obsolete warning ([5d5eb34](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5d5eb34590b7cefb0e4ac26c0441e104176ce522))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Automatically generated objects are no longer editable (NotEditable). ([5607dc4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5607dc4eed0c086b4651941953df6c7d535712e0))
|
|
||||||
* support IMeshModifier ([5c3232f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5c3232faf3d2cfad1e3e1a9349b8346c7982a608)), closes [#282](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/282)
|
|
||||||
|
|
||||||
# [4.4.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.3.0...4.4.0) (2023-11-08)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* support 'Active Apply Color Space' for linear color space ([45c56bb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/45c56bbd850202365751ea019baf5131b2eb9fbe))
|
|
||||||
|
|
||||||
# [4.3.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.2.2...4.3.0) (2023-11-08)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* added 'autoScalingMode (None, Transform.localScale, UIParticle.scale)' instead of 'autoScaling' ([107f901](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/107f901fe3232223322681edc4bf908642474298))
|
|
||||||
* reset transform.localScale on upgrading v3.x to v4.x ([c710787](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c710787b5ba496cf73e7eb43458bb3958139baa9)), closes [#277](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/277)
|
|
||||||
|
|
||||||
## [4.2.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.2.1...4.2.2) (2023-10-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* il2cpp code stripping bug ([73f6dad](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/73f6dad0f33641a76ddd05ffc6812ced3f8a276d)), closes [#269](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/269)
|
|
||||||
|
|
||||||
## [4.2.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.2.0...4.2.1) (2023-08-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* autoScaling and PositionMode may be locked ([3f2f12d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3f2f12d2cf7541118c02830ec9fdea8183357487))
|
|
||||||
|
|
||||||
# [4.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.7...4.2.0) (2023-08-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* assertion 'ps->array_size()' in UpdateMesh() when using trails of type ribbon ([f75fcce](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f75fcce0dae0bc166bd01d36a150aded1fd721f3)), closes [#241](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/241)
|
|
||||||
* built-in shaders are no longer supported ([c2119c1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c2119c171a1262431eac7fea6bf3125db2bcaaca)), closes [#233](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/233) [#257](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/257)
|
|
||||||
* crash occurs when too many vertices are rendered ([723a04d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/723a04d0cfd156715a3c92b6d6bd75fdc1862c28))
|
|
||||||
* error: SerializedObject target has been destroyed ([e930516](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e93051603e121732c92bcd89ded48087c2b0d7fb)), closes [#267](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/267)
|
|
||||||
* excessive particle emitted on move ParticleSystem for local space simulation and emission over distance ([2fe0bde](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/2fe0bde422f9769dfedaf6b053ea07f773646679)), closes [#265](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/265)
|
|
||||||
* fix typos ([52f2ef1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/52f2ef1f2471a2e1c29fca96255c04b222d9c848))
|
|
||||||
* generated GameObject will be named '[generated] *' ([9b2e5c1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9b2e5c1d1024e091de6d18a4578cd18b43563e48))
|
|
||||||
* inactive ParticleSystems are removed from the list on refresh ([4851a18](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4851a1880eef9f385dd9db644ea7e544f95da4fc))
|
|
||||||
* mesh sharing not working ([8b4ca1a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8b4ca1add5c409601e840253e1c0dbcdbf536da8)), closes [#236](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/236)
|
|
||||||
* nullptr exceptions when using nested UIParticle components in hierarchy ([e67e948](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e67e9482e2cb840b16e2cfe76e04f7423fcbd3a3)), closes [#246](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/246)
|
|
||||||
* nullReferenceException after copy-n-paste ([425aad0](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/425aad0cbab475635c72bee84ecbf3f2acedccc2)), closes [#258](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/258)
|
|
||||||
* remove unnecessary per-frame allocation. ([e92b514](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e92b514624cc362e53ddeae5ade20fa732f94c7c))
|
|
||||||
* scaling ParticleSystem puts prewarmed particles in wrong location ([fb31db4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/fb31db47f2debb3aadbdc4d1b88d0efd9c4ad7bd)), closes [#235](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/235)
|
|
||||||
* sub-emitters option is not work in editor playing ([b308b26](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b308b2683372662bb834b6f6d23ea3435a68d1b3)), closes [#231](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/231)
|
|
||||||
* the camera under UIParticle will be assigned as _orthoCamera ([c42f8c8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c42f8c8ab0ff033689349a81e02a4808e071a8a2))
|
|
||||||
* UIParticleAttractor attracts the particles at wrong position when in RelativeMode ([68d9925](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/68d9925a16237df3c7b07b4781172cbd03425421)), closes [#262](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/262)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* 'AbsoluteMode' option is renamed to 'PositionMode' ([67eff61](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/67eff610736344ba0122163ff5ee63b25c43f555))
|
|
||||||
* 'AutoScaling' option will be imported from 'IgnoreCanvasScale' (for v3.x) ([4103041](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/410304125f3f25f3f543c7bc01dcc661eab00609))
|
|
||||||
* add 'AutoScaling' option for UIParticle ([35325c8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/35325c88996fa6aea19a6dd1395c05884e1f84ae))
|
|
||||||
* add 'UpdateMode' option for UIParticleAttractor ([903f702](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/903f702d7be38228841a5a693e3afdceb4a59d9f)), closes [#250](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/250)
|
|
||||||
* add particle system getter and setter for attractor ([a4bcf93](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a4bcf93022d2729f3d2a74a2cac4f52e68641b18)), closes [#253](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/253)
|
|
||||||
* add public properties for UIParticleAttractor ([392ab6d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/392ab6dd76c36e815320d3a50744d19faa631260)), closes [#253](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/253)
|
|
||||||
* add Start/StopEmission API for UIParticle ([e499836](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e4998365c9825fa385e0a317768ce073a1f15b48)), closes [#240](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/240)
|
|
||||||
|
|
||||||
## [4.1.7](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.6...4.1.7) (2022-08-30)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* the annoying empty black scene overlay box shown even when nothing is selected ([bdeeabb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/bdeeabbbe140b0ba80fac7ac477874c2467d3a16))
|
|
||||||
|
|
||||||
## [4.1.6](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.5...4.1.6) (2022-08-10)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix abnormal mesh bounds error ([f60d6df](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f60d6dfe6030ac89527a4265e414e9a0a20d56db)), closes [#213](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/213) [#218](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/218)
|
|
||||||
|
|
||||||
## [4.1.5](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.4...4.1.5) (2022-08-10)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix culling for RectMask2D ([9e2dbe7](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9e2dbe7758eb28a4f6a7c11113d9169847880f96)), closes [#220](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/220)
|
|
||||||
|
|
||||||
## [4.1.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.3...4.1.4) (2022-07-01)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* add `Enabled` toggle in overlay window ([f97e619](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f97e6195e62b5acfa8f3e97bfe3bc4a7dcadf38a))
|
|
||||||
* if `m_Particles` contains null, an error will occur ([550d0c4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/550d0c43be35cd07e390ffd5749557c89fee0332)), closes [#214](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/214)
|
|
||||||
* ParticleSystem reordering and refreshing in inspector does not work for prefab asset ([7eb4112](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7eb41124db06ea794db76788b35ce82a0af2c402))
|
|
||||||
* refresh button does not works in prefab edit mode ([c1538a8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c1538a83998608a30dc90944b05f8b75e165cf05)), closes [#214](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/214)
|
|
||||||
* when `UIParticlrRenderer` destroy manually, an error will occur ([a11d2d0](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a11d2d01ce5f67e3f430bcb0bfdee1ad9abf7cfe))
|
|
||||||
|
|
||||||
## [4.1.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.2...4.1.3) (2022-06-28)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* error on drag prefab to scene ([fa2f867](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/fa2f867bcaff437bb9420da1abcef970cdb09ade)), closes [#211](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/211)
|
|
||||||
|
|
||||||
## [4.1.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.1...4.1.2) (2022-06-27)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* error on editor ([8034228](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/80342287137c07d58a7492875a401d80cb134073)), closes [#210](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/210)
|
|
||||||
* incorrect position of world space trail particles ([fb7f308](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/fb7f308f092db8a1512383857b80110cd626ecf9)), closes [#209](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/209)
|
|
||||||
|
|
||||||
## [4.1.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.1.0...4.1.1) (2022-06-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* add absolute mode toggle to overlay window ([48d1994](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/48d1994f5f8751b707b6ef7695b552df731bece9))
|
|
||||||
|
|
||||||
# [4.1.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.0.1...4.1.0) (2022-06-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add relative/absolute particle position mode ([1879ac8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1879ac8c538778e386e68cfc989a6f4f974043ca)), closes [#205](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/205)
|
|
||||||
|
|
||||||
## [4.0.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/4.0.0...4.0.1) (2022-06-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* overlays do not exist in Unity 2019.2-2021.1 ([cd8e037](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/cd8e0372b63bb6feaaf053518013a641bc7e65ac)), closes [#207](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/207) [#208](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/208)
|
|
||||||
|
|
||||||
# [4.0.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.12...4.0.0) (2022-06-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* correct world space particle position when changing screen size ([c6644a2](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c6644a213263375c7a35b5082ef4b71cc58964e6))
|
|
||||||
* keep properly canvas batches ([d8e96e6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d8e96e69a62dff7a451eaed32c7a814e7e62dbb9))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adaptive scaling for UI ([aa0d56f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/aa0d56f9faa05e9679d4b476bcf135eafb1b8af9))
|
|
||||||
* add overlay window for UIParticle ([7b21c50](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7b21c500ef78103b605fdca71051d2357b09602f))
|
|
||||||
* add particle attractor component ([386170c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/386170cbf68ebf59d4510fe0a45cf83925ec9ba4))
|
|
||||||
* display warning in inspector if using 'TEXCOORD*.zw' components as custom vertex stream ([59221d5](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/59221d58217a440b77d504e6428bf99f10246260))
|
|
||||||
* mesh sharing group ([9afeebf](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9afeebf67212cdf4d3ac9e9a3b78a7ced5c7ecfe))
|
|
||||||
* random mesh sharing group ([4fa43ed](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4fa43eda4bc70c9c827c4fad9d5ae1327bfbc322))
|
|
||||||
* support 8+ materials ([b76bf5a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b76bf5a5ad378c3c4b16bcf08d21337757557101)), closes [#122](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/122) [#152](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/152) [#186](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/186)
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* If you update to v4, you may be required to adjust your UIParticle.scale.
|
|
||||||
|
|
||||||
# [4.0.0-preview.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.12...4.0.0-preview.1) (2022-06-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* correct world space particle position when changing screen size ([c6644a2](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c6644a213263375c7a35b5082ef4b71cc58964e6))
|
|
||||||
* keep properly canvas batches ([d8e96e6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d8e96e69a62dff7a451eaed32c7a814e7e62dbb9))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adaptive scaling for UI ([aa0d56f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/aa0d56f9faa05e9679d4b476bcf135eafb1b8af9))
|
|
||||||
* add overlay window for UIParticle ([7b21c50](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7b21c500ef78103b605fdca71051d2357b09602f))
|
|
||||||
* add particle attractor component ([386170c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/386170cbf68ebf59d4510fe0a45cf83925ec9ba4))
|
|
||||||
* mesh sharing group ([9afeebf](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9afeebf67212cdf4d3ac9e9a3b78a7ced5c7ecfe))
|
|
||||||
* random mesh sharing group ([4fa43ed](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4fa43eda4bc70c9c827c4fad9d5ae1327bfbc322))
|
|
||||||
* support 8+ materials ([b76bf5a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b76bf5a5ad378c3c4b16bcf08d21337757557101)), closes [#122](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/122) [#152](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/152) [#186](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/186)
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* If you update to v4, you may be required to adjust your UIParticle.scale.
|
|
||||||
|
|
||||||
## [3.3.12](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.11...3.3.12) (2022-06-10)
|
## [3.3.12](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.11...3.3.12) (2022-06-10)
|
||||||
|
|
||||||
@@ -81,4 +81,4 @@ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcem
|
|||||||
[homepage]: https://www.contributor-covenant.org
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
||||||
30
CONTRIBUTING.md
Normal file
30
CONTRIBUTING.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
## How to Contribute
|
||||||
|
|
||||||
|
#### Code of Conduct
|
||||||
|
|
||||||
|
This repository has adopted the Contributor Covenant as it's
|
||||||
|
Code of Conduct. It is expected that participants adhere to it.
|
||||||
|
|
||||||
|
#### Proposing a Change
|
||||||
|
|
||||||
|
If you are unsure about whether or not a change is desired,
|
||||||
|
you can create an issue. This is useful because it creates
|
||||||
|
the possibility for a discussion that's visible to everyone.
|
||||||
|
|
||||||
|
When fixing a bug it is fine to submit a pull request right away.
|
||||||
|
|
||||||
|
#### Sending a Pull Request
|
||||||
|
|
||||||
|
Steps to be performed to submit a pull request:
|
||||||
|
|
||||||
|
1. Fork the repository and create your branch from `develop`.
|
||||||
|
2. If you have fixed a bug or added code that should be tested, add tests.
|
||||||
|
3. Click `Window > Generals > Test Runner` to test
|
||||||
|
4. Commit with a massage based on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153).
|
||||||
|
5. Fill out the description, link any related issues and submit your pull request.
|
||||||
|
|
||||||
|
#### License
|
||||||
|
|
||||||
|
By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Copyright 2018-2023 mob-sakai
|
Copyright 2018 mob-sakai
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ide.rider": "3.0.27",
|
|
||||||
"com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
|
|
||||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
|
||||||
"com.coffee.simple-scene-navigator": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SceneNavigator",
|
|
||||||
"com.coffee.sub-asset-editor": "https://github.com/mob-sakai/SubAssetEditor.git",
|
|
||||||
"com.unity.test-framework": "1.1.33",
|
|
||||||
"com.unity.modules.animation": "1.0.0",
|
|
||||||
"com.unity.modules.physics": "1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"com.coffee.development": {
|
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "git",
|
|
||||||
"dependencies": {},
|
|
||||||
"hash": "41a1b604af8769b600d9c75db02ff35ec30611dc"
|
|
||||||
},
|
|
||||||
"com.coffee.nano-monitor": {
|
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "git",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ugui": "1.0.0"
|
|
||||||
},
|
|
||||||
"hash": "41a1b604af8769b600d9c75db02ff35ec30611dc"
|
|
||||||
},
|
|
||||||
"com.coffee.simple-scene-navigator": {
|
|
||||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SceneNavigator",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "git",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ugui": "1.0.0"
|
|
||||||
},
|
|
||||||
"hash": "41a1b604af8769b600d9c75db02ff35ec30611dc"
|
|
||||||
},
|
|
||||||
"com.coffee.sub-asset-editor": {
|
|
||||||
"version": "https://github.com/mob-sakai/SubAssetEditor.git",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "git",
|
|
||||||
"dependencies": {},
|
|
||||||
"hash": "01464178eec1e4dbe741c11c9baeb94a151c99ee"
|
|
||||||
},
|
|
||||||
"com.coffee.ui-particle": {
|
|
||||||
"version": "file:src",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "embedded",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ugui": "1.0.0",
|
|
||||||
"com.unity.modules.particlesystem": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"com.unity.ext.nunit": {
|
|
||||||
"version": "1.0.6",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.ide.rider": {
|
|
||||||
"version": "3.0.27",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ext.nunit": "1.0.6"
|
|
||||||
},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.test-framework": {
|
|
||||||
"version": "1.1.33",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.ext.nunit": "1.0.6",
|
|
||||||
"com.unity.modules.imgui": "1.0.0",
|
|
||||||
"com.unity.modules.jsonserialize": "1.0.0"
|
|
||||||
},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.ugui": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.modules.ui": "1.0.0",
|
|
||||||
"com.unity.modules.imgui": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"com.unity.modules.animation": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.modules.imgui": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.modules.jsonserialize": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.modules.particlesystem": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.modules.physics": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.modules.ui": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 2,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
s/Coffee.Internal/Coffee.UIParticleInternal/g
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
name: Pull Request
|
|
||||||
about: Create a pull request
|
|
||||||
title: ''
|
|
||||||
assignees: mob-sakai
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**NOTE: Create a pull request to merge into `develop` branch**
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# Contributing
|
|
||||||
|
|
||||||
## How to Contribute
|
|
||||||
|
|
||||||
#### Code of Conduct
|
|
||||||
|
|
||||||
This repository has adopted the Contributor Covenant as it's
|
|
||||||
Code of Conduct. It is expected that participants adhere to it.
|
|
||||||
|
|
||||||
#### Proposing a Change
|
|
||||||
|
|
||||||
If you are unsure about whether or not a change is desired,
|
|
||||||
you can create an issue. This is useful because it creates
|
|
||||||
the possibility for a discussion that's visible to everyone.
|
|
||||||
|
|
||||||
When fixing a bug it is fine to submit a pull request right away.
|
|
||||||
|
|
||||||
#### Sending a Pull Request
|
|
||||||
|
|
||||||
Steps to be performed to submit a pull request:
|
|
||||||
|
|
||||||
1. Fork the repository.
|
|
||||||
2. Clone the repository.
|
|
||||||
3. Checkout `develop` branch.
|
|
||||||
4. Develop the package.
|
|
||||||
5. Test the package with the test runner (`Window > Generals > Test Runner`).
|
|
||||||
6. Commit with a message based
|
|
||||||
on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153) as follows:
|
|
||||||
|
|
||||||
- `fix:` fix a bug
|
|
||||||
- `feat:` new feature
|
|
||||||
- `docs:` changes only in documentation
|
|
||||||
- `style:` changes only in formatting, white-space, etc
|
|
||||||
- `refactor:` changes only in code structure (extract method, rename variable, move method, etc)
|
|
||||||
- `perf:` changes only in code performance
|
|
||||||
- `test:` add or update tests
|
|
||||||
- `chore:` changes to the build process or auxiliary tools and libraries such as documentation generation
|
|
||||||
|
|
||||||
7. Create a pull request on GitHub. Fill out the description, link any related issues and submit your pull request.
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
|
||||||
{
|
|
||||||
internal static class AnimatablePropertyEditor
|
|
||||||
{
|
|
||||||
private static readonly GUIContent s_ContentNothing = new GUIContent("Nothing");
|
|
||||||
private static readonly List<string> s_ActiveNames = new List<string>();
|
|
||||||
private static readonly StringBuilder s_Sb = new StringBuilder();
|
|
||||||
private static readonly HashSet<string> s_Names = new HashSet<string>();
|
|
||||||
|
|
||||||
private static string CollectActiveNames(SerializedProperty sp, List<string> result)
|
|
||||||
{
|
|
||||||
result.Clear();
|
|
||||||
for (var i = 0; i < sp.arraySize; i++)
|
|
||||||
{
|
|
||||||
var spName = sp.GetArrayElementAtIndex(i).FindPropertyRelative("m_Name");
|
|
||||||
if (spName == null) continue;
|
|
||||||
|
|
||||||
result.Add(spName.stringValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
s_Sb.Length = 0;
|
|
||||||
if (result.Count == 0)
|
|
||||||
{
|
|
||||||
s_Sb.Append("Nothing");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result.Aggregate(s_Sb, (a, b) => s_Sb.AppendFormat("{0}, ", b));
|
|
||||||
s_Sb.Length -= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return s_Sb.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Draw(SerializedProperty sp, Material[] mats)
|
|
||||||
{
|
|
||||||
bool isClicked;
|
|
||||||
using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false)))
|
|
||||||
{
|
|
||||||
var pos = EditorGUILayout.GetControlRect(true);
|
|
||||||
var label = new GUIContent(sp.displayName, sp.tooltip);
|
|
||||||
var rect = EditorGUI.PrefixLabel(pos, label);
|
|
||||||
var text = sp.hasMultipleDifferentValues
|
|
||||||
? "-"
|
|
||||||
: CollectActiveNames(sp, s_ActiveNames);
|
|
||||||
isClicked = GUI.Button(rect, text, EditorStyles.popup);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isClicked) return;
|
|
||||||
|
|
||||||
var gm = new GenericMenu();
|
|
||||||
gm.AddItem(s_ContentNothing, s_ActiveNames.Count == 0, () =>
|
|
||||||
{
|
|
||||||
sp.ClearArray();
|
|
||||||
sp.serializedObject.ApplyModifiedProperties();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!sp.hasMultipleDifferentValues)
|
|
||||||
{
|
|
||||||
for (var i = 0; i < sp.arraySize; i++)
|
|
||||||
{
|
|
||||||
var p = sp.GetArrayElementAtIndex(i);
|
|
||||||
var name = p.FindPropertyRelative("m_Name").stringValue;
|
|
||||||
var type = (AnimatableProperty.ShaderPropertyType)p.FindPropertyRelative("m_Type").intValue;
|
|
||||||
AddMenu(gm, sp, new ShaderProperty(name, type), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s_Names.Clear();
|
|
||||||
for (var j = 0; j < mats.Length; j++)
|
|
||||||
{
|
|
||||||
var mat = mats[j];
|
|
||||||
if (!mat || !mat.shader) continue;
|
|
||||||
|
|
||||||
for (var i = 0; i < ShaderUtil.GetPropertyCount(mat.shader); i++)
|
|
||||||
{
|
|
||||||
var name = ShaderUtil.GetPropertyName(mat.shader, i);
|
|
||||||
var type = (AnimatableProperty.ShaderPropertyType)ShaderUtil.GetPropertyType(mat.shader, i);
|
|
||||||
if (s_Names.Contains(name)) continue;
|
|
||||||
s_Names.Add(name);
|
|
||||||
|
|
||||||
AddMenu(gm, sp, new ShaderProperty(name, type), true);
|
|
||||||
|
|
||||||
if (type != AnimatableProperty.ShaderPropertyType.Texture) continue;
|
|
||||||
|
|
||||||
AddMenu(gm, sp, new ShaderProperty($"{name}_ST"), true);
|
|
||||||
AddMenu(gm, sp, new ShaderProperty($"{name}_HDR"), true);
|
|
||||||
AddMenu(gm, sp, new ShaderProperty($"{name}_TexelSize"), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gm.ShowAsContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void AddMenu(GenericMenu menu, SerializedProperty sp, ShaderProperty prop, bool add)
|
|
||||||
{
|
|
||||||
if (add && s_ActiveNames.Contains(prop.name)) return;
|
|
||||||
|
|
||||||
var label = new GUIContent($"{prop.name} ({prop.type})");
|
|
||||||
menu.AddItem(label, s_ActiveNames.Contains(prop.name), () =>
|
|
||||||
{
|
|
||||||
var index = s_ActiveNames.IndexOf(prop.name);
|
|
||||||
if (0 <= index)
|
|
||||||
{
|
|
||||||
sp.DeleteArrayElementAtIndex(index);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sp.InsertArrayElementAtIndex(sp.arraySize);
|
|
||||||
var p = sp.GetArrayElementAtIndex(sp.arraySize - 1);
|
|
||||||
p.FindPropertyRelative("m_Name").stringValue = prop.name;
|
|
||||||
p.FindPropertyRelative("m_Type").intValue = (int)prop.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
sp.serializedObject.ApplyModifiedProperties();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private struct ShaderProperty
|
|
||||||
{
|
|
||||||
public readonly string name;
|
|
||||||
public readonly AnimatableProperty.ShaderPropertyType type;
|
|
||||||
|
|
||||||
public ShaderProperty(string name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
type = AnimatableProperty.ShaderPropertyType.Vector;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ShaderProperty(string name, AnimatableProperty.ShaderPropertyType type)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1006234332be4f329fc1830319b31aaa
|
|
||||||
timeCreated: 1704502465
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
using Coffee.UIExtensions;
|
|
||||||
using Coffee.UIParticleInternal.AssetModification;
|
|
||||||
using UnityEditor;
|
|
||||||
|
|
||||||
#pragma warning disable CS0612 // Type or member is obsolete
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal class UIParticleComponentModifier_AbsoluteMode : ComponentModifier<UIParticle>
|
|
||||||
{
|
|
||||||
protected override bool ModifyComponent(UIParticle uip, bool dryRun)
|
|
||||||
{
|
|
||||||
if (!uip.m_AbsoluteMode) return false;
|
|
||||||
|
|
||||||
uip.m_AbsoluteMode = false;
|
|
||||||
uip.positionMode = UIParticle.PositionMode.Absolute;
|
|
||||||
|
|
||||||
if (!dryRun)
|
|
||||||
{
|
|
||||||
EditorUtility.SetDirty(uip);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Report()
|
|
||||||
{
|
|
||||||
return " -> UIParticle.absoluteMode is obsolete. Use UIParticle.positionMode instead.\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
using Coffee.UIExtensions;
|
|
||||||
using Coffee.UIParticleInternal.AssetModification;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
#pragma warning disable CS0612 // Type or member is obsolete
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal class UIParticleComponentModifier_AutoScaling : ComponentModifier<UIParticle>
|
|
||||||
{
|
|
||||||
protected override bool ModifyComponent(UIParticle uip, bool dryRun)
|
|
||||||
{
|
|
||||||
if (!uip.m_AutoScaling) return false;
|
|
||||||
|
|
||||||
uip.m_AutoScaling = false;
|
|
||||||
uip.autoScalingMode = UIParticle.AutoScalingMode.Transform;
|
|
||||||
uip.transform.localScale = Vector3.one;
|
|
||||||
|
|
||||||
if (!dryRun)
|
|
||||||
{
|
|
||||||
EditorUtility.SetDirty(uip);
|
|
||||||
EditorUtility.SetDirty(uip.transform);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Report()
|
|
||||||
{
|
|
||||||
return
|
|
||||||
" -> UIParticle.ignoreCanvasScaler and UIParticle.autoScaling are obsolete." +
|
|
||||||
" Use UIParticle.autoScalingMode instead.\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3d6d0ca7ae8c641aa98b66fd91c05264
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
using Coffee.UIExtensions;
|
|
||||||
using Coffee.UIParticleInternal.AssetModification;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
#pragma warning disable CS0612 // Type or member is obsolete
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal class UIParticleComponentModifier_IsTrail : ComponentModifier<UIParticle>
|
|
||||||
{
|
|
||||||
protected override bool ModifyComponent(UIParticle uip, bool dryRun)
|
|
||||||
{
|
|
||||||
if (!uip.m_IsTrail) return false;
|
|
||||||
|
|
||||||
if (!dryRun)
|
|
||||||
{
|
|
||||||
var go = uip.gameObject;
|
|
||||||
Object.DestroyImmediate(uip);
|
|
||||||
EditorUtility.SetDirty(go);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Report()
|
|
||||||
{
|
|
||||||
return " -> UIParticle for trail is no longer needed. Removed.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: dfbc9e244a2a040179e7f5b58ec0b978
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Coffee.UIParticleInternal.AssetModification;
|
|
||||||
using UnityEditor;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal class UIParticleModifierRunner : Runner
|
|
||||||
{
|
|
||||||
public UIParticleModifierRunner()
|
|
||||||
: base("UIParticle v5", new List<(string, Func<string, Modifier>)>
|
|
||||||
{
|
|
||||||
(".unity", x => new SceneModifier
|
|
||||||
{
|
|
||||||
path = x,
|
|
||||||
componentModifiers = new IComponentModifier[]
|
|
||||||
{
|
|
||||||
new UIParticleRendererComponentModifier(),
|
|
||||||
new UIParticleComponentModifier_AutoScaling(),
|
|
||||||
new UIParticleComponentModifier_AbsoluteMode(),
|
|
||||||
new UIParticleComponentModifier_IsTrail()
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
(".prefab", x => new PrefabModifier
|
|
||||||
{
|
|
||||||
path = x,
|
|
||||||
componentModifiers = new IComponentModifier[]
|
|
||||||
{
|
|
||||||
new UIParticleRendererComponentModifier(),
|
|
||||||
new UIParticleComponentModifier_AutoScaling(),
|
|
||||||
new UIParticleComponentModifier_AbsoluteMode(),
|
|
||||||
new UIParticleComponentModifier_IsTrail()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[MenuItem("UIParticleModifierRunner/Run")]
|
|
||||||
private static void Run()
|
|
||||||
{
|
|
||||||
new UIParticleModifierRunner().RunIfUserWantsTo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: edd678db452e49869caeca7e7d269e5d
|
|
||||||
timeCreated: 1704502476
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using Coffee.UIExtensions;
|
|
||||||
using Coffee.UIParticleInternal.AssetModification;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal class UIParticleRendererComponentModifier : ComponentModifier<UIParticleRenderer>
|
|
||||||
{
|
|
||||||
protected override bool ModifyComponent(UIParticleRenderer c, bool dryRun)
|
|
||||||
{
|
|
||||||
if (c.hideFlags.HasFlag(HideFlags.DontSave | HideFlags.NotEditable)) return false;
|
|
||||||
|
|
||||||
if (!dryRun)
|
|
||||||
{
|
|
||||||
var go = c.gameObject;
|
|
||||||
Object.DestroyImmediate(c);
|
|
||||||
EditorUtility.SetDirty(go);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Report()
|
|
||||||
{
|
|
||||||
return " -> UIParticleRenderer component is now auto-generated object. Remove them.\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b2a025408e4a7486a941102775d2c73b
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3e440931f761e4e888510a4e6045287a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 269bcefd175184eebbfa31421171fadf
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal abstract class ComponentModifier<T> : IComponentModifier where T : Component
|
|
||||||
{
|
|
||||||
private static readonly List<T> s_Components = new List<T>();
|
|
||||||
|
|
||||||
public bool isModified { get; private set; }
|
|
||||||
|
|
||||||
public bool ModifyComponent(GameObject root, bool dryRun)
|
|
||||||
{
|
|
||||||
root.GetComponentsInChildren(true, s_Components);
|
|
||||||
foreach (var c in s_Components)
|
|
||||||
{
|
|
||||||
if (PrefabUtility.IsPartOfAnyPrefab(c.gameObject)) continue;
|
|
||||||
|
|
||||||
if (ModifyComponent(c, dryRun))
|
|
||||||
{
|
|
||||||
isModified = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return isModified;
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract string Report();
|
|
||||||
|
|
||||||
protected abstract bool ModifyComponent(T component, bool dryRun);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 338da2d8cec784add924489fc4a7bb01
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal abstract class GameObjectModifier : Modifier
|
|
||||||
{
|
|
||||||
private static readonly StringBuilder s_ReportLog = new StringBuilder();
|
|
||||||
public IComponentModifier[] componentModifiers;
|
|
||||||
|
|
||||||
protected bool ModifyGameObject(GameObject root, bool dryRun)
|
|
||||||
{
|
|
||||||
foreach (var modifier in componentModifiers)
|
|
||||||
{
|
|
||||||
modifier.ModifyComponent(root, dryRun);
|
|
||||||
}
|
|
||||||
|
|
||||||
return componentModifiers.Any(x => x.isModified);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string ModificationReport()
|
|
||||||
{
|
|
||||||
if (!hasUpgraded) return string.Empty;
|
|
||||||
|
|
||||||
s_ReportLog.Length = 0;
|
|
||||||
foreach (var componentModifier in componentModifiers)
|
|
||||||
{
|
|
||||||
if (componentModifier.isModified)
|
|
||||||
{
|
|
||||||
s_ReportLog.Append(componentModifier.Report());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 < s_ReportLog.Length)
|
|
||||||
{
|
|
||||||
s_ReportLog.Length--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return s_ReportLog.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f16bc447ca4934ca3b9329d1d870440a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal interface IComponentModifier
|
|
||||||
{
|
|
||||||
bool isModified { get; }
|
|
||||||
bool ModifyComponent(GameObject root, bool dryRun);
|
|
||||||
string Report();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1e50323d0799f4daf8ef476f7bf403a4
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal interface ITextModifier
|
|
||||||
{
|
|
||||||
bool ModifyText(StringBuilder sb, string text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2ad967b4f039b4deba09ed0c1401cf83
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal abstract class Modifier
|
|
||||||
{
|
|
||||||
private string _error;
|
|
||||||
public string path;
|
|
||||||
|
|
||||||
protected abstract string id { get; }
|
|
||||||
protected bool hasUpgraded { private set; get; }
|
|
||||||
|
|
||||||
public void Modify(bool dryRun)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
hasUpgraded = RunModify(dryRun);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
_error = e.Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetModificationReport()
|
|
||||||
{
|
|
||||||
return !string.IsNullOrEmpty(_error)
|
|
||||||
? $"<b><color=red>[{id} (Error)]</color> {path}</b> {_error}\n"
|
|
||||||
: hasUpgraded
|
|
||||||
? $"<b><color=green>[{id}]</color> {path}</b> {ModificationReport()}\n"
|
|
||||||
: string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract bool RunModify(bool dryRun);
|
|
||||||
|
|
||||||
protected virtual string ModificationReport()
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c716fe53d75054d309923c577f5059a4
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal class PrefabModifier : GameObjectModifier
|
|
||||||
{
|
|
||||||
protected override string id => "Prefab";
|
|
||||||
|
|
||||||
protected override bool RunModify(bool dryRun)
|
|
||||||
{
|
|
||||||
using (var scope = new EditScope(path))
|
|
||||||
{
|
|
||||||
var changed = ModifyGameObject(scope.root, dryRun);
|
|
||||||
|
|
||||||
if (!dryRun && changed)
|
|
||||||
{
|
|
||||||
scope.Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly struct EditScope : IDisposable
|
|
||||||
{
|
|
||||||
private readonly string _path;
|
|
||||||
public readonly GameObject root;
|
|
||||||
|
|
||||||
public EditScope(string path)
|
|
||||||
{
|
|
||||||
_path = path;
|
|
||||||
root = PrefabUtility.LoadPrefabContents(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
PrefabUtility.UnloadPrefabContents(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Save()
|
|
||||||
{
|
|
||||||
PrefabUtility.SaveAsPrefabAsset(root, _path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a50643d4fde75458cae1f0d4ef9549ad
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEditor.SceneManagement;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal class Runner
|
|
||||||
{
|
|
||||||
private readonly List<(string ext, Func<string, Modifier> create)> _factory;
|
|
||||||
private readonly string _name;
|
|
||||||
|
|
||||||
protected Runner(string name, List<(string ext, Func<string, Modifier> create)> factory)
|
|
||||||
{
|
|
||||||
_name = name;
|
|
||||||
_factory = factory;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Modifier CreateFromPath(string assetPath)
|
|
||||||
{
|
|
||||||
var ext = Path.GetExtension(assetPath);
|
|
||||||
return _factory
|
|
||||||
.FirstOrDefault(x => x.ext == ext)
|
|
||||||
.create?.Invoke(assetPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Modifier[] GetModifiers(string[] assetPaths)
|
|
||||||
{
|
|
||||||
return assetPaths
|
|
||||||
.Where(x => x.StartsWith("Assets/", StringComparison.Ordinal))
|
|
||||||
.Select(CreateFromPath)
|
|
||||||
.Where(x => x != null)
|
|
||||||
.OrderBy(x => Path.GetExtension(x.path))
|
|
||||||
.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RunIfUserWantsTo()
|
|
||||||
{
|
|
||||||
var select = EditorUtility.DisplayDialogComplex($"Upgrade {_name}",
|
|
||||||
"Upgrade all assets in this project?\n\n" +
|
|
||||||
"'Go Ahead': Upgrades all assets in this project using the old APIs. You should make a backup before proceeding.\n\n" +
|
|
||||||
"'Dry Run': Outputs the upgrade summary to the console without changing.", "I Made a Backup. Go Ahead!",
|
|
||||||
"No Thanks", "Dry Run");
|
|
||||||
if (select == 1) return;
|
|
||||||
|
|
||||||
if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) return;
|
|
||||||
|
|
||||||
var assetPaths = AssetDatabase.GetAllAssetPaths();
|
|
||||||
var dryRun = select == 2;
|
|
||||||
Run(assetPaths, dryRun);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(string[] assetPaths, bool dryRun)
|
|
||||||
{
|
|
||||||
var modifiers = GetModifiers(assetPaths);
|
|
||||||
var canceled = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
AssetDatabase.StartAssetEditing();
|
|
||||||
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
|
|
||||||
|
|
||||||
for (var i = 0; i < modifiers.Length; i++)
|
|
||||||
{
|
|
||||||
var percentage = (float)i / modifiers.Length;
|
|
||||||
var m = modifiers[i];
|
|
||||||
if (EditorUtility.DisplayCancelableProgressBar("Upgrading...", m.path, percentage))
|
|
||||||
{
|
|
||||||
canceled = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
m.Modify(dryRun);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.LogException(e);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
sb.Append(dryRun ? "<b>[DryRun]</b> " : "");
|
|
||||||
sb.AppendLine($"<b>Modify '{_name}' is {(canceled ? "canceled" : "completed")}.</b>");
|
|
||||||
sb.AppendLine("==== Modifications ====");
|
|
||||||
Debug.Log(modifiers.Aggregate(sb, (x, m) => x.Append(m.GetModificationReport())));
|
|
||||||
EditorUtility.ClearProgressBar();
|
|
||||||
AssetDatabase.StopAssetEditing();
|
|
||||||
AssetDatabase.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f28067cf4bfca4d92bd5262ac5c7a652
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEditor.SceneManagement;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal class SceneModifier : GameObjectModifier
|
|
||||||
{
|
|
||||||
protected override string id => "Scene";
|
|
||||||
|
|
||||||
protected override bool RunModify(bool dryRun)
|
|
||||||
{
|
|
||||||
using (var scope = new EditScope(path))
|
|
||||||
{
|
|
||||||
var changed = false;
|
|
||||||
foreach (var root in scope.scene.GetRootGameObjects())
|
|
||||||
{
|
|
||||||
if (ModifyGameObject(root, dryRun))
|
|
||||||
{
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!dryRun && changed)
|
|
||||||
{
|
|
||||||
scope.Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly struct EditScope : IDisposable
|
|
||||||
{
|
|
||||||
public readonly Scene scene;
|
|
||||||
|
|
||||||
public EditScope(string path)
|
|
||||||
{
|
|
||||||
scene = EditorSceneManager.OpenScene(path, OpenSceneMode.Additive);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
EditorSceneManager.CloseScene(scene, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Save()
|
|
||||||
{
|
|
||||||
EditorSceneManager.SaveScene(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6764c0c6fd61a4f66a8b0e3467be420d
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal class TextAssetModifier : Modifier
|
|
||||||
{
|
|
||||||
public ITextModifier[] textModifiers;
|
|
||||||
protected override string id => "Text";
|
|
||||||
protected virtual string savePath => path;
|
|
||||||
|
|
||||||
protected override bool RunModify(bool dryRun)
|
|
||||||
{
|
|
||||||
var changed = false;
|
|
||||||
using (var scope = new EditScope(path, savePath))
|
|
||||||
{
|
|
||||||
foreach (var line in scope.lines)
|
|
||||||
{
|
|
||||||
if (ModifyLine(scope.sb, line))
|
|
||||||
{
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
scope.sb.AppendLine(line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!dryRun && changed)
|
|
||||||
{
|
|
||||||
scope.Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool ModifyLine(StringBuilder sb, string line)
|
|
||||||
{
|
|
||||||
foreach (var modifier in textModifiers)
|
|
||||||
{
|
|
||||||
if (modifier.ModifyText(sb, line))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly struct EditScope : IDisposable
|
|
||||||
{
|
|
||||||
private static readonly StringBuilder s_File = new StringBuilder();
|
|
||||||
private readonly string _path;
|
|
||||||
private readonly string _savePath;
|
|
||||||
public IEnumerable<string> lines => File.ReadLines(_path);
|
|
||||||
public StringBuilder sb => s_File;
|
|
||||||
|
|
||||||
public EditScope(string path, string savePath)
|
|
||||||
{
|
|
||||||
s_File.Length = 0;
|
|
||||||
_path = path;
|
|
||||||
_savePath = savePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Save()
|
|
||||||
{
|
|
||||||
File.WriteAllText(_savePath, sb.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 431e5b95f2f5c4f19926a7fc5342e118
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal.AssetModification
|
|
||||||
{
|
|
||||||
internal class TextReplaceModifier : ITextModifier
|
|
||||||
{
|
|
||||||
private readonly Regex _pattern;
|
|
||||||
private readonly string _replace;
|
|
||||||
|
|
||||||
public TextReplaceModifier(string pattern, string replace)
|
|
||||||
{
|
|
||||||
_pattern = new Regex(pattern);
|
|
||||||
_replace = replace;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ModifyText(StringBuilder sb, string text)
|
|
||||||
{
|
|
||||||
if (!_pattern.IsMatch(text)) return false;
|
|
||||||
|
|
||||||
sb.AppendLine(_pattern.Replace(text, _replace));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: afc6ba9550e5e4c25951b03db43a4fd0
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,598 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEditor.UI;
|
|
||||||
using UnityEditorInternal;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
using UnityEditor.Overlays;
|
|
||||||
#else
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using Object = UnityEngine.Object;
|
|
||||||
#endif
|
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
using UnityEditor.SceneManagement;
|
|
||||||
#elif UNITY_2018_3_OR_NEWER
|
|
||||||
using UnityEditor.Experimental.SceneManagement;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Coffee.UIExtensions
|
|
||||||
{
|
|
||||||
[CustomEditor(typeof(UIParticle))]
|
|
||||||
[CanEditMultipleObjects]
|
|
||||||
internal class UIParticleEditor : GraphicEditor
|
|
||||||
{
|
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
[Overlay(typeof(SceneView), "Scene View/UI Particles", "UI Particles", true,
|
|
||||||
defaultDockPosition = DockPosition.Bottom,
|
|
||||||
defaultDockZone = DockZone.Floating,
|
|
||||||
defaultLayout = Layout.Panel)]
|
|
||||||
#else
|
|
||||||
[Overlay(typeof(SceneView), "Scene View/UI Particles", "UI Particles", true)]
|
|
||||||
#endif
|
|
||||||
private class UIParticleOverlay : IMGUIOverlay, ITransientOverlay
|
|
||||||
{
|
|
||||||
public bool visible => s_SerializedObject != null;
|
|
||||||
|
|
||||||
public override void OnGUI()
|
|
||||||
{
|
|
||||||
if (visible)
|
|
||||||
{
|
|
||||||
WindowFunction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//################################
|
|
||||||
// Constant or Static Members.
|
|
||||||
//################################
|
|
||||||
private static readonly GUIContent s_ContentRenderingOrder = new GUIContent("Rendering Order");
|
|
||||||
private static readonly GUIContent s_ContentRefresh = new GUIContent("Refresh");
|
|
||||||
private static readonly GUIContent s_ContentFix = new GUIContent("Fix");
|
|
||||||
private static readonly GUIContent s_ContentMaterial = new GUIContent("Material");
|
|
||||||
private static readonly GUIContent s_ContentTrailMaterial = new GUIContent("Trail Material");
|
|
||||||
private static readonly GUIContent s_Content3D = new GUIContent("3D");
|
|
||||||
private static readonly GUIContent s_ContentRandom = new GUIContent("Random");
|
|
||||||
private static readonly GUIContent s_ContentScale = new GUIContent("Scale");
|
|
||||||
private static SerializedObject s_SerializedObject;
|
|
||||||
private static bool s_XYZMode;
|
|
||||||
|
|
||||||
private SerializedProperty _maskable;
|
|
||||||
private SerializedProperty _scale3D;
|
|
||||||
private SerializedProperty _animatableProperties;
|
|
||||||
private SerializedProperty _meshSharing;
|
|
||||||
private SerializedProperty _groupId;
|
|
||||||
private SerializedProperty _groupMaxId;
|
|
||||||
private SerializedProperty _positionMode;
|
|
||||||
private SerializedProperty _autoScalingMode;
|
|
||||||
private ReorderableList _ro;
|
|
||||||
private bool _showMax;
|
|
||||||
|
|
||||||
private static readonly HashSet<Shader> s_Shaders = new HashSet<Shader>();
|
|
||||||
#if UNITY_2018 || UNITY_2019
|
|
||||||
private static readonly List<ParticleSystemVertexStream> s_Streams = new List<ParticleSystemVertexStream>();
|
|
||||||
#endif
|
|
||||||
private static readonly List<string> s_MaskablePropertyNames = new List<string>
|
|
||||||
{
|
|
||||||
"_Stencil",
|
|
||||||
"_StencilComp",
|
|
||||||
"_StencilOp",
|
|
||||||
"_StencilWriteMask",
|
|
||||||
"_StencilReadMask",
|
|
||||||
"_ColorMask"
|
|
||||||
};
|
|
||||||
|
|
||||||
[InitializeOnLoadMethod]
|
|
||||||
private static void Init()
|
|
||||||
{
|
|
||||||
#if !UNITY_2021_2_OR_NEWER
|
|
||||||
var miSceneViewOverlayWindow = Type.GetType("UnityEditor.SceneViewOverlay, UnityEditor")
|
|
||||||
?.GetMethods(BindingFlags.Public | BindingFlags.Static)
|
|
||||||
.First(x => x.Name == "Window" && 5 <= x.GetParameters().Length);
|
|
||||||
var windowFunction = (Action<Object, SceneView>)WindowFunction;
|
|
||||||
var windowFunctionType = Type.GetType("UnityEditor.SceneViewOverlay+WindowFunction, UnityEditor");
|
|
||||||
var windowFunctionDelegate = Delegate.CreateDelegate(windowFunctionType, windowFunction.Method);
|
|
||||||
var windowTitle = new GUIContent(ObjectNames.NicifyVariableName(nameof(UIParticle)));
|
|
||||||
#if UNITY_2019_2_OR_NEWER
|
|
||||||
//public static void Window(GUIContent title, WindowFunction sceneViewFunc, int order, Object target, WindowDisplayOption option, EditorWindow window = null)
|
|
||||||
var sceneViewArgs = new object[] { windowTitle, windowFunctionDelegate, 599, null, 2, null };
|
|
||||||
#else
|
|
||||||
//public static void Window(GUIContent title, WindowFunction sceneViewFunc, int order, Object target, WindowDisplayOption option)
|
|
||||||
var sceneViewArgs = new object[] { windowTitle, windowFunctionDelegate, 599, null, 2 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if UNITY_2019_1_OR_NEWER
|
|
||||||
SceneView.duringSceneGui += _ =>
|
|
||||||
#else
|
|
||||||
SceneView.onSceneGUIDelegate += _ =>
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
if (s_SerializedObject != null)
|
|
||||||
{
|
|
||||||
miSceneViewOverlayWindow.Invoke(null, sceneViewArgs);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SerializedObject CreateSerializeObject()
|
|
||||||
{
|
|
||||||
var uiParticles = Selection.gameObjects.Select(x => x.GetComponent<ParticleSystem>())
|
|
||||||
.Where(x => x)
|
|
||||||
.Select(x => x.GetComponentInParent<UIParticle>(true))
|
|
||||||
.Where(x => x && x.canvas)
|
|
||||||
.Concat(Selection.gameObjects.Select(x => x.GetComponent<UIParticle>())
|
|
||||||
.Where(x => x && x.canvas))
|
|
||||||
.Distinct()
|
|
||||||
.OfType<Object>()
|
|
||||||
.ToArray();
|
|
||||||
return 0 < uiParticles.Length ? new SerializedObject(uiParticles) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
s_SerializedObject = CreateSerializeObject();
|
|
||||||
Selection.selectionChanged += () => s_SerializedObject = CreateSerializeObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
//################################
|
|
||||||
// Public/Protected Members.
|
|
||||||
//################################
|
|
||||||
/// <summary>
|
|
||||||
/// This function is called when the object becomes enabled and active.
|
|
||||||
/// </summary>
|
|
||||||
protected override void OnEnable()
|
|
||||||
{
|
|
||||||
base.OnEnable();
|
|
||||||
|
|
||||||
_maskable = serializedObject.FindProperty("m_Maskable");
|
|
||||||
_scale3D = serializedObject.FindProperty("m_Scale3D");
|
|
||||||
_animatableProperties = serializedObject.FindProperty("m_AnimatableProperties");
|
|
||||||
_meshSharing = serializedObject.FindProperty("m_MeshSharing");
|
|
||||||
_groupId = serializedObject.FindProperty("m_GroupId");
|
|
||||||
_groupMaxId = serializedObject.FindProperty("m_GroupMaxId");
|
|
||||||
_positionMode = serializedObject.FindProperty("m_PositionMode");
|
|
||||||
_autoScalingMode = serializedObject.FindProperty("m_AutoScalingMode");
|
|
||||||
|
|
||||||
var sp = serializedObject.FindProperty("m_Particles");
|
|
||||||
_ro = new ReorderableList(sp.serializedObject, sp, true, true, true, true)
|
|
||||||
{
|
|
||||||
elementHeight = EditorGUIUtility.singleLineHeight * 3 + 4,
|
|
||||||
elementHeightCallback = _ => 3 * (EditorGUIUtility.singleLineHeight + 2),
|
|
||||||
drawElementCallback = (rect, index, _, __) =>
|
|
||||||
{
|
|
||||||
EditorGUI.BeginDisabledGroup(sp.hasMultipleDifferentValues);
|
|
||||||
rect.y += 1;
|
|
||||||
rect.height = EditorGUIUtility.singleLineHeight;
|
|
||||||
var p = sp.GetArrayElementAtIndex(index);
|
|
||||||
EditorGUI.ObjectField(rect, p, GUIContent.none);
|
|
||||||
rect.x += 15;
|
|
||||||
rect.width -= 15;
|
|
||||||
var ps = p.objectReferenceValue as ParticleSystem;
|
|
||||||
var materials = ps
|
|
||||||
? new SerializedObject(ps.GetComponent<ParticleSystemRenderer>()).FindProperty("m_Materials")
|
|
||||||
: null;
|
|
||||||
rect.y += rect.height + 1;
|
|
||||||
MaterialField(rect, s_ContentMaterial, materials, 0);
|
|
||||||
rect.y += rect.height + 1;
|
|
||||||
MaterialField(rect, s_ContentTrailMaterial, materials, 1);
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
if (materials != null && materials.serializedObject.hasModifiedProperties)
|
|
||||||
{
|
|
||||||
materials.serializedObject.ApplyModifiedProperties();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
drawHeaderCallback = rect =>
|
|
||||||
{
|
|
||||||
#if !UNITY_2019_3_OR_NEWER
|
|
||||||
rect.y -= 1;
|
|
||||||
#endif
|
|
||||||
var pos = new Rect(rect.x, rect.y, 150, rect.height);
|
|
||||||
EditorGUI.LabelField(pos, s_ContentRenderingOrder);
|
|
||||||
|
|
||||||
pos = new Rect(rect.width - 35, rect.y, 60, rect.height);
|
|
||||||
if (GUI.Button(pos, s_ContentRefresh, EditorStyles.miniButton))
|
|
||||||
{
|
|
||||||
foreach (var uip in targets.OfType<UIParticle>())
|
|
||||||
{
|
|
||||||
uip.RefreshParticles();
|
|
||||||
EditorUtility.SetDirty(uip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// On select UIParticle, refresh particles.
|
|
||||||
if (!Application.isPlaying)
|
|
||||||
{
|
|
||||||
foreach (var uip in targets.OfType<UIParticle>())
|
|
||||||
{
|
|
||||||
if (PrefabUtility.GetPrefabAssetType(uip) != PrefabAssetType.NotAPrefab) continue;
|
|
||||||
uip.RefreshParticles(uip.particles);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void MaterialField(Rect rect, GUIContent label, SerializedProperty sp, int index)
|
|
||||||
{
|
|
||||||
if (sp == null || sp.arraySize <= index)
|
|
||||||
{
|
|
||||||
EditorGUI.BeginDisabledGroup(true);
|
|
||||||
EditorGUI.ObjectField(rect, label, null, typeof(Material), true);
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
EditorGUI.PropertyField(rect, sp.GetArrayElementAtIndex(index), label);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Implement this function to make a custom inspector.
|
|
||||||
/// </summary>
|
|
||||||
public override void OnInspectorGUI()
|
|
||||||
{
|
|
||||||
var current = target as UIParticle;
|
|
||||||
if (!current) return;
|
|
||||||
|
|
||||||
serializedObject.Update();
|
|
||||||
|
|
||||||
// Maskable
|
|
||||||
EditorGUILayout.PropertyField(_maskable);
|
|
||||||
|
|
||||||
// Scale
|
|
||||||
EditorGUI.BeginDisabledGroup(!_meshSharing.hasMultipleDifferentValues && _meshSharing.intValue == 4);
|
|
||||||
s_XYZMode = DrawFloatOrVector3Field(_scale3D, s_XYZMode);
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
|
|
||||||
// AnimatableProperties
|
|
||||||
var mats = current.particles
|
|
||||||
.Where(x => x)
|
|
||||||
.Select(x => x.GetComponent<ParticleSystemRenderer>().sharedMaterial)
|
|
||||||
.Where(x => x)
|
|
||||||
.ToArray();
|
|
||||||
|
|
||||||
AnimatablePropertyEditor.Draw(_animatableProperties, mats);
|
|
||||||
|
|
||||||
// Mesh sharing
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
_showMax = DrawMeshSharing(_meshSharing, _groupId, _groupMaxId, _showMax);
|
|
||||||
if (EditorGUI.EndChangeCheck())
|
|
||||||
{
|
|
||||||
serializedObject.ApplyModifiedProperties();
|
|
||||||
foreach (var uip in targets.OfType<UIParticle>())
|
|
||||||
{
|
|
||||||
uip.ResetGroupId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Position Mode
|
|
||||||
EditorGUILayout.PropertyField(_positionMode);
|
|
||||||
|
|
||||||
// Auto Scaling
|
|
||||||
DrawAutoScaling(_autoScalingMode, targets.OfType<UIParticle>());
|
|
||||||
|
|
||||||
// Target ParticleSystems.
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
EditorGUI.BeginDisabledGroup(targets.OfType<UIParticle>().Any(x => !x.canvas));
|
|
||||||
_ro.DoLayoutList();
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
serializedObject.ApplyModifiedProperties();
|
|
||||||
if (EditorGUI.EndChangeCheck())
|
|
||||||
{
|
|
||||||
foreach (var uip in targets.OfType<UIParticle>())
|
|
||||||
{
|
|
||||||
uip.RefreshParticles(uip.particles);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Non-UI built-in shader is not supported.
|
|
||||||
foreach (var mat in current.materials)
|
|
||||||
{
|
|
||||||
if (!mat || !mat.shader) continue;
|
|
||||||
var shader = mat.shader;
|
|
||||||
if (IsBuiltInObject(shader) && !shader.name.StartsWith("UI/"))
|
|
||||||
{
|
|
||||||
EditorGUILayout.HelpBox(
|
|
||||||
$"Built-in shader '{shader.name}' in '{mat.name}' is not supported.\n" +
|
|
||||||
"Use UI shaders instead.",
|
|
||||||
MessageType.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Does the shader support UI masks?
|
|
||||||
if (current.maskable && current.GetComponentInParent<Mask>(false))
|
|
||||||
{
|
|
||||||
foreach (var mat in current.materials)
|
|
||||||
{
|
|
||||||
if (!mat || !mat.shader) continue;
|
|
||||||
var shader = mat.shader;
|
|
||||||
if (s_Shaders.Contains(shader)) continue;
|
|
||||||
s_Shaders.Add(shader);
|
|
||||||
foreach (var propName in s_MaskablePropertyNames)
|
|
||||||
{
|
|
||||||
if (mat.HasProperty(propName)) continue;
|
|
||||||
|
|
||||||
EditorGUILayout.HelpBox(
|
|
||||||
$"Shader '{shader.name}' doesn't have '{propName}' property." +
|
|
||||||
"\nThis graphic cannot be masked.",
|
|
||||||
MessageType.Warning);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s_Shaders.Clear();
|
|
||||||
|
|
||||||
// UIParticle for trail should be removed.
|
|
||||||
var label = "This UIParticle component should be removed. The UIParticle for trails is no longer needed.";
|
|
||||||
#pragma warning disable CS0612
|
|
||||||
if (FixButton(current.m_IsTrail, label))
|
|
||||||
#pragma warning restore CS0612
|
|
||||||
{
|
|
||||||
DestroyUIParticle(current);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_2018 || UNITY_2019
|
|
||||||
// (2018, 2019) Check to use 'TEXCOORD*.zw' components as custom vertex stream.
|
|
||||||
var allPsRenderers = targets.OfType<UIParticle>()
|
|
||||||
.SelectMany(x => x.particles)
|
|
||||||
.Where(x => x)
|
|
||||||
.Select(x => x.GetComponent<ParticleSystemRenderer>())
|
|
||||||
.ToArray();
|
|
||||||
if (0 < allPsRenderers.Length)
|
|
||||||
{
|
|
||||||
// Check to use 'TEXCOORD*.zw' components as custom vertex stream.
|
|
||||||
foreach (var psr in allPsRenderers)
|
|
||||||
{
|
|
||||||
if (!new SerializedObject(psr).FindProperty("m_UseCustomVertexStreams").boolValue) continue;
|
|
||||||
if (psr.activeVertexStreamsCount == 0) continue;
|
|
||||||
psr.GetActiveVertexStreams(s_Streams);
|
|
||||||
|
|
||||||
if (2 < s_Streams.Select(GetUsedComponentCount).Sum())
|
|
||||||
{
|
|
||||||
EditorGUILayout.HelpBox(
|
|
||||||
$"ParticleSystem '{psr.name}' uses 'TEXCOORD*.zw' components as custom vertex stream.\n" +
|
|
||||||
"UIParticle does not support it (See README.md).",
|
|
||||||
MessageType.Warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
s_Streams.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsBuiltInObject(Object obj)
|
|
||||||
{
|
|
||||||
return AssetDatabase.TryGetGUIDAndLocalFileIdentifier(obj, out var guid, out long _)
|
|
||||||
&& Regex.IsMatch(guid, "^0{16}.0{15}$", RegexOptions.Compiled);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_2018 || UNITY_2019
|
|
||||||
private static int GetUsedComponentCount(ParticleSystemVertexStream s)
|
|
||||||
{
|
|
||||||
switch (s)
|
|
||||||
{
|
|
||||||
case ParticleSystemVertexStream.Position:
|
|
||||||
case ParticleSystemVertexStream.Normal:
|
|
||||||
case ParticleSystemVertexStream.Tangent:
|
|
||||||
case ParticleSystemVertexStream.Color:
|
|
||||||
return 0;
|
|
||||||
case ParticleSystemVertexStream.UV:
|
|
||||||
case ParticleSystemVertexStream.UV2:
|
|
||||||
case ParticleSystemVertexStream.UV3:
|
|
||||||
case ParticleSystemVertexStream.UV4:
|
|
||||||
case ParticleSystemVertexStream.SizeXY:
|
|
||||||
case ParticleSystemVertexStream.StableRandomXY:
|
|
||||||
case ParticleSystemVertexStream.VaryingRandomXY:
|
|
||||||
case ParticleSystemVertexStream.Custom1XY:
|
|
||||||
case ParticleSystemVertexStream.Custom2XY:
|
|
||||||
case ParticleSystemVertexStream.NoiseSumXY:
|
|
||||||
case ParticleSystemVertexStream.NoiseImpulseXY:
|
|
||||||
return 2;
|
|
||||||
case ParticleSystemVertexStream.AnimBlend:
|
|
||||||
case ParticleSystemVertexStream.AnimFrame:
|
|
||||||
case ParticleSystemVertexStream.VertexID:
|
|
||||||
case ParticleSystemVertexStream.SizeX:
|
|
||||||
case ParticleSystemVertexStream.Rotation:
|
|
||||||
case ParticleSystemVertexStream.RotationSpeed:
|
|
||||||
case ParticleSystemVertexStream.Velocity:
|
|
||||||
case ParticleSystemVertexStream.Speed:
|
|
||||||
case ParticleSystemVertexStream.AgePercent:
|
|
||||||
case ParticleSystemVertexStream.InvStartLifetime:
|
|
||||||
case ParticleSystemVertexStream.StableRandomX:
|
|
||||||
case ParticleSystemVertexStream.VaryingRandomX:
|
|
||||||
case ParticleSystemVertexStream.Custom1X:
|
|
||||||
case ParticleSystemVertexStream.Custom2X:
|
|
||||||
case ParticleSystemVertexStream.NoiseSumX:
|
|
||||||
case ParticleSystemVertexStream.NoiseImpulseX:
|
|
||||||
return 1;
|
|
||||||
case ParticleSystemVertexStream.Center:
|
|
||||||
case ParticleSystemVertexStream.SizeXYZ:
|
|
||||||
case ParticleSystemVertexStream.Rotation3D:
|
|
||||||
case ParticleSystemVertexStream.RotationSpeed3D:
|
|
||||||
case ParticleSystemVertexStream.StableRandomXYZ:
|
|
||||||
case ParticleSystemVertexStream.VaryingRandomXYZ:
|
|
||||||
case ParticleSystemVertexStream.Custom1XYZ:
|
|
||||||
case ParticleSystemVertexStream.Custom2XYZ:
|
|
||||||
case ParticleSystemVertexStream.NoiseSumXYZ:
|
|
||||||
case ParticleSystemVertexStream.NoiseImpulseXYZ:
|
|
||||||
return 3;
|
|
||||||
case ParticleSystemVertexStream.StableRandomXYZW:
|
|
||||||
case ParticleSystemVertexStream.VaryingRandomXYZW:
|
|
||||||
case ParticleSystemVertexStream.Custom1XYZW:
|
|
||||||
case ParticleSystemVertexStream.Custom2XYZW:
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private static bool DrawMeshSharing(SerializedProperty spMeshSharing, SerializedProperty spGroupId,
|
|
||||||
SerializedProperty spGroupMaxId, bool showMax)
|
|
||||||
{
|
|
||||||
showMax |= spGroupId.intValue != spGroupMaxId.intValue ||
|
|
||||||
spGroupId.hasMultipleDifferentValues ||
|
|
||||||
spGroupMaxId.hasMultipleDifferentValues;
|
|
||||||
|
|
||||||
EditorGUILayout.BeginHorizontal();
|
|
||||||
EditorGUILayout.PropertyField(spMeshSharing);
|
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
showMax = GUILayout.Toggle(showMax, s_ContentRandom, EditorStyles.miniButton, GUILayout.Width(60));
|
|
||||||
if (EditorGUI.EndChangeCheck() && !showMax)
|
|
||||||
{
|
|
||||||
spGroupMaxId.intValue = spGroupId.intValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
EditorGUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
EditorGUI.BeginDisabledGroup(spMeshSharing.intValue == 0);
|
|
||||||
EditorGUI.indentLevel++;
|
|
||||||
EditorGUILayout.PropertyField(spGroupId);
|
|
||||||
if (showMax)
|
|
||||||
{
|
|
||||||
EditorGUILayout.PropertyField(spGroupMaxId);
|
|
||||||
}
|
|
||||||
else if (spMeshSharing.intValue == 1 || spMeshSharing.intValue == 4)
|
|
||||||
{
|
|
||||||
EditorGUI.BeginDisabledGroup(true);
|
|
||||||
var obj = UIParticleUpdater.GetPrimary(spGroupId.intValue);
|
|
||||||
EditorGUILayout.ObjectField("Primary", obj, typeof(UIParticle), false);
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
EditorGUI.indentLevel--;
|
|
||||||
EditorGUI.EndDisabledGroup();
|
|
||||||
|
|
||||||
return showMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void DrawAutoScaling(SerializedProperty prop, IEnumerable<UIParticle> uiParticles)
|
|
||||||
{
|
|
||||||
var isTransformMode = prop.intValue == (int)UIParticle.AutoScalingMode.Transform;
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
EditorGUILayout.PropertyField(prop);
|
|
||||||
if (!EditorGUI.EndChangeCheck() || !isTransformMode) return;
|
|
||||||
|
|
||||||
// on changed true->false, reset scale.
|
|
||||||
EditorApplication.delayCall += () =>
|
|
||||||
{
|
|
||||||
foreach (var uip in uiParticles)
|
|
||||||
{
|
|
||||||
if (!uip) continue;
|
|
||||||
uip.transform.localScale = Vector3.one;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
private static void WindowFunction()
|
|
||||||
#else
|
|
||||||
private static void WindowFunction(Object _, SceneView __)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (s_SerializedObject == null || !s_SerializedObject.targetObject) return;
|
|
||||||
var uiParticles = s_SerializedObject.targetObjects.OfType<UIParticle>().ToArray();
|
|
||||||
if (uiParticles.Any(x => !x || !x.canvas)) return;
|
|
||||||
|
|
||||||
s_SerializedObject.Update();
|
|
||||||
using (new EditorGUILayout.VerticalScope(GUILayout.Width(220f)))
|
|
||||||
{
|
|
||||||
var labelWidth = EditorGUIUtility.labelWidth;
|
|
||||||
EditorGUIUtility.labelWidth = 100;
|
|
||||||
EditorGUILayout.PropertyField(s_SerializedObject.FindProperty("m_Enabled"));
|
|
||||||
s_XYZMode = DrawFloatOrVector3Field(s_SerializedObject.FindProperty("m_Scale3D"), s_XYZMode);
|
|
||||||
EditorGUILayout.PropertyField(s_SerializedObject.FindProperty("m_PositionMode"));
|
|
||||||
DrawAutoScaling(s_SerializedObject.FindProperty("m_AutoScalingMode"), uiParticles);
|
|
||||||
EditorGUIUtility.labelWidth = labelWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
s_SerializedObject.ApplyModifiedProperties();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DestroyUIParticle(UIParticle p, bool ignoreCurrent = false)
|
|
||||||
{
|
|
||||||
if (!p || (ignoreCurrent && target == p)) return;
|
|
||||||
|
|
||||||
var cr = p.canvasRenderer;
|
|
||||||
DestroyImmediate(p);
|
|
||||||
DestroyImmediate(cr);
|
|
||||||
|
|
||||||
#if UNITY_2018_3_OR_NEWER
|
|
||||||
var stage = PrefabStageUtility.GetCurrentPrefabStage();
|
|
||||||
if (stage != null && stage.scene.isLoaded)
|
|
||||||
{
|
|
||||||
#if UNITY_2020_1_OR_NEWER
|
|
||||||
var prefabAssetPath = stage.assetPath;
|
|
||||||
#else
|
|
||||||
var prefabAssetPath = stage.prefabAssetPath;
|
|
||||||
#endif
|
|
||||||
PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, prefabAssetPath);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool FixButton(bool show, string text)
|
|
||||||
{
|
|
||||||
if (!show) return false;
|
|
||||||
using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(true)))
|
|
||||||
{
|
|
||||||
EditorGUILayout.HelpBox(text, MessageType.Warning, true);
|
|
||||||
using (new EditorGUILayout.VerticalScope())
|
|
||||||
{
|
|
||||||
return GUILayout.Button(s_ContentFix, GUILayout.Width(30));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool DrawFloatOrVector3Field(SerializedProperty sp, bool showXyz)
|
|
||||||
{
|
|
||||||
var x = sp.FindPropertyRelative("x");
|
|
||||||
var y = sp.FindPropertyRelative("y");
|
|
||||||
var z = sp.FindPropertyRelative("z");
|
|
||||||
|
|
||||||
showXyz |= !Mathf.Approximately(x.floatValue, y.floatValue) ||
|
|
||||||
!Mathf.Approximately(y.floatValue, z.floatValue) ||
|
|
||||||
y.hasMultipleDifferentValues ||
|
|
||||||
z.hasMultipleDifferentValues;
|
|
||||||
|
|
||||||
EditorGUILayout.BeginHorizontal();
|
|
||||||
if (showXyz)
|
|
||||||
{
|
|
||||||
EditorGUILayout.PropertyField(sp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
EditorGUILayout.PropertyField(x, s_ContentScale);
|
|
||||||
if (EditorGUI.EndChangeCheck())
|
|
||||||
{
|
|
||||||
y.floatValue = z.floatValue = x.floatValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
|
||||||
showXyz = GUILayout.Toggle(showXyz, s_Content3D, EditorStyles.miniButton, GUILayout.Width(30));
|
|
||||||
if (EditorGUI.EndChangeCheck() && !showXyz)
|
|
||||||
{
|
|
||||||
z.floatValue = y.floatValue = x.floatValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
EditorGUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
return showXyz;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 7a55e246f37df405bac88eac692e3a86
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 418 B |
@@ -1,127 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 5f0675613942149309588d556e33d990
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 12
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
flipGreenChannel: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMipmapLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 0
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 2
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
swizzle: 50462976
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 64
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Server
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable: {}
|
|
||||||
mipmapLimitGroupName:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,483 +0,0 @@
|
|||||||
# Particle Effect For UGUI (UI Particle)
|
|
||||||
|
|
||||||
This package provides a component to render particle effects for uGUI in Unity 2018.2 or later.
|
|
||||||
The particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.
|
|
||||||
|
|
||||||
[](https://openupm.com/packages/com.coffee.ui-particle/)
|
|
||||||
[](https://github.com/mob-sakai/ParticleEffectForUGUI/releases)
|
|
||||||
[](https://github.com/mob-sakai/ParticleEffectForUGUI/blob/main/LICENSE.txt)
|
|
||||||

|
|
||||||

|
|
||||||
[](http://makeapullrequest.com)
|
|
||||||
[](https://twitter.com/intent/follow?screen_name=mob_sakai)
|
|
||||||
|
|
||||||
<< [📝 Description](#-description) | [🎮 Demo](#-demo) | [⚙ Installation](#-installation) | [🚀 Usage](#-usage) | [🛠 Development Note](#-development-note) | [🤝 Contributing](#-contributing) >>
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 📝 Description
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
This package utilizes the new APIs `MeshBake/MashTrailBake` (introduced with Unity 2018.2) to render particles through
|
|
||||||
CanvasRenderer.
|
|
||||||
You can render, mask, and sort your ParticleSystems for UI without the necessity of an additional Camera, RenderTexture,
|
|
||||||
or Canvas.
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Easy to use: The package is ready to use out of the box.
|
|
||||||
* Sort particle effects and other UI by sibling index.
|
|
||||||
* No extra Camera, RenderTexture, or Canvas required.
|
|
||||||
* Masking options for Mask or RectMask2D.
|
|
||||||
* Support for the Trail module.
|
|
||||||
* Support for CanvasGroup alpha.
|
|
||||||
* No allocations needed to render particles.
|
|
||||||
* Compatibility with overlay, camera space, and world space.
|
|
||||||
* Support for Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP).
|
|
||||||
* Support for disabling `Enter Play Mode Options > Reload Domain`.
|
|
||||||
* Support for changing material property with AnimationClip (AnimatableProperty).
|
|
||||||
![AnimatableProperty.gif][AnimatableProperty.gif]
|
|
||||||
* [4.0.0+] Support for 8+ materials.
|
|
||||||
* [4.0.0+] Correct world space particle position adjustment when changing window size for standalone platforms (Windows,
|
|
||||||
MacOSX, and Linux).
|
|
||||||
* [4.0.0+] Adaptive scaling for UI.
|
|
||||||
* [4.0.0+] Mesh sharing group to improve performance.
|
|
||||||
![MeshSharing.gif][MeshSharing.gif]
|
|
||||||
* [4.0.0+] Particle attractor component.
|
|
||||||
![ParticleAttractor.gif][ParticleAttractor.gif]
|
|
||||||
* [4.1.0+] Relative/Absolute particle position mode.
|
|
||||||
![AbsolutePosition.gif][AbsolutePosition.gif]
|
|
||||||
|
|
||||||
[AnimatableProperty.gif]: https://user-images.githubusercontent.com/12690315/53286323-2d94a980-37b0-11e9-8afb-c4a207805ff2.gif
|
|
||||||
|
|
||||||
[MeshSharing.gif]: https://user-images.githubusercontent.com/12690315/174311048-c882df81-6c34-4eba-b0aa-5645457692f1.gif
|
|
||||||
|
|
||||||
[ParticleAttractor.gif]: https://user-images.githubusercontent.com/12690315/174311027-462929a4-13f0-4ec4-86ea-9c832f2eecf1.gif
|
|
||||||
|
|
||||||
[AbsolutePosition.gif]: https://user-images.githubusercontent.com/12690315/175751579-5a2357e8-2ecf-4afd-83c8-66e9771bde39.gif
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 🎮 Demo
|
|
||||||
|
|
||||||
* [WebGL Demo](https://mob-sakai.github.io/demos/UIParticle_Demo/index.html)
|
|
||||||
|
|
||||||
> 
|
|
||||||
|
|
||||||
* [WebGL Demo (Cartoon FX & War FX)](https://mob-sakai.github.io/Demos/ParticleEffectForUGUI_CFX)
|
|
||||||
* [Cartoon FX Free][CFX] & [War FX][WFX] (by [Jean Moreno (JMO)][JMO]) with UIParticle
|
|
||||||
|
|
||||||
> 
|
|
||||||
|
|
||||||
[CFX]: https://assetstore.unity.com/packages/vfx/particles/cartoon-fx-free-109565
|
|
||||||
|
|
||||||
[WFX]: https://assetstore.unity.com/packages/vfx/particles/war-fx-5669
|
|
||||||
|
|
||||||
[JMO]: https://assetstore.unity.com/publishers/1669
|
|
||||||
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## ⚙ Installation
|
|
||||||
|
|
||||||
_This package requires Unity 2018.3 or later._
|
|
||||||
|
|
||||||
#### Install via OpenUPM
|
|
||||||
|
|
||||||
This package is available on [OpenUPM](https://openupm.com) package registry.
|
|
||||||
This is the preferred method of installation, as you can easily receive updates as they're released.
|
|
||||||
|
|
||||||
If you have [openupm-cli](https://github.com/openupm/openupm-cli) installed, then run the following command in your
|
|
||||||
project's directory:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
openupm add com.coffee.ui-particle
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Install via UPM (using Git URL)
|
|
||||||
|
|
||||||
Navigate to your project's Packages folder and open the `manifest.json` file. Then add this package somewhere in
|
|
||||||
the `dependencies` block:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git",
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
To update the package, change suffix `#{version}` to the target version.
|
|
||||||
|
|
||||||
* e.g. `"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#4.6.0",`
|
|
||||||
|
|
||||||
Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension) to install and update the package.
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 🚀 Usage
|
|
||||||
|
|
||||||
### UIParticle Component
|
|
||||||
|
|
||||||
`UIParticle` controls the ParticleSystems that are attached to its own game objects and child game objects.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **Maskable**: Does this graphic allow masking.
|
|
||||||
- **Scale**: Scale the rendering. When the `3D` toggle is enabled, 3D scale (x, y, z) is supported.
|
|
||||||
- **Animatable Properties**: If you want to update material properties (e.g., `_MainTex_ST`, `_Color`) in AnimationClip,
|
|
||||||
use this to mark the changes.
|
|
||||||
- **Mesh Sharing**: Particle simulation results are shared within the same group. A large number of the same effects can
|
|
||||||
be displayed with a small load. When the `Random` toggle is enabled, it will be grouped randomly.
|
|
||||||
- **Position Mode**: Emission position mode.
|
|
||||||
- **Absolute:** Emit from the world position of the `ParticleSystem`.
|
|
||||||
- **Relative:** Emit from the scaled position of the `ParticleSystem`.
|
|
||||||
- **Auto Scaling**: `Transform.lossyScale` (=world scale) will be set to `(1, 1, 1)` on update. It prevents the
|
|
||||||
root-Canvas scale from affecting the hierarchy-scaled `ParticleSystem`.
|
|
||||||
- **Rendering Order**: The ParticleSystem list to be rendered. You can change the order and the materials.
|
|
||||||
|
|
||||||
**NOTE:** Press the `Refresh` button to reconstruct the rendering order based on children ParticleSystem's sorting order
|
|
||||||
and z-position.
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
#### Basic Usage
|
|
||||||
|
|
||||||
1. Select `GameObject/UI/ParticleSystem` to create UIParticle with a ParticleSystem.
|
|
||||||

|
|
||||||
2. Adjust the ParticleSystem as you like.
|
|
||||||

|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
#### With Your Existing ParticleSystem Prefab
|
|
||||||
|
|
||||||
1. Select `GameObject/UI/ParticleSystem (Empty)` to create UIParticle.
|
|
||||||

|
|
||||||
2. Drag and drop your ParticleSystem prefab onto UIParticle.
|
|
||||||

|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
#### With `Mask` or `RectMask2D` Component
|
|
||||||
|
|
||||||
If you want to mask particles, set a stencil-supported shader (such as `UI/UIAdditive`) to the material for
|
|
||||||
ParticleSystem.
|
|
||||||
If you use some custom shaders, see
|
|
||||||
the [How to Make a Custom Shader to Support Mask/RectMask2D Component](#how-to-make-a-custom-shader-to-support-maskrectmask2d-component)
|
|
||||||
section.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
### Script usage
|
|
||||||
|
|
||||||
```cs
|
|
||||||
// Instant ParticleSystem prefab with UIParticle on runtime.
|
|
||||||
var go = GameObject.Instantiate(prefab);
|
|
||||||
var uiParticle = go.AddComponent<UIParticle>();
|
|
||||||
|
|
||||||
// Control by ParticleSystem.
|
|
||||||
particleSystem.Play();
|
|
||||||
particleSystem.Emit(10);
|
|
||||||
|
|
||||||
// Control by UIParticle.
|
|
||||||
uiParticle.Play();
|
|
||||||
uiParticle.Stop();
|
|
||||||
```
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
### UIParticleAttractor component
|
|
||||||
|
|
||||||
`UIParticleAttractor` attracts particles generated by the specified ParticleSystem.
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
- **Particle System**: Attracts particles generated by the specified particle system.
|
|
||||||
- **Destination Radius**: Once the particle is within the radius, the particle lifetime will become 0, and `OnAttracted`
|
|
||||||
will be called.
|
|
||||||
- **Delay Rate**: Delay to start attracting. It is a percentage of the particle's start lifetime.
|
|
||||||
- **Max Speed**: Maximum speed of attracting. If this value is too small, attracting may not be completed by the end of
|
|
||||||
the lifetime, and `OnAttracted` may not be called.
|
|
||||||
- **Movement**: Attracting movement type. (`Linear`, `Smooth`, `Sphere`)
|
|
||||||
- **Update Mode**: Update mode.
|
|
||||||
- **Normal:** Update with scaled delta time.
|
|
||||||
- **Unscaled Time:** Update with unscaled delta time.
|
|
||||||
- **OnAttracted**: An event called when attracting is complete (per particle).
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 🛠 Development Note
|
|
||||||
|
|
||||||
### Compares the Baking mesh approach with the conventional approach
|
|
||||||
|
|
||||||
- **Baking mesh approach (=UIParticle)**
|
|
||||||

|
|
||||||
- ✅ Rendered as is.
|
|
||||||
- ✅ Maskable.
|
|
||||||
- ✅ Sortable.
|
|
||||||
- ✅ Less objects.
|
|
||||||
|
|
||||||
- **Do nothing (=Plain ParticleSystem)**
|
|
||||||

|
|
||||||
- ✅ Rendered as is.
|
|
||||||
- ❌ Looks like a glitch.
|
|
||||||
- ❌ Not maskable.
|
|
||||||
- ❌ Not sortable.
|
|
||||||
|
|
||||||
- **Convert particle to UIVertex (=[UIParticleSystem][UIParticleSystem])**
|
|
||||||

|
|
||||||
- ✅ Maskable.
|
|
||||||
- ✅ Sortable.
|
|
||||||
- ❌ Adjustment is difficult.
|
|
||||||
- ❌ Requires UI shaders.
|
|
||||||
- ❌ Difficult to adjust scale.
|
|
||||||
- ❌ Force hierarchy scalling.
|
|
||||||
- ❌ Simulation results are incorrect.
|
|
||||||
- ❌ Trail, rotation of transform, time scaling are not supported.
|
|
||||||
- ❌ Generate heavy GC every frame.
|
|
||||||
|
|
||||||
- **Use Canvas to sort (Sorting By Canvas )**
|
|
||||||

|
|
||||||
- ✅ Rendered as is.
|
|
||||||
- ✅ Sortable.
|
|
||||||
- ❌ You must to manage sorting orders.
|
|
||||||
- ❌ Not maskable.
|
|
||||||
- ❌ More batches.
|
|
||||||
- ❌ Requires Canvas.
|
|
||||||
|
|
||||||
- **Use RenderTexture**
|
|
||||||

|
|
||||||
- ✅ Maskable.
|
|
||||||
- ✅ Sortable.
|
|
||||||
- ❌ Requires Camera and RenderTexture.
|
|
||||||
- ❌ Difficult to adjust position and size.
|
|
||||||
- ❌ Quality depends on the RenderTexture's setting.
|
|
||||||
|
|
||||||
[UIParticleSystem]: https://forum.unity.com/threads/free-script-particle-systems-in-ui-screen-space-overlay.406862/
|
|
||||||
|
|
||||||
#### [Performance test results](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/193#issuecomment-1160028374)
|
|
||||||
|
|
||||||
| Approach | FPS on Editor | FPS on iPhone6 | FPS on Xperia XZ |
|
|
||||||
|-----------------------------|---------------|----------------|------------------|
|
|
||||||
| Particle System | 43 | 57 | 22 |
|
|
||||||
| UIParticleSystem | 4 | 3 | 0 (unmeasurable) |
|
|
||||||
| Sorting By Canvas | 43 | 44 | 18 |
|
|
||||||
| UIParticle | 17 | 12 | 4 |
|
|
||||||
| UIParticle with MeshSharing | 44 | 45 | 30 |
|
|
||||||
|
|
||||||
### 🔍 FAQ: Why Are My UIParticles Not Displayed Correctly?
|
|
||||||
|
|
||||||
If `ParticleSystem` alone displays particles correctly but `UIParticle` does not, please check the following points:
|
|
||||||
|
|
||||||
- [Shader Limitation](#shader-limitation)
|
|
||||||
- `UIParticle` does not support all built-in shaders except for `UI/Default`.
|
|
||||||
- Most cases can be solved by using `UI/Additive` or `UI/Default`.
|
|
||||||
- Particles are not masked
|
|
||||||
- `UIParticle` is maskable.
|
|
||||||
- Set `Mask` or `RectMask2D` component properly.
|
|
||||||
- [Use maskable/clipable shader](#how-to-make-a-custom-shader-to-support-maskrectmask2d-component) (such
|
|
||||||
as `UI/Additive` or `UI/Default`)
|
|
||||||
- Particles are too small
|
|
||||||
- If particles are small enough, they will not appear on the screen.
|
|
||||||
- Increase the `Scale` value.
|
|
||||||
- If you don't want to change the apparent size depending on the resolution, try the `Auto Scaling` option.
|
|
||||||
- Particles are too many
|
|
||||||
- No more than 65535 vertices can be displayed (for mesh combination limitations).
|
|
||||||
- Please set `Emission` module and `Max Particles` of ParticleSystem properly.
|
|
||||||
- Particles are emitted off-screen.
|
|
||||||
- When `Position Mode = Relative`, particles are emitted from the scaled position of the ParticleSystem, not from
|
|
||||||
the screen point of the ParticleSystem.
|
|
||||||
- Place the ParticleSystem in the proper position or try `Position Mode = Absolute`.
|
|
||||||
- Attaching `UIParticle` to the same object as `ParticleSystem`
|
|
||||||
- `Transform.localScale` will be overridden by the `Auto Scaling` option.
|
|
||||||
- It is recommended to place `ParticleSystem` under `UIParticle`.
|
|
||||||
- If `Transform.localScale` contains 0, rendering will be skipped.
|
|
||||||
- Displayed particles are in the correct position but too large/too small
|
|
||||||
- Adjust `ParticleSystem.renderer.Min/MaxParticleSize`.
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
### Shader Limitation
|
|
||||||
|
|
||||||
The use of UI shaders is recommended.
|
|
||||||
|
|
||||||
- If you need a simple Additive shader, use the `UI/Additive` shader instead.
|
|
||||||
- If you need a simple alpha-blend shader, use the `UI/Default` shader instead.
|
|
||||||
- If your custom shader does not work properly with UIParticle, consider creating a custom UI shader.
|
|
||||||
|
|
||||||
#### Built-in shaders are not supported
|
|
||||||
|
|
||||||
`UIParticle` does not support all built-in shaders except for `UI/Default`.
|
|
||||||
If their use is detected, an error is displayed in the inspector.
|
|
||||||
Use UI shaders instead.
|
|
||||||
|
|
||||||
#### (Unity 2018 or 2019) UV.zw components will be discarded
|
|
||||||
|
|
||||||
UIParticleRenderer renders the particles based on UIVertex.
|
|
||||||
Therefore, only the xy components are available for each UV in the shader. (zw components will be discarded).
|
|
||||||
So unfortunately, UIParticles will not work well with some shaders.
|
|
||||||
|
|
||||||
#### (Unity 2018 or 2019) Custom vertex streams
|
|
||||||
|
|
||||||
When using custom vertex streams, you can fill zw components with "unnecessary" data.
|
|
||||||
Refer to [this issue](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/191) for more information.
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
### Overheads
|
|
||||||
|
|
||||||
UIParticle has some overheads, and the batching depends on uGUI.
|
|
||||||
When improving performance, keep the following in mind:
|
|
||||||
|
|
||||||
- If you are displaying a large number of the same effect, consider the `Mesh Sharing` feature in
|
|
||||||
the [UIParticle Component](#uiparticle-component).
|
|
||||||
- If you don't like the uniform output, consider the `Random Group` feature.
|
|
||||||

|
|
||||||
- If you are using multiple materials, you will have more draw calls.
|
|
||||||
- Consider a single material, atlasing the sprites, and using `Sprite` mode in the `Texture Sheet Animation` module
|
|
||||||
in the ParticleSystem.
|
|
||||||
|
|
||||||
### How to Make a Custom Shader to Support Mask/RectMask2D Component
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Shader tips</summary>
|
|
||||||
|
|
||||||
```ShaderLab
|
|
||||||
Shader "Your/Custom/Shader"
|
|
||||||
{
|
|
||||||
Properties
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
// #### required for Mask ####
|
|
||||||
_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
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
}
|
|
||||||
|
|
||||||
// #### required for Mask ####
|
|
||||||
Stencil
|
|
||||||
{
|
|
||||||
Ref [_Stencil]
|
|
||||||
Comp [_StencilComp]
|
|
||||||
Pass [_StencilOp]
|
|
||||||
ReadMask [_StencilReadMask]
|
|
||||||
WriteMask [_StencilWriteMask]
|
|
||||||
}
|
|
||||||
ColorMask [_ColorMask]
|
|
||||||
// ...
|
|
||||||
|
|
||||||
Pass
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
// #### required for RectMask2D ####
|
|
||||||
#include "UnityUI.cginc"
|
|
||||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
|
||||||
float4 _ClipRect;
|
|
||||||
|
|
||||||
// #### required for Mask ####
|
|
||||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
|
||||||
|
|
||||||
struct appdata_t
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
};
|
|
||||||
|
|
||||||
struct v2f
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
// #### required for RectMask2D ####
|
|
||||||
float4 worldPosition : TEXCOORD1;
|
|
||||||
};
|
|
||||||
|
|
||||||
v2f vert(appdata_t v)
|
|
||||||
{
|
|
||||||
v2f OUT;
|
|
||||||
// ...
|
|
||||||
// #### required for RectMask2D ####
|
|
||||||
OUT.worldPosition = v.vertex;
|
|
||||||
return OUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixed4 frag(v2f IN) : SV_Target
|
|
||||||
{
|
|
||||||
// ...
|
|
||||||
// #### required for RectMask2D ####
|
|
||||||
#ifdef UNITY_UI_CLIP_RECT
|
|
||||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// #### required for Mask ####
|
|
||||||
#ifdef UNITY_UI_ALPHACLIP
|
|
||||||
clip (color.a - 0.001);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
ENDCG
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 🤝 Contributing
|
|
||||||
|
|
||||||
### Issues
|
|
||||||
|
|
||||||
Issues are incredibly valuable to this project:
|
|
||||||
|
|
||||||
- Ideas provide a valuable source of contributions that others can make.
|
|
||||||
- Problems help identify areas where this project needs improvement.
|
|
||||||
- Questions indicate where contributors can enhance the user experience.
|
|
||||||
|
|
||||||
### Pull Requests
|
|
||||||
|
|
||||||
Pull requests offer a fantastic way to contribute your ideas to this repository.
|
|
||||||
Please refer to [CONTRIBUTING.md](https://github.com/mob-sakai/ParticleEffectForUGUI/blob/main/CONTRIBUTING.md)
|
|
||||||
and [develop branch](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/develop) for guidelines.
|
|
||||||
|
|
||||||
### Support
|
|
||||||
|
|
||||||
This is an open-source project developed during my spare time.
|
|
||||||
If you appreciate it, consider supporting me.
|
|
||||||
Your support allows me to dedicate more time to development. 😊
|
|
||||||
|
|
||||||
[](https://www.patreon.com/join/2343451?)
|
|
||||||
[](https://github.com/users/mob-sakai/sponsorship)
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
* MIT
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
*  [mob-sakai](https://github.com/mob-sakai) [](https://twitter.com/intent/follow?screen_name=mob_sakai) 
|
|
||||||
|
|
||||||
## See Also
|
|
||||||
|
|
||||||
* GitHub page : https://github.com/mob-sakai/ParticleEffectForUGUI
|
|
||||||
* Releases : https://github.com/mob-sakai/ParticleEffectForUGUI/releases
|
|
||||||
* Issue tracker : https://github.com/mob-sakai/ParticleEffectForUGUI/issues
|
|
||||||
* Change log : https://github.com/mob-sakai/ParticleEffectForUGUI/blob/main/CHANGELOG.md
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 53aa3f36032944b3fb1455e774c52396
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8cf8018dee45a4c42a19eec890eaa5b1
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
#if UNITY_2021_3_0 || UNITY_2021_3_1 || UNITY_2021_3_2 || UNITY_2021_3_3 || UNITY_2021_3_4 || UNITY_2021_3_5 || UNITY_2021_3_6 || UNITY_2021_3_7 || UNITY_2021_3_8 || UNITY_2021_3_9
|
|
||||||
#elif UNITY_2021_3_10 || UNITY_2021_3_11 || UNITY_2021_3_12 || UNITY_2021_3_13 || UNITY_2021_3_14 || UNITY_2021_3_15 || UNITY_2021_3_16 || UNITY_2021_3_17 || UNITY_2021_3_18 || UNITY_2021_3_19
|
|
||||||
#elif UNITY_2021_3_20 || UNITY_2021_3_21 || UNITY_2021_3_22 || UNITY_2021_3_23 || UNITY_2021_3_24 || UNITY_2021_3_25 || UNITY_2021_3_26 || UNITY_2021_3_27 || UNITY_2021_3_28 || UNITY_2021_3_29
|
|
||||||
#elif UNITY_2021_3_30 || UNITY_2021_3_31 || UNITY_2021_3_32 || UNITY_2021_3_33
|
|
||||||
#elif UNITY_2022_2_0 || UNITY_2022_2_1 || UNITY_2022_2_2 || UNITY_2022_2_3 || UNITY_2022_2_4 || UNITY_2022_2_5 || UNITY_2022_2_6 || UNITY_2022_2_7 || UNITY_2022_2_8 || UNITY_2022_2_9
|
|
||||||
#elif UNITY_2022_2_10 || UNITY_2022_2_11 || UNITY_2022_2_12 || UNITY_2022_2_13 || UNITY_2022_2_14
|
|
||||||
#elif UNITY_2021_3 || UNITY_2022_2 || UNITY_2022_3 || UNITY_2023_2_OR_NEWER
|
|
||||||
#define CANVAS_SUPPORT_ALWAYS_GAMMA
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Profiling;
|
|
||||||
#if UNITY_MODULE_VR
|
|
||||||
using UnityEngine.XR;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
|
||||||
{
|
|
||||||
internal static class CanvasExtensions
|
|
||||||
{
|
|
||||||
public static bool ShouldGammaToLinearInShader(this Canvas canvas)
|
|
||||||
{
|
|
||||||
return QualitySettings.activeColorSpace == ColorSpace.Linear &&
|
|
||||||
#if CANVAS_SUPPORT_ALWAYS_GAMMA
|
|
||||||
canvas.vertexColorAlwaysGammaSpace;
|
|
||||||
#else
|
|
||||||
false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ShouldGammaToLinearInMesh(this Canvas canvas)
|
|
||||||
{
|
|
||||||
return QualitySettings.activeColorSpace == ColorSpace.Linear &&
|
|
||||||
#if CANVAS_SUPPORT_ALWAYS_GAMMA
|
|
||||||
!canvas.vertexColorAlwaysGammaSpace;
|
|
||||||
#else
|
|
||||||
true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsStereoCanvas(this Canvas canvas)
|
|
||||||
{
|
|
||||||
#if UNITY_MODULE_VR
|
|
||||||
if (FrameCache.TryGet<bool>(canvas, nameof(IsStereoCanvas), out var stereo)) return stereo;
|
|
||||||
|
|
||||||
stereo =
|
|
||||||
canvas != null && canvas.renderMode != RenderMode.ScreenSpaceOverlay && canvas.worldCamera != null
|
|
||||||
&& XRSettings.enabled && !string.IsNullOrEmpty(XRSettings.loadedDeviceName);
|
|
||||||
FrameCache.Set(canvas, nameof(IsStereoCanvas), stereo);
|
|
||||||
return stereo;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the view-projection matrix for a Canvas.
|
|
||||||
/// </summary>
|
|
||||||
public static void GetViewProjectionMatrix(this Canvas canvas, out Matrix4x4 vpMatrix)
|
|
||||||
{
|
|
||||||
canvas.GetViewProjectionMatrix(Camera.MonoOrStereoscopicEye.Mono, out vpMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the view-projection matrix for a Canvas.
|
|
||||||
/// </summary>
|
|
||||||
public static void GetViewProjectionMatrix(this Canvas canvas, Camera.MonoOrStereoscopicEye eye,
|
|
||||||
out Matrix4x4 vpMatrix)
|
|
||||||
{
|
|
||||||
if (FrameCache.TryGet(canvas, nameof(GetViewProjectionMatrix), out vpMatrix)) return;
|
|
||||||
|
|
||||||
canvas.GetViewProjectionMatrix(eye, out var viewMatrix, out var projectionMatrix);
|
|
||||||
vpMatrix = viewMatrix * projectionMatrix;
|
|
||||||
FrameCache.Set(canvas, nameof(GetViewProjectionMatrix), vpMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the view and projection matrices for a Canvas.
|
|
||||||
/// </summary>
|
|
||||||
public static void GetViewProjectionMatrix(this Canvas canvas, out Matrix4x4 vMatrix, out Matrix4x4 pMatrix)
|
|
||||||
{
|
|
||||||
canvas.GetViewProjectionMatrix(Camera.MonoOrStereoscopicEye.Mono, out vMatrix, out pMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the view and projection matrices for a Canvas.
|
|
||||||
/// </summary>
|
|
||||||
public static void GetViewProjectionMatrix(this Canvas canvas, Camera.MonoOrStereoscopicEye eye,
|
|
||||||
out Matrix4x4 vMatrix, out Matrix4x4 pMatrix)
|
|
||||||
{
|
|
||||||
if (FrameCache.TryGet(canvas, "GetViewMatrix", (int)eye, out vMatrix) &&
|
|
||||||
FrameCache.TryGet(canvas, "GetProjectionMatrix", (int)eye, out pMatrix))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get view and projection matrices.
|
|
||||||
Profiler.BeginSample("(COF)[CanvasExt] GetViewProjectionMatrix");
|
|
||||||
var rootCanvas = canvas.rootCanvas;
|
|
||||||
var cam = rootCanvas.worldCamera;
|
|
||||||
if (rootCanvas && rootCanvas.renderMode != RenderMode.ScreenSpaceOverlay && cam)
|
|
||||||
{
|
|
||||||
if (eye == Camera.MonoOrStereoscopicEye.Mono)
|
|
||||||
{
|
|
||||||
vMatrix = cam.worldToCameraMatrix;
|
|
||||||
pMatrix = GL.GetGPUProjectionMatrix(cam.projectionMatrix, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pMatrix = cam.GetStereoProjectionMatrix((Camera.StereoscopicEye)eye);
|
|
||||||
vMatrix = cam.GetStereoViewMatrix((Camera.StereoscopicEye)eye);
|
|
||||||
pMatrix = GL.GetGPUProjectionMatrix(pMatrix, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var pos = rootCanvas.transform.position;
|
|
||||||
vMatrix = Matrix4x4.TRS(
|
|
||||||
new Vector3(-pos.x, -pos.y, -1000),
|
|
||||||
Quaternion.identity,
|
|
||||||
new Vector3(1, 1, -1f));
|
|
||||||
pMatrix = Matrix4x4.TRS(
|
|
||||||
new Vector3(0, 0, -1),
|
|
||||||
Quaternion.identity,
|
|
||||||
new Vector3(1 / pos.x, 1 / pos.y, -2 / 10000f));
|
|
||||||
}
|
|
||||||
|
|
||||||
FrameCache.Set(canvas, "GetViewMatrix", (int)eye, vMatrix);
|
|
||||||
FrameCache.Set(canvas, "GetProjectionMatrix", (int)eye, pMatrix);
|
|
||||||
|
|
||||||
Profiler.EndSample();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9dd767b8c0f95478386e7d5079cd44df
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user