├── .editorconfig
├── .github
├── CODEOWNERS
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── feature_request.md
│ └── question.md
├── pull_request_template.md
└── workflows
│ ├── deploy.yml
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── Assets
├── ProjectSettings.meta
├── ProjectSettings
│ ├── NanoMonitor.asset
│ └── NanoMonitor.asset.meta
├── Samples
├── Samples.meta
├── Tests.meta
└── Tests
│ ├── Editor.meta
│ └── Editor
│ ├── EditorTests.asmdef
│ ├── EditorTests.asmdef.meta
│ ├── SampleTests.cs
│ └── SampleTests.cs.meta
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── Packages
├── manifest.json
├── packages-lock.json
└── src
│ ├── .coffee.internal.sed
│ ├── .releaserc.json
│ ├── CHANGELOG.md
│ ├── CHANGELOG.md.meta
│ ├── LICENSE.md
│ ├── LICENSE.md.meta
│ ├── README.md
│ ├── README.md.meta
│ ├── Runtime.meta
│ ├── Runtime
│ ├── Coffee.UIDynamicSampler.asmdef
│ ├── Coffee.UIDynamicSampler.asmdef.meta
│ ├── Internal.meta
│ ├── Internal
│ │ ├── Utilities.meta
│ │ └── Utilities
│ │ │ ├── FastAction.cs
│ │ │ ├── FastAction.cs.meta
│ │ │ ├── Logging.cs
│ │ │ ├── Logging.cs.meta
│ │ │ ├── Misc.cs
│ │ │ ├── Misc.cs.meta
│ │ │ ├── ObjectPool.cs
│ │ │ ├── ObjectPool.cs.meta
│ │ │ ├── ObjectRepository.cs
│ │ │ ├── ObjectRepository.cs.meta
│ │ │ ├── RenderTextureRepository.cs
│ │ │ ├── RenderTextureRepository.cs.meta
│ │ │ ├── UIExtraCallbacks.cs
│ │ │ └── UIExtraCallbacks.cs.meta
│ ├── UIDynamicSampler.cs
│ └── UIDynamicSampler.cs.meta
│ ├── Samples~
│ ├── Demo.meta
│ └── Demo
│ │ ├── UIDynamicSampler_Demo-Circle.png
│ │ ├── UIDynamicSampler_Demo-Circle.png.meta
│ │ ├── UIDynamicSampler_Demo-Container.prefab
│ │ ├── UIDynamicSampler_Demo-Container.prefab.meta
│ │ ├── UIDynamicSampler_Demo-UnityChan-Mipmap.png
│ │ ├── UIDynamicSampler_Demo-UnityChan-Mipmap.png.meta
│ │ ├── UIDynamicSampler_Demo-UnityChan-Thumbnail.png
│ │ ├── UIDynamicSampler_Demo-UnityChan-Thumbnail.png.meta
│ │ ├── UIDynamicSampler_Demo-UnityChan.png
│ │ ├── UIDynamicSampler_Demo-UnityChan.png.meta
│ │ ├── UIDynamicSampler_Demo.cs
│ │ ├── UIDynamicSampler_Demo.cs.meta
│ │ ├── UIDynamicSampler_Demo.unity
│ │ └── UIDynamicSampler_Demo.unity.meta
│ ├── UIDynamicSamplerIcon.png
│ ├── UIDynamicSamplerIcon.png.meta
│ ├── package.json
│ └── package.json.meta
├── ProjectSettings
├── AudioManager.asset
├── BurstAotSettings_StandaloneOSX.json
├── ClusterInputManager.asset
├── CommonBurstAotSettings.json
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── ShaderGraphSettings.asset
├── TagManager.asset
├── TimeManager.asset
├── URPProjectSettings.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── boot.config
└── README.md
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.json]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_style = space
7 | indent_size = 2
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.asmdef]
12 | charset = utf-8
13 | end_of_line = lf
14 | indent_style = space
15 | indent_size = 4
16 | trim_trailing_whitespace = true
17 | insert_final_newline = true
18 |
19 | # C# files
20 | [*.cs]
21 | charset = utf-8
22 | end_of_line = lf
23 | indent_style = space
24 | indent_size = 4
25 | trim_trailing_whitespace = true
26 | insert_final_newline = true
27 |
28 | csharp_style_namespace_declarations = block_scoped
29 | csharp_style_implicit_object_creation_when_type_is_apparent = false
30 | resharper_object_creation_when_type_evident = explicitly_typed
31 |
32 | # Keep
33 | csharp_keep_existing_attribute_arrangement = true
34 | csharp_keep_existing_embedded_arrangement = true
35 | csharp_keep_user_linebreaks = true
36 | csharp_keep_existing_linebreaks = true
37 | csharp_place_simple_embedded_statement_on_same_line = false
38 | csharp_place_simple_blocks_on_single_line = false
39 | csharp_keep_existing_initializer_arrangement = true
40 | csharp_keep_existing_arrangement = true
41 |
42 | # Standard properties
43 | end_of_line = lf
44 | insert_final_newline = true
45 |
46 | # Brace preferences
47 | csharp_brace_style = next_line
48 | csharp_braces_for_ifelse = required_for_multiline_statement
49 | csharp_braces_for_for = required
50 | csharp_braces_for_foreach = required
51 | csharp_braces_for_while = required
52 | csharp_braces_for_dowhile = required
53 | csharp_braces_for_using = required
54 | csharp_case_block_braces = next_line
55 | csharp_initializer_braces = next_line
56 |
57 | # New line preferences
58 | csharp_new_line_before_open_brace = all
59 | csharp_new_line_before_else = true
60 | csharp_new_line_before_catch = true
61 | csharp_new_line_before_finally = true
62 | csharp_new_line_before_members_in_object_initializers = true
63 | csharp_new_line_before_members_in_anonymous_types = true
64 | csharp_new_line_between_query_expression_clauses = true
65 |
66 | # Indentation preferences
67 | csharp_indent_block_contents = true
68 | csharp_indent_braces = false
69 | csharp_indent_case_contents = true
70 | csharp_indent_case_contents_when_block = false
71 | csharp_indent_switch_labels = true
72 | csharp_indent_labels = one_less_than_current
73 |
74 | # Modifier preferences
75 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
76 |
77 | # avoid this. unless absolutely necessary
78 | dotnet_style_qualification_for_field = false:suggestion
79 | dotnet_style_qualification_for_property = false:suggestion
80 | dotnet_style_qualification_for_method = false:suggestion
81 | dotnet_style_qualification_for_event = false:suggestion
82 |
83 | # Types: use keywords instead of BCL types, and permit var only when the type is clear
84 | csharp_style_var_for_built_in_types = true:suggestion
85 | csharp_style_var_when_type_is_apparent = true:none
86 | csharp_style_var_elsewhere = true:suggestion
87 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
88 | dotnet_style_predefined_type_for_member_access = true:suggestion
89 |
90 | #
91 | resharper_keep_existing_embedded_arrangement = true
92 |
93 | # Arguments
94 | csharp_arguments_literal = named:suggestion
95 | csharp_arguments_string_literal = named:suggestion
96 |
97 | # Naming: public and protected fields -> camelCase
98 | dotnet_naming_rule.protected_public_fields.severity = suggestion
99 | dotnet_naming_rule.protected_public_fields.symbols = protected_public_fields
100 | dotnet_naming_rule.protected_public_fields.style = camel_case
101 | dotnet_naming_symbols.protected_public_fields.applicable_kinds = field, event
102 | dotnet_naming_symbols.protected_public_fields.applicable_accessibilities = public, protected
103 | dotnet_naming_style.camel_case.capitalization = camel_case
104 |
105 | # Naming: properties -> camelCase
106 | dotnet_naming_rule.properties.severity = suggestion
107 | dotnet_naming_rule.properties.symbols = properties
108 | dotnet_naming_rule.properties.style = camel_case
109 | dotnet_naming_symbols.properties.applicable_kinds = property
110 |
111 | # Naming: constant fields -> k_PascalCase
112 | dotnet_naming_rule.constant_fields.severity = suggestion
113 | dotnet_naming_rule.constant_fields.symbols = constant_fields
114 | dotnet_naming_rule.constant_fields.style = k_pascal_case
115 | dotnet_naming_symbols.constant_fields.applicable_kinds = field
116 | dotnet_naming_symbols.constant_fields.required_modifiers = const
117 | dotnet_naming_style.k_pascal_case.required_prefix = k_
118 | dotnet_naming_style.k_pascal_case.capitalization = pascal_case
119 |
120 | # Naming: static fields -> s_PascalCase
121 | dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
122 | dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
123 | dotnet_naming_rule.static_fields_should_have_prefix.style = s_pascal_case
124 | dotnet_naming_symbols.static_fields.applicable_kinds = field, property
125 | dotnet_naming_symbols.static_fields.required_modifiers = static
126 | dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
127 | dotnet_naming_style.s_pascal_case.required_prefix = s_
128 | dotnet_naming_style.s_pascal_case.capitalization = pascal_case
129 |
130 | # Naming: internal and private fields -> _camelCase
131 | dotnet_naming_rule.private_internal_fields.severity = suggestion
132 | dotnet_naming_rule.private_internal_fields.symbols = private_internal_fields
133 | dotnet_naming_rule.private_internal_fields.style = _camel_case
134 | dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
135 | dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
136 | dotnet_naming_style._camel_case.required_prefix = _
137 | dotnet_naming_style._camel_case.capitalization = camel_case
138 |
139 | # Code style defaults
140 | dotnet_sort_system_directives_first = true
141 | csharp_preserve_single_line_statements = false
142 | csharp_prefer_static_local_function = true:suggestion
143 | csharp_prefer_simple_using_statement = false:none
144 | csharp_style_prefer_switch_expression = true:suggestion
145 | dotnet_style_readonly_field = true:suggestion
146 |
147 | # Expression-level preferences
148 | dotnet_style_object_initializer = true:suggestion
149 | dotnet_style_collection_initializer = true:suggestion
150 | dotnet_style_explicit_tuple_names = true:suggestion
151 | dotnet_style_coalesce_expression = true:suggestion
152 | dotnet_style_null_propagation = true:suggestion
153 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
154 | dotnet_style_prefer_inferred_tuple_names = true:suggestion
155 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
156 | dotnet_style_prefer_auto_properties = true:suggestion
157 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent
158 | dotnet_style_prefer_conditional_expression_over_return = true:silent
159 | csharp_prefer_simple_default_expression = true:suggestion
160 |
161 | # Expression-bodied members
162 | csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
163 | csharp_style_expression_bodied_methods = false:suggestion
164 | csharp_style_expression_bodied_constructors = false:suggestion
165 | csharp_style_expression_bodied_operators = false:suggestion
166 | csharp_style_expression_bodied_properties = when_on_single_line:suggestion
167 | csharp_style_expression_bodied_indexers = false:suggestion
168 | csharp_style_expression_bodied_lambdas = when_on_single_line:silent
169 | csharp_style_expression_bodied_local_functions = false:suggestion
170 |
171 | # Pattern matching
172 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
173 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
174 | csharp_style_inlined_variable_declaration = true:suggestion
175 |
176 | # Null checking preferences
177 | csharp_style_throw_expression = true:suggestion
178 | csharp_style_conditional_delegate_call = true:suggestion
179 |
180 | # Other features
181 | csharp_style_prefer_index_operator = false:none
182 | csharp_style_prefer_range_operator = false:none
183 | csharp_style_pattern_local_over_anonymous_function = false:none
184 |
185 | # Space preferences
186 | csharp_space_after_cast = false
187 | csharp_space_after_colon_in_inheritance_clause = true
188 | csharp_space_after_comma = true
189 | csharp_space_after_dot = false
190 | csharp_space_after_keywords_in_control_flow_statements = true
191 | csharp_space_after_semicolon_in_for_statement = true
192 | csharp_space_around_binary_operators = before_and_after
193 | csharp_space_around_declaration_statements = false
194 | csharp_space_before_colon_in_inheritance_clause = true
195 | csharp_space_before_comma = false
196 | csharp_space_before_dot = false
197 | csharp_space_before_open_square_brackets = false
198 | csharp_space_before_semicolon_in_for_statement = false
199 | csharp_space_between_empty_square_brackets = false
200 | csharp_space_between_method_call_empty_parameter_list_parentheses = false
201 | csharp_space_between_method_call_name_and_opening_parenthesis = false
202 | csharp_space_between_method_call_parameter_list_parentheses = false
203 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
204 | csharp_space_between_method_declaration_name_and_open_parenthesis = false
205 | csharp_space_between_method_declaration_parameter_list_parentheses = false
206 | csharp_space_between_parentheses = false
207 | csharp_space_between_square_brackets = false
208 |
209 | # ReSharper inspection severities
210 | resharper_check_namespace_highlighting = none
211 | resharper_for_can_be_converted_to_foreach_highlighting = none
212 | resharper_xmldoc_indent_text = ZeroIndent
213 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This is a comment.
2 | # Each line is a file pattern followed by one or more owners.
3 | # https://docs.github.com/ja/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4 |
5 | # Default owners
6 | * @mob-sakai
7 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: mob-sakai # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: mob_sakai # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: mob-sakai
7 |
8 | ---
9 |
10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
11 |
12 | **Describe the bug**
13 | A clear and concise description of what the bug is.
14 |
15 | **To Reproduce**
16 | Steps to reproduce the behavior:
17 | 1. Go to '...'
18 | 2. Click on '....'
19 | 3. Scroll down to '....'
20 | 4. See error
21 |
22 | **Expected behavior**
23 | A clear and concise description of what you expected to happen.
24 |
25 | **Screenshots**
26 | If applicable, add screenshots to help explain your problem.
27 |
28 | **Environment (please complete the following information):**
29 | - Version [e.g. 1.0.0]
30 | - Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
31 | - Unity version: [e.g. 2018.2.8f1]
32 | - Build options: [e.g. IL2CPP, .Net 4.x, LWRP]
33 |
34 | **Additional context**
35 | Add any other context about the problem here.
36 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: enhancement
6 | assignees: mob-sakai
7 |
8 | ---
9 |
10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
11 |
12 | **Is your feature request related to a problem? Please describe.**
13 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14 |
15 | **Describe the solution you'd like**
16 | A clear and concise description of what you want to happen.
17 |
18 | **Describe alternatives you've considered**
19 | A clear and concise description of any alternative solutions or features you've considered.
20 |
21 | **Additional context**
22 | Add any other context or screenshots about the feature request here.
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Ask a question about this project
4 | title: ''
5 | labels: question
6 | assignees: mob-sakai
7 |
8 | ---
9 |
10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
11 |
12 | **Describe what help do you need**
13 | A description of the question.
14 |
15 | **Additional context**
16 | Add any other context or screenshots about the question here.
17 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 | # Pull Request Template
3 |
4 | ## Description
5 |
6 | - Please include a summary of the change and which issue is fixed.
7 | - Please also include relevant motivation and context.
8 | - List any dependencies that are required for this change.
9 |
10 | Fixes #{issue_number}
11 |
12 | ## Type of change
13 |
14 | Please write the commit message in the format corresponding to the change type.
15 | Please see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information.
16 |
17 | - [ ] Bug fix (non-breaking change which fixes an issue)
18 | - [ ] New feature (non-breaking change which adds functionality)
19 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
20 | - [ ] Update documentations
21 | - [ ] Others (refactoring, style changes, etc.)
22 |
23 | ## Test environment
24 |
25 | - Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
26 | - Unity version: [e.g. 2022.2.0f1]
27 | - Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP]
28 |
29 | ## Checklist
30 |
31 | - [ ] This pull request is for merging into the `develop` branch
32 | - [ ] My code follows the style guidelines of this project
33 | - [ ] I have performed a self-review of my own code
34 | - [ ] I have commented my code, particularly in hard-to-understand areas
35 | - [ ] I have made corresponding changes to the documentation
36 | - [ ] My changes generate no new warnings
37 | - [ ] I have checked my code and corrected any misspellings
38 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: 🚀 Deploy with Zip
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | zip:
7 | description: "The url to the zip file"
8 | required: true
9 |
10 | jobs:
11 | deploy:
12 | name: 🚀 Deploy
13 | runs-on: ubuntu-latest
14 | permissions:
15 | pages: write
16 | id-token: write
17 | steps:
18 | - name: 📦 Download zip file To '_site'
19 | run: |
20 | curl -L ${{ github.event.inputs.zip }} -o _site.zip
21 | unzip _site.zip -d _site
22 | find _site -name __MACOSX | xargs rm -rf
23 |
24 | - name: 📦 Upload '_site'
25 | uses: actions/upload-pages-artifact@v3
26 |
27 | - name: 🚀 Deploy To GitHub Pages
28 | uses: actions/deploy-pages@v4
29 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: 🔖 Release
2 | run-name: 🔖 Release (${{ github.ref_name }})
3 |
4 | on:
5 | workflow_dispatch:
6 | push:
7 | branches:
8 | - preview
9 | - main
10 | - v*.x
11 | tags-ignore:
12 | - "**"
13 |
14 | jobs:
15 | release:
16 | name: 🔖 Release (${{ github.ref_name }})
17 | runs-on: ubuntu-latest
18 | permissions:
19 | contents: write
20 | pull-requests: write
21 | issues: write
22 | outputs:
23 | channel: ${{ steps.release.outputs.new_release_channel }}
24 | released: ${{ steps.release.outputs.new_release_published }}
25 | tag: ${{ steps.release.outputs.new_release_git_tag }}
26 | steps:
27 | - name: 🚚 Checkout (${{ github.ref_name }})
28 | uses: actions/checkout@v4
29 |
30 | - name: 🔖 Run semantic release
31 | uses: cycjimmy/semantic-release-action@v4
32 | id: release
33 | with:
34 | working_directory: Packages/src
35 | extra_plugins: |
36 | @semantic-release/changelog
37 | @semantic-release/git
38 | env:
39 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
40 |
41 | - run: |
42 | echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
43 | echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY
44 | echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY
45 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | # Required secrets
2 | # UNITY_LICENSE: The contents of Unity license file
3 | # UNITY_EMAIL: Unity user email to login
4 | # UNITY_PASSWORD: Unity user password to login
5 | name: 🧪 Test
6 | run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})
7 |
8 | env:
9 | # MINIMUM_VERSION: The minimum version of Unity.
10 | MINIMUM_VERSION: 2020.3
11 | # EXCLUDE_FILTER: The excluded versions of Unity.
12 | EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
13 |
14 | on:
15 | workflow_dispatch:
16 | inputs:
17 | usePeriodVersions:
18 | description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
19 | required: false
20 | default: "true"
21 | push:
22 | branches:
23 | - develop
24 | - "develop-*"
25 | tags:
26 | - "!*"
27 | paths-ignore:
28 | - "**.md"
29 | pull_request_target:
30 | types:
31 | - opened
32 | - reopened
33 | - synchronize
34 | paths-ignore:
35 | - "**.md"
36 |
37 | jobs:
38 | setup:
39 | name: ⚙️ Setup
40 | runs-on: ubuntu-latest
41 | outputs:
42 | unityVersions: ${{ steps.setup.outputs.unityVersions }}
43 | steps:
44 | - name: ⚙️ Find target Unity versions
45 | id: setup
46 | run: |
47 | echo "==== Target Unity Versions ===="
48 | LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
49 | if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
50 | ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
51 | else
52 | ADDITIONAL_VERSIONS=[]
53 | fi
54 |
55 | VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
56 | | jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
57 | echo "unityVersions=${VERSIONS}" | tee $GITHUB_OUTPUT
58 |
59 | test:
60 | name: 🧪 Run tests
61 | runs-on: ubuntu-latest
62 | permissions:
63 | checks: write
64 | contents: read
65 | needs: setup
66 | strategy:
67 | fail-fast: false
68 | max-parallel: 6
69 | matrix:
70 | unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
71 | steps:
72 | - name: 🚚 Checkout ($${{ github.ref }})
73 | if: github.event_name == 'push'
74 | uses: actions/checkout@v4
75 |
76 | - name: 🚚 Checkout pull request (pull_request_target)
77 | if: github.event_name == 'pull_request_target'
78 | uses: actions/checkout@v4
79 | with:
80 | ref: ${{ github.event.pull_request.head.sha }}
81 | fetch-depth: 0
82 |
83 | - name: 🚚 Marge pull request (pull_request_target)
84 | if: github.event_name == 'pull_request_target'
85 | run: |
86 | git config user.name "GitHub Actions"
87 | git config user.email "actions@github.com"
88 | git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
89 |
90 | - name: 📥 Cache library
91 | uses: actions/cache@v4
92 | with:
93 | path: Library
94 | key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
95 | restore-keys: |
96 | Library-${{ matrix.unityVersion }}-
97 | Library-
98 |
99 | - name: 🛠️ Build Unity Project (Test)
100 | uses: game-ci/unity-builder@v4
101 | timeout-minutes: 45
102 | with:
103 | customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
104 | targetPlatform: StandaloneLinux64
105 | allowDirtyBuild: true
106 | customParameters: -nographics
107 | env:
108 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
109 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
110 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
111 |
112 | - name: 🧪 Run tests
113 | uses: game-ci/unity-test-runner@v4
114 | timeout-minutes: 45
115 | with:
116 | customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
117 | # unityVersion: ${{ matrix.unityVersion }}
118 | customParameters: -nographics
119 | checkName: ${{ matrix.unityVersion }} Test Results
120 | githubToken: ${{ github.token }}
121 | env:
122 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
123 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
124 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
125 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows
2 | Thumbs.db
3 | Desktop.ini
4 | /*.csproj
5 | /*.sln
6 |
7 | # macOS
8 | .DS_Store
9 |
10 | # Vim
11 | *.swp
12 |
13 | # Unity
14 | /Logs
15 | /Library
16 | /Temp
17 | Assets/Plugins.meta
18 | Assets/Plugins/
19 |
20 | # VS
21 | .vs/
22 | .vscode/
23 | .idea/
24 | obj/
25 | bin/
26 | UserSettings/
27 | *.app/
28 | Build/
29 | Assets/TextMeshPro Support*
30 |
--------------------------------------------------------------------------------
/Assets/ProjectSettings.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 136794e243a01480cab49b97b710629b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ProjectSettings/NanoMonitor.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 194d2f2eb25c64ec0af5c323c74eb518, type: 3}
13 | m_Name: NanoMonitor
14 | m_EditorClassIdentifier:
15 | m_NanoMonitorEnabled: 1
16 | m_BootSceneNameRegex: .*
17 | m_DevelopmentBuildOnly: 0
18 | m_EnabledInEditor: 1
19 | m_AlwaysIncludeAssembly: 1
20 | m_InstantiateOnLoad: 1
21 | m_Prefab: {fileID: 4567906826058368312, guid: 7cebff2d255b9433cbe23b243c193329, type: 3}
22 | m_Interval: 0.5
23 | m_Anchor: 0
24 | m_Width: 800
25 | m_HelpUrl: https://github.com/mob-sakai/UIDynamicSampler
26 | m_CustomMonitorItems:
27 | - m_Format: Screen:{0}x{1}
28 | m_Arg0:
29 | m_Path: UnityEngine.Screen, UnityEngine.CoreModule;width
30 | m_Arg1:
31 | m_Path: UnityEngine.Screen, UnityEngine.CoreModule;height
32 | m_Arg2:
33 | m_Path:
34 |
--------------------------------------------------------------------------------
/Assets/ProjectSettings/NanoMonitor.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c82bda8115ae4eea9f38fa08bb92b35
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Samples:
--------------------------------------------------------------------------------
1 | ../Packages/src/Samples~
--------------------------------------------------------------------------------
/Assets/Samples.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: da4326bcde32a483485a51018fb4607b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9a477d4a32184f16b50f56f7de5fa4e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Tests/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 962016ab124fa4720be1e24ff58c8522
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Tests/Editor/EditorTests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "EditorTests",
3 | "references": [
4 | "Coffee.UIEffect"
5 | ],
6 | "optionalUnityReferences": [
7 | "TestAssemblies"
8 | ],
9 | "includePlatforms": [
10 | "Editor"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/Tests/Editor/EditorTests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 19b9538cf71f24df4966f51fc9d8653a
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Tests/Editor/SampleTests.cs:
--------------------------------------------------------------------------------
1 | using NUnit.Framework;
2 |
3 | public class SampleTests
4 | {
5 | [Test]
6 | public void SampleTest()
7 | {
8 | Assert.AreEqual(1, 1);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Assets/Tests/Editor/SampleTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7c5d391ce913d41fb9118c3d28b21059
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for
6 | everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity
7 | and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion,
8 | or sexual identity and orientation.
9 |
10 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to a positive environment for our community include:
15 |
16 | * Demonstrating empathy and kindness toward other people
17 | * Being respectful of differing opinions, viewpoints, and experiences
18 | * Giving and gracefully accepting constructive feedback
19 | * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
20 | * Focusing on what is best not just for us as individuals, but for the overall community
21 |
22 | Examples of unacceptable behavior include:
23 |
24 | * The use of sexualized language or imagery, and sexual attention or
25 | advances of any kind
26 | * Trolling, insulting or derogatory comments, and personal or political attacks
27 | * Public or private harassment
28 | * Publishing others' private information, such as a physical or email
29 | address, without their explicit permission
30 | * Other conduct which could reasonably be considered inappropriate in a
31 | professional setting
32 |
33 | ## Enforcement Responsibilities
34 |
35 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take
36 | appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive,
37 | or harmful.
38 |
39 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
40 | issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for
41 | moderation decisions when appropriate.
42 |
43 | ## Scope
44 |
45 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
46 | the community in public spaces. Examples of representing our community include using an official e-mail address, posting
47 | via an official social media account, or acting as an appointed representative at an online or offline event.
48 |
49 | ## Enforcement
50 |
51 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
52 | for enforcement at sakai861104@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
53 |
54 | All community leaders are obligated to respect the privacy and security of the reporter of any incident.
55 |
56 | ## Enforcement Guidelines
57 |
58 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem
59 | in violation of this Code of Conduct:
60 |
61 | ### 1. Correction
62 |
63 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the
64 | community.
65 |
66 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation
67 | and an explanation of why the behavior was inappropriate. A public apology may be requested.
68 |
69 | ### 2. Warning
70 |
71 | **Community Impact**: A violation through a single incident or series of actions.
72 |
73 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including
74 | unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding
75 | interactions in community spaces as well as external channels like social media. Violating these terms may lead to a
76 | temporary or permanent ban.
77 |
78 | ### 3. Temporary Ban
79 |
80 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
81 |
82 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified
83 | period of time. No public or private interaction with the people involved, including unsolicited interaction with those
84 | enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
85 |
86 | ### 4. Permanent Ban
87 |
88 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate
89 | behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
90 |
91 | **Consequence**: A permanent ban from any sort of public interaction within the community.
92 |
93 | ## Attribution
94 |
95 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
96 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
97 |
98 | Community Impact Guidelines were inspired
99 | by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
100 |
101 | [homepage]: https://www.contributor-covenant.org
102 |
103 | For answers to common questions about this code of conduct, see the FAQ at
104 | https://www.contributor-covenant.org/faq. Translations are available
105 | at https://www.contributor-covenant.org/translations.
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | ## How to Contribute
4 |
5 | #### Code of Conduct
6 |
7 | This repository has adopted the Contributor Covenant as it's
8 | Code of Conduct. It is expected that participants adhere to it.
9 |
10 | #### Proposing a Change
11 |
12 | If you are unsure about whether or not a change is desired,
13 | you can create an issue. This is useful because it creates
14 | the possibility for a discussion that's visible to everyone.
15 |
16 | When fixing a bug it is fine to submit a pull request right away.
17 |
18 | #### Sending a Pull Request
19 |
20 | Steps to be performed to submit a pull request:
21 |
22 | 1. Fork the repository.
23 | 2. Clone the repository.
24 | 3. Checkout `develop` branch.
25 | 4. Develop the package.
26 | 5. Test the package with the test runner (`Window > Generals > Test Runner`).
27 | 6. Commit with a message based
28 | on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153) as follows:
29 | - `fix:` fix a bug
30 | - `feat:` new feature
31 | - `docs:` changes only in documentation
32 | - `style:` changes only in formatting, white-space, etc
33 | - `refactor:` changes only in code structure (extract method, rename variable, move method, etc)
34 | - `perf:` changes only in code performance
35 | - `test:` add or update tests
36 | - `chore:` changes to the build process or auxiliary tools and libraries such as documentation generation
37 |
38 | 7. Create a pull request on GitHub. Fill out the description, link any related issues and submit your pull request.
39 |
40 | #### License
41 |
42 | By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2025 mob-sakai
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6 | persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9 | Software.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
4 | "com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
5 | "com.unity.ide.rider": "3.0.34",
6 | "com.unity.test-framework": "1.1.33"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.coffee.development": {
4 | "version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
5 | "depth": 0,
6 | "source": "git",
7 | "dependencies": {},
8 | "hash": "2bd2bf356dd692a39de9db2ff11faaf79fbfaea3"
9 | },
10 | "com.coffee.nano-monitor": {
11 | "version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
12 | "depth": 0,
13 | "source": "git",
14 | "dependencies": {
15 | "com.unity.ugui": "1.0.0"
16 | },
17 | "hash": "2bd2bf356dd692a39de9db2ff11faaf79fbfaea3"
18 | },
19 | "com.coffee.ui-dynamic-sampler": {
20 | "version": "file:src",
21 | "depth": 0,
22 | "source": "embedded",
23 | "dependencies": {
24 | "com.unity.ugui": "1.0.0"
25 | }
26 | },
27 | "com.unity.ext.nunit": {
28 | "version": "1.0.6",
29 | "depth": 1,
30 | "source": "registry",
31 | "dependencies": {},
32 | "url": "https://packages.unity.com"
33 | },
34 | "com.unity.ide.rider": {
35 | "version": "3.0.34",
36 | "depth": 0,
37 | "source": "registry",
38 | "dependencies": {
39 | "com.unity.ext.nunit": "1.0.6"
40 | },
41 | "url": "https://packages.unity.com"
42 | },
43 | "com.unity.test-framework": {
44 | "version": "1.1.33",
45 | "depth": 0,
46 | "source": "registry",
47 | "dependencies": {
48 | "com.unity.ext.nunit": "1.0.6",
49 | "com.unity.modules.imgui": "1.0.0",
50 | "com.unity.modules.jsonserialize": "1.0.0"
51 | },
52 | "url": "https://packages.unity.com"
53 | },
54 | "com.unity.ugui": {
55 | "version": "1.0.0",
56 | "depth": 1,
57 | "source": "builtin",
58 | "dependencies": {
59 | "com.unity.modules.ui": "1.0.0",
60 | "com.unity.modules.imgui": "1.0.0"
61 | }
62 | },
63 | "com.unity.modules.imgui": {
64 | "version": "1.0.0",
65 | "depth": 1,
66 | "source": "builtin",
67 | "dependencies": {}
68 | },
69 | "com.unity.modules.jsonserialize": {
70 | "version": "1.0.0",
71 | "depth": 1,
72 | "source": "builtin",
73 | "dependencies": {}
74 | },
75 | "com.unity.modules.ui": {
76 | "version": "1.0.0",
77 | "depth": 2,
78 | "source": "builtin",
79 | "dependencies": {}
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Packages/src/.coffee.internal.sed:
--------------------------------------------------------------------------------
1 | s/Coffee.Internal/Coffee.UIDynamicSamplerInternal/g
2 |
--------------------------------------------------------------------------------
/Packages/src/.releaserc.json:
--------------------------------------------------------------------------------
1 | {
2 | "branches": [
3 | "main",
4 | "[0-9]+.x",
5 | {
6 | "name": "preview",
7 | "prerelease": true
8 | }
9 | ],
10 | "tagFormat": "${version}",
11 | "plugins": [
12 | "@semantic-release/commit-analyzer",
13 | "@semantic-release/release-notes-generator",
14 | "@semantic-release/changelog",
15 | [
16 | "@semantic-release/npm",
17 | {
18 | "npmPublish": false
19 | }
20 | ],
21 | "@semantic-release/git",
22 | "@semantic-release/github"
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/Packages/src/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 1.0.0 (2025-03-10)
2 |
3 |
4 | ### Features
5 |
6 | * first release ([da17216](https://github.com/mob-sakai/UIDynamicSampler/commit/da17216b4dc01fbcb806f1a552bdce2ad932c952))
7 |
--------------------------------------------------------------------------------
/Packages/src/CHANGELOG.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 312b29d1b514443f89bb73b7625131c7
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Packages/src/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2025 mob-sakai
2 |
3 | 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:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | 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.
--------------------------------------------------------------------------------
/Packages/src/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 015483b30da5947229b747c5f6c4bbd3
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Packages/src/README.md:
--------------------------------------------------------------------------------
1 | # UI Dynamic Sampler
2 |
3 | [](https://openupm.com/packages/com.coffee.ui-dynamic-sampler/)
4 | [](https://github.com/mob-sakai/UIDynamicSampler/releases)
5 | [](https://github.com/mob-sakai/UIDynamicSampler/releases)
6 | 
7 | 
8 | [](https://github.com/mob-sakai/UIDynamicSampler/blob/main/LICENSE.md)
9 | [](http://makeapullrequest.com)
10 | [](https://github.com/mob-sakai/UIDynamicSampler/subscription)
11 | [](https://twitter.com/intent/follow?screen_name=mob_sakai)
12 |
13 | << [📝 Description](#-description-) | [📌 Key Features](#-key-features) | [🎮 Demo](#-demo) | [⚙ Installation](#-installation) | [🚀 Usage](#-usage) | [🤝 Contributing](#-contributing) >>
14 |
15 | ## 📝 Description
16 |
17 | This package provides a component to reduce jaggies in UI elements.
18 |
19 | For example, when displaying a 2048x2048 texture at just 100x100 pixels, diagonal lines may appear jagged.
20 | This effect is particularly noticeable on low-DPI displays (such as standard non-Retina screens) where individual pixels are more visible.
21 |
22 | 
23 |
24 | In such cases, jaggies can be reduced by generating a thumbnail texture that matches the display size or by using mipmaps.
25 | However, these approaches increase asset size and complicate asset management.
26 | Moreover, depending on the UI element's size, these approaches may cause blurring or fail to sufficiently reduce jaggies.
27 |
28 | 
29 |
30 | The `UIDynamicSampler` component dynamically pre-samples textures based on the current UI element size, effectively reducing jaggies without increasing asset size.
31 | Additionally, it caches sampling results to maintain performance.
32 |
33 | 
34 |
35 | - [📌 Key Features](#-key-features)
36 | - [🎮 Demo](#-demo)
37 | - [⚙ Installation](#-installation)
38 | - [Install via OpenUPM](#install-via-openupm)
39 | - [Install via UPM (with Package Manager UI)](#install-via-upm-with-package-manager-ui)
40 | - [Install via UPM (Manually)](#install-via-upm-manually)
41 | - [Install as Embedded Package](#install-as-embedded-package)
42 | - [🚀 Usage](#-usage)
43 | - [Getting Started](#getting-started)
44 | - [🤝 Contributing](#-contributing)
45 | - [Issues](#issues)
46 | - [Pull Requests](#pull-requests)
47 | - [Support](#support)
48 | - [License](#license)
49 | - [Author](#author)
50 | - [See Also](#see-also)
51 |
52 |
53 |
54 | ## 📌 Key Features
55 |
56 | - **Real-time anti-jaggies for uGUI**: Dynamically samples textures based on UI element size to reduce jaggies.
57 | - **No Increase in Asset Size**: Performs sampling dynamically, eliminating the need for additional thumbnails or mipmaps, keeping asset management simple.
58 | - **High Performance with Caching**: Caches sampling results to reduce unnecessary computations.
59 | - **Improved Visibility on Low-DPI Displays**: Provides clearer rendering even on lower-resolution screens where jaggies are more noticeable.
60 | - **Easy to Use**: Simply add the `UIDynamicSampler` component to apply the effect.
61 |
62 |
71 |
72 | ## ⚙ Installation
73 |
74 | _This package requires **Unity 2020.3 or later**._
75 |
76 | ### Install via OpenUPM
77 |
78 | - This package is available on [OpenUPM](https://openupm.com/packages/com.coffee.ui-dynamic-sampler/) package
79 | registry.
80 | - This is the preferred method of installation, as you can easily receive updates as they're released.
81 | - If you have [openupm-cli](https://github.com/openupm/openupm-cli) installed, then run the following command in your
82 | project's directory:
83 | ```
84 | openupm add com.coffee.ui-dynamic-sampler
85 | ```
86 | - To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with
87 | `@{version}`:
88 | ```
89 | openupm add com.coffee.ui-dynamic-sampler@1.0.0
90 | ```
91 |
92 | ### Install via UPM (with Package Manager UI)
93 |
94 | - Click `Window > Package Manager` to open Package Manager UI.
95 | - Click `+ > Add package from git URL...` and input the repository URL:
96 | `https://github.com/mob-sakai/UIDynamicSampler.git?path=Packages/src`
97 | 
98 | - To update the package, change suffix `#{version}` to the target version.
99 | - e.g. `https://github.com/mob-sakai/UIDynamicSampler.git?path=Packages/src#1.0.0`
100 |
101 | ### Install via UPM (Manually)
102 |
103 | - Open the `Packages/manifest.json` file in your project. Then add this package somewhere in the `dependencies` block:
104 | ```json
105 | {
106 | "dependencies": {
107 | "com.coffee.ui-dynamic-sampler": "https://github.com/mob-sakai/UIDynamicSampler.git?path=Packages/src",
108 | ...
109 | }
110 | }
111 | ```
112 |
113 | - To update the package, change suffix `#{version}` to the target version.
114 | - e.g.
115 | `"com.coffee.ui-dynamic-sampler": "https://github.com/mob-sakai/UIDynamicSampler.git?path=Packages/src#1.0.0",`
116 |
117 | ### Install as Embedded Package
118 |
119 | 1. Download the `Source code (zip)` file from [Releases](https://github.com/mob-sakai/UIDynamicSampler/releases) and
120 | extract it.
121 | 2. Move the `/Packages/src` directory into your project's `Packages` directory.
122 | 
123 | - You can rename the `src` directory if needed.
124 | - If you intend to fix bugs or add features, installing it as an embedded package is recommended.
125 | - To update the package, re-download it and replace the existing contents.
126 |
127 |
128 |
129 | ## 🚀 Usage
130 |
131 | ### Getting Started
132 |
133 | 1. [Install the package](#-installation).
134 |
135 | 2. Add a `UIDynamicSampler` component to a UI element (Image, RawImage) from the
136 | `Add Component` in the inspector or `Component > UI > UIDynamicSampler` menu.
137 | 
138 |
139 | 3. Compare how jaggies appear in low DPI display environments.
140 | 
141 |
142 | 4. Enjoy!
143 |
144 |
145 |
146 | ## 🤝 Contributing
147 |
148 | ### Issues
149 |
150 | Issues are incredibly valuable to this project:
151 |
152 | - Ideas provide a valuable source of contributions that others can make.
153 | - Problems help identify areas where this project needs improvement.
154 | - Questions indicate where contributors can enhance the user experience.
155 |
156 | ### Pull Requests
157 |
158 | Pull requests offer a fantastic way to contribute your ideas to this repository.
159 | Please refer to [CONTRIBUTING.md](https://github.com/mob-sakai/UIDynamicSampler/tree/develop/CONTRIBUTING.md)
160 | and [develop branch](https://github.com/mob-sakai/UIDynamicSampler/tree/develop).
161 |
162 | ### Support
163 |
164 | This is an open-source project developed during my spare time.
165 | If you appreciate it, consider supporting me.
166 | Your support allows me to dedicate more time to development. 😊
167 |
168 | [](https://github.com/users/mob-sakai/sponsorship)
169 | [](https://www.patreon.com/join/2343451?)
170 |
171 |