├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md └── workflows │ ├── release.yml │ └── test.yml ├── .gitignore ├── .npmignore ├── .releaserc.json ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── CODE_OF_CONDUCT.md ├── CODE_OF_CONDUCT.md.meta ├── CONTRIBUTING.md ├── CONTRIBUTING.md.meta ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── README.md.meta ├── Samples~ ├── Demo.meta └── Demo │ ├── Light_Frame.png │ ├── Light_Frame.png.meta │ ├── UITransition_Art.png │ ├── UITransition_Art.png.meta │ ├── Unity-chan.png │ ├── Unity-chan.png.meta │ ├── Unmask_Demo.asmdef │ ├── Unmask_Demo.asmdef.meta │ ├── Unmask_Demo.controller │ ├── Unmask_Demo.controller.meta │ ├── Unmask_Demo.cs │ ├── Unmask_Demo.cs.meta │ ├── Unmask_Demo.unity │ ├── Unmask_Demo.unity.meta │ ├── Unmask_Demo_Button.controller │ └── Unmask_Demo_Button.controller.meta ├── Scripts.meta ├── Scripts ├── Coffee.UnmaskForUGUI.asmdef ├── Coffee.UnmaskForUGUI.asmdef.meta ├── Editor.meta ├── Editor │ ├── Coffee.UnmaskForUGUI.Editor.asmdef │ ├── Coffee.UnmaskForUGUI.Editor.asmdef.meta │ ├── ImportSampleMenu.cs │ ├── ImportSampleMenu.cs.meta │ ├── MenuOptions.cs │ └── MenuOptions.cs.meta ├── Unmask.cs ├── Unmask.cs.meta ├── UnmaskRaycastFilter.cs └── UnmaskRaycastFilter.cs.meta ├── package.json └── package.json.meta /.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/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | branches: 6 | - preview 7 | - main 8 | - v*.x 9 | tags-ignore: 10 | - "**" 11 | 12 | jobs: 13 | release: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - uses: cycjimmy/semantic-release-action@v3 19 | with: 20 | extra_plugins: | 21 | @semantic-release/changelog 22 | @semantic-release/git 23 | env: 24 | GITHUB_TOKEN: ${{ github.token }} 25 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | # Secrets 2 | # UNITY_LICENSE: 3 | name: test 4 | 5 | on: 6 | push: 7 | branches: 8 | - develop 9 | tags: 10 | - "!*" 11 | pull_request: 12 | types: 13 | - opened 14 | - synchronize 15 | 16 | jobs: 17 | unity-test: 18 | runs-on: ubuntu-latest 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | unityVersion: [ 23 | "2018.3.14f1", 24 | "2018.4.30f1", 25 | "2019.1.14f1", 26 | "2019.2.21f1", 27 | "2019.3.15f1", 28 | "2019.4.16f1", 29 | "2020.1.17f1", 30 | "2020.2.1f1", 31 | ] 32 | 33 | steps: 34 | # Checkout sandbox project 35 | - uses: actions/checkout@v4 36 | with: 37 | ref: sandbox 38 | submodules: true 39 | fetch-depth: 0 40 | 41 | # Update package submodule 42 | - name: "Update package submodule" 43 | working-directory: Packages/dev 44 | run: git checkout ${{ github.sha }} 45 | 46 | - uses: actions/cache@v3 47 | with: 48 | path: Library 49 | key: Library-${{ matrix.unityVersion }}-${{ github.sha }} 50 | restore-keys: | 51 | Library-${{ matrix.unityVersion }}- 52 | Library- 53 | 54 | # Install codecoverage package 55 | # - name: "Install codecoverage package" 56 | # if: startsWith(matrix.unityVersion, '2019.4.') 57 | # run: | 58 | # npx openupm-cli add -f com.unity.testtools.codecoverage@0.4.0-preview 59 | 60 | # Run tests 61 | - name: "Run tests" 62 | uses: game-ci/unity-test-runner@v3 63 | with: 64 | unityVersion: ${{ matrix.unityVersion }} 65 | customParameters: -nographics 66 | env: 67 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 68 | 69 | # - uses: actions/upload-artifact@v2 70 | # if: always() 71 | # with: 72 | # name: TestResults-${{ matrix.unityVersion }} 73 | # path: | 74 | # artifacts/*.xml 75 | # CodeCoverage/**/TestCoverageResults_*.xml 76 | 77 | # publish: 78 | # needs: unity-test 79 | # runs-on: ubuntu-latest 80 | # if: always() 81 | # steps: 82 | 83 | # - uses: actions/download-artifact@v2 84 | # with: 85 | # path: artifacts 86 | 87 | # - uses: testspace-com/setup-testspace@v1 88 | # with: 89 | # domain: ${{github.repository_owner}} 90 | 91 | # - name: Push test results 92 | # if: always() 93 | # run: | 94 | # testspace `find . -name '*.xml' | tr '\n' ' '` -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | Desktop.ini 3 | .DS_Store 4 | 5 | !Samples~ 6 | 7 | *.tgz 8 | *.tgz.meta 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | Desktop.ini 3 | .DS_Store 4 | 5 | !Samples~ 6 | Samples.meta 7 | 8 | *.tgz 9 | *.tgz.meta 10 | .releaserc.json 11 | .github 12 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "+([0-9])?(.{+([0-9]),x}).x", 4 | "master", 5 | "main", 6 | { 7 | "name": "preview", 8 | "prerelease": true 9 | } 10 | ], 11 | "tagFormat": "${version}", 12 | "plugins": [ 13 | "@semantic-release/commit-analyzer", 14 | "@semantic-release/release-notes-generator", 15 | "@semantic-release/changelog", 16 | [ 17 | "@semantic-release/npm", 18 | { 19 | "npmPublish": false 20 | } 21 | ], 22 | "@semantic-release/git", 23 | "@semantic-release/github" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.4.2](https://github.com/mob-sakai/UnmaskForUGUI/compare/1.4.1...1.4.2) (2023-10-25) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * UnmaskRaycastFilter not working anymore ([14ab505](https://github.com/mob-sakai/UnmaskForUGUI/commit/14ab505fbfaf1103bbb1869d0e42817bf8830ced)), closes [#29](https://github.com/mob-sakai/UnmaskForUGUI/issues/29) 7 | 8 | ## [1.4.1](https://github.com/mob-sakai/UnmaskForUGUI/compare/1.4.0...1.4.1) (2023-03-14) 9 | 10 | 11 | ### Bug Fixes 12 | 13 | * Fixed error when executing menu item ([9f0afa1](https://github.com/mob-sakai/UnmaskForUGUI/commit/9f0afa19a46bc7b718a80142b02e33ade67fa3b4)), closes [#27](https://github.com/mob-sakai/UnmaskForUGUI/issues/27) 14 | 15 | # [1.4.0](https://github.com/mob-sakai/UnmaskForUGUI/compare/1.3.0...1.4.0) (2022-02-17) 16 | 17 | 18 | ### Features 19 | 20 | * add edge smoothing option ([c5317de](https://github.com/mob-sakai/UnmaskForUGUI/commit/c5317deafeba575161db8b168dae845d68347236)) 21 | 22 | # [1.3.0](https://github.com/mob-sakai/UnmaskForUGUI/compare/1.2.0...1.3.0) (2021-06-29) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * fix sample ([2cf7348](https://github.com/mob-sakai/UnmaskForUGUI/commit/2cf734838e380fd16c7f14eb2513346da70415b8)) 28 | * only for children option inside a scrollview ([b1e2bcc](https://github.com/mob-sakai/UnmaskForUGUI/commit/b1e2bccd05615df26d2cf69494430f72c6314a45)), closes [#24](https://github.com/mob-sakai/UnmaskForUGUI/issues/24) 29 | * remove component icons ([27cf23b](https://github.com/mob-sakai/UnmaskForUGUI/commit/27cf23b5d275d694bc33357c8d84a26993f49eec)) 30 | 31 | 32 | ### Features 33 | 34 | * add menu to create template object ([907599c](https://github.com/mob-sakai/UnmaskForUGUI/commit/907599c97273f8ce96d55360d5b52cb42de83c5b)) 35 | 36 | # [1.2.0](https://github.com/mob-sakai/UnmaskForUGUI/compare/v1.1.3...v1.2.0) (2020-10-07) 37 | 38 | 39 | ### Bug Fixes 40 | 41 | * adapt pivot when trying to fit to target ([a39fcef](https://github.com/mob-sakai/UnmaskForUGUI/commit/a39fcefba29beba079ac41d96ebabeaa5e92117e)) 42 | * pass camera to check the point in rectangle when camera is not null ([65a0ad0](https://github.com/mob-sakai/UnmaskForUGUI/commit/65a0ad0424edd9093fc9dfdfc0daf3c5aa27a145)) 43 | 44 | 45 | ### Features 46 | 47 | * add menu to import demo ([74603c5](https://github.com/mob-sakai/UnmaskForUGUI/commit/74603c5e08a4acd6b6fc8b711bf1b195bf7cf366)) 48 | 49 | # Changelog 50 | 51 | ## [v1.1.3](https://github.com/mob-sakai/UnmaskForUGUI/tree/v1.1.3) (2019-07-12) 52 | 53 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/v1.1.2...v1.1.3) 54 | 55 | **Fixed bugs:** 56 | 57 | - There is no asmdef file in this package [\#16](https://github.com/mob-sakai/UnmaskForUGUI/issues/16) 58 | 59 | **Closed issues:** 60 | 61 | - Separate the demo directory as unitypackage [\#17](https://github.com/mob-sakai/UnmaskForUGUI/issues/17) 62 | 63 | ## [v1.1.2](https://github.com/mob-sakai/UnmaskForUGUI/tree/v1.1.2) (2019-07-10) 64 | 65 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/v1.1.1...v1.1.2) 66 | 67 | **Fixed bugs:** 68 | 69 | - Can't install package using UPM [\#15](https://github.com/mob-sakai/UnmaskForUGUI/issues/15) 70 | 71 | ## [v1.1.1](https://github.com/mob-sakai/UnmaskForUGUI/tree/v1.1.1) (2019-02-07) 72 | 73 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/v1.1.0...v1.1.1) 74 | 75 | **Fixed bugs:** 76 | 77 | - UnmaskRaycastFilter is not reliable [\#14](https://github.com/mob-sakai/UnmaskForUGUI/issues/14) 78 | 79 | ## [v1.1.0](https://github.com/mob-sakai/UnmaskForUGUI/tree/v1.1.0) (2019-01-25) 80 | 81 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/1.1.0...v1.1.0) 82 | 83 | **Install UnmaskForUGUI with Unity Package Manager!** 84 | 85 | Find the manifest.json file in the Packages folder of your project and edit it to look like this: 86 | ```js 87 | { 88 | "dependencies": { 89 | "com.coffee.unmask": "https://github.com/mob-sakai/UnmaskForUGUI.git#1.1.0", 90 | ... 91 | }, 92 | } 93 | ``` 94 | To update the package, change `#1.1.0` to the target version. 95 | 96 | **Implemented enhancements:** 97 | 98 | - Unmask only for children option [\#11](https://github.com/mob-sakai/UnmaskForUGUI/issues/11) 99 | 100 | ## [v1.0.0](https://github.com/mob-sakai/UnmaskForUGUI/tree/v1.0.0) (2018-10-18) 101 | 102 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/v0.2.0...v1.0.0) 103 | 104 | **Implemented enhancements:** 105 | 106 | - Add `Fit On LateUpdate` option [\#10](https://github.com/mob-sakai/UnmaskForUGUI/issues/10) 107 | 108 | ## [v0.2.0](https://github.com/mob-sakai/UnmaskForUGUI/tree/v0.2.0) (2018-10-16) 109 | 110 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/v0.1.0...v0.2.0) 111 | 112 | **Implemented enhancements:** 113 | 114 | - Update demo & readme [\#9](https://github.com/mob-sakai/UnmaskForUGUI/issues/9) 115 | 116 | ## [v0.1.0](https://github.com/mob-sakai/UnmaskForUGUI/tree/v0.1.0) (2018-10-14) 117 | 118 | [Full Changelog](https://github.com/mob-sakai/UnmaskForUGUI/compare/987e437b26b83a78d6f54d6cc6778c3181e8e5dc...v0.1.0) 119 | 120 | **Implemented enhancements:** 121 | 122 | - Add demo [\#5](https://github.com/mob-sakai/UnmaskForUGUI/issues/5) 123 | - Support nesting [\#4](https://github.com/mob-sakai/UnmaskForUGUI/issues/4) 124 | - Following another object [\#3](https://github.com/mob-sakai/UnmaskForUGUI/issues/3) 125 | - Ray through the unmasked rectangle [\#2](https://github.com/mob-sakai/UnmaskForUGUI/issues/2) 126 | - Reverse mask [\#1](https://github.com/mob-sakai/UnmaskForUGUI/issues/1) 127 | 128 | 129 | 130 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* 131 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbca627d531eb4ca9b5846c638709e4c 3 | timeCreated: 1539214410 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /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 everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 8 | 9 | ## Our Standards 10 | 11 | Examples of behavior that contributes to a positive environment for our community include: 12 | 13 | * Demonstrating empathy and kindness toward other people 14 | * Being respectful of differing opinions, viewpoints, and experiences 15 | * Giving and gracefully accepting constructive feedback 16 | * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience 17 | * Focusing on what is best not just for us as individuals, but for the overall community 18 | 19 | Examples of unacceptable behavior include: 20 | 21 | * The use of sexualized language or imagery, and sexual attention or 22 | advances of any kind 23 | * Trolling, insulting or derogatory comments, and personal or political attacks 24 | * Public or private harassment 25 | * Publishing others' private information, such as a physical or email 26 | address, without their explicit permission 27 | * Other conduct which could reasonably be considered inappropriate in a 28 | professional setting 29 | 30 | ## Enforcement Responsibilities 31 | 32 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. 33 | 34 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 35 | 36 | ## Scope 37 | 38 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 39 | 40 | ## Enforcement 41 | 42 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at sakai861104@gmail.com. All complaints will be reviewed and investigated promptly and fairly. 43 | 44 | All community leaders are obligated to respect the privacy and security of the reporter of any incident. 45 | 46 | ## Enforcement Guidelines 47 | 48 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: 49 | 50 | ### 1. Correction 51 | 52 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. 53 | 54 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. 55 | 56 | ### 2. Warning 57 | 58 | **Community Impact**: A violation through a single incident or series of actions. 59 | 60 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. 61 | 62 | ### 3. Temporary Ban 63 | 64 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. 65 | 66 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. 67 | 68 | ### 4. Permanent Ban 69 | 70 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. 71 | 72 | **Consequence**: A permanent ban from any sort of public interaction within the community. 73 | 74 | ## Attribution 75 | 76 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, 77 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 78 | 79 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). 80 | 81 | [homepage]: https://www.contributor-covenant.org 82 | 83 | For answers to common questions about this code of conduct, see the FAQ at 84 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbddc129164884a2ba83385fd1abb547 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /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 and create your branch from `develop`. 23 | 2. If you have fixed a bug or added code that should be tested, add tests. 24 | 3. Click `Window > Generals > Test Runner` to test 25 | 4. Commit with a massage based on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153). 26 | 5. Fill out the description, link any related issues and submit your pull request. 27 | 28 | #### License 29 | 30 | By contributing to this repository, you agree that your contributions will be licensed under its MIT license. 31 | -------------------------------------------------------------------------------- /CONTRIBUTING.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b85675b2587cd4b2e919c33d7913131f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2018 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. -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cefd86cfe94614a08ac447d0a9ec6ad3 3 | timeCreated: 1539214411 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Unmask For UGUI 2 | === 3 | 4 | Reverse mask for uGUI element in Unity. 5 | 6 | ![](https://user-images.githubusercontent.com/12690315/51747120-e1d8dc80-20eb-11e9-952e-a67915af1294.png) 7 | 8 | [![](https://img.shields.io/npm/v/com.coffee.unmask?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.coffee.unmask/) 9 | [![](https://img.shields.io/github/v/release/mob-sakai/UnmaskForUGUI?include_prereleases)](https://github.com/mob-sakai/UnmaskForUGUI/releases) 10 | [![](https://img.shields.io/github/release-date/mob-sakai/UnmaskForUGUI.svg)](https://github.com/mob-sakai/UnmaskForUGUI/releases) 11 | [![](https://img.shields.io/github/license/mob-sakai/UnmaskForUGUI.svg)](https://github.com/mob-sakai/UnmaskForUGUI/blob/main/LICENSE.txt) 12 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](http://makeapullrequest.com) 13 | [![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai) 14 | 15 | ![](https://img.shields.io/badge/Unity%205.x-supported-blue.svg) 16 | ![](https://img.shields.io/badge/Unity%202017.x-supported-blue.svg) 17 | ![](https://img.shields.io/badge/Unity%202018.x-supported-blue.svg) 18 | ![](https://img.shields.io/badge/Unity%202019.x-supported-blue.svg) 19 | ![](https://img.shields.io/badge/Unity%202020.x-supported-blue.svg) 20 | ![](https://img.shields.io/badge/Unity%202021.x-supported-blue.svg) 21 | 22 | ![](https://img.shields.io/badge/Universal%20RP-supported-blue.svg) 23 | 24 | << [Description](#description) | [WebGL Demo](#demo) | [Installation](#installation) | [Usage](#usage) | [Contributing](#contributing) >> 25 | 26 | 27 | 28 |



29 | 30 | ## Description 31 | 32 | Unmask provides the following features: 33 | 1. Reverse mask 34 | 2. Ray through the unmasked rectangle 35 | 3. Following another object 36 | 4. Support nesting 37 | 38 | | Component | Features | Screenshot | 39 | |-|-|-| 40 | |**Unmask**|Reverse masking for parent Mask component.

**Fit Target / Fit On Late Update:** Fit graphic's transform to target transform on LateUpdate.
**Only For Children:** Unmask affects only for children.
**Show Unmask Graphic:** Show the graphic that is associated with the unmask render area.|| 41 | |**UnmaskRaycastFilter**|The ray Passes through the unmasked rectangle.
You can click on the unmasked button on the back side.|| 42 | 43 | 44 | 45 |



46 | ## Demo 47 | 48 | [WebGL Demo](http://mob-sakai.github.io/UnmaskForUGUI) 49 | 50 | ![demo](https://user-images.githubusercontent.com/12690315/46986251-4e296480-d129-11e8-8e3a-2bb0e5fbe533.gif) 51 | 52 | 53 | 54 |



55 | 56 | ## Installation 57 | 58 | ### Requirement 59 | 60 | ![](https://img.shields.io/badge/Unity%205.x-supported-blue.svg) 61 | ![](https://img.shields.io/badge/Unity%202017.x-supported-blue.svg) 62 | ![](https://img.shields.io/badge/Unity%202018.x-supported-blue.svg) 63 | ![](https://img.shields.io/badge/Unity%202019.x-supported-blue.svg) 64 | ![](https://img.shields.io/badge/Unity%202020.x-supported-blue.svg) 65 | ![](https://img.shields.io/badge/Unity%202021.x-supported-blue.svg) 66 | 67 | ![](https://img.shields.io/badge/Universal%20RP-supported-blue.svg) 68 | 69 | ### Using OpenUPM 70 | 71 | This package is available on [OpenUPM](https://openupm.com). 72 | You can install it via [openupm-cli](https://github.com/openupm/openupm-cli). 73 | ``` 74 | openupm add com.coffee.unmask 75 | ``` 76 | 77 | ### Using Git 78 | 79 | Find the manifest.json file in the Packages folder of your project and edit it to look like this: 80 | ``` 81 | { 82 | "dependencies": { 83 | "com.coffee.unmask": "https://github.com/mob-sakai/UnmaskForUGUI.git", 84 | ... 85 | }, 86 | } 87 | ``` 88 | 89 | To update the package, change suffix `#{version}` to the target version. 90 | 91 | * e.g. `"com.coffee.unmask": "https://github.com/mob-sakai/UnmaskForUGUI.git#2.0.0",` 92 | 93 | Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension) to install and update the package. 94 | 95 | ### For Unity 2018.2 or earlier 96 | 97 | 1. Download a source code zip file from [Releases](https://github.com/mob-sakai/UnmaskForUGUI/releases) page 98 | 2. Extract it 99 | 3. Import it into the following directory in your Unity project 100 | - `Packages` (It works as an embedded package. For Unity 2018.1 or later) 101 | - `Assets` (Legacy way. For Unity 2017.1 or later) 102 | 103 | 104 | 105 |



106 | 107 | ## How to play demo 108 | 109 | - For Unity 2019.1 or later 110 | - Open `Package Manager` window and select `UI Unmask` package in package list and click `Demo > Import in project` button 111 | - For Unity 2018.4 or earlier 112 | - Click `Assets/Samples/UI Unmask/Import Demo` from menu 113 | 114 | The assets will be imported into `Assets/Samples/UI Unmask/{version}/Demo`. 115 | Open `UIUnmask_Demo` scene and play it. 116 | 117 | 118 | 119 |



120 | 121 | ## Usage 122 | 123 | Create Object From Menu (`GameObject > UI > Unmask > ***`) 124 | 125 | |Menu|Screenshot| 126 | |--|--| 127 | |Tutorial Button|![](https://user-images.githubusercontent.com/12690315/123756826-4a00fd80-d8f8-11eb-8fb4-5d4399a3f907.png)| 128 | |Iris Shot|![](https://user-images.githubusercontent.com/12690315/123756809-45d4e000-d8f8-11eb-8bc9-767b81b8da42.png)| 129 | 130 | 131 | 132 |



133 | 134 | ## Example of using 135 | 136 | | Case | Description |Screenshot | 137 | |-|-|-| 138 | |Unmasked text|Black screen is cut out with unmasked text.|![](https://user-images.githubusercontent.com/12690315/46914021-c6c9dd00-cfd2-11e8-9698-6332bac8fef5.png)| 139 | |Hole|Black screen is cut out with unmasked Image.|![](https://user-images.githubusercontent.com/12690315/46985696-9b580700-d126-11e8-9b4a-3d66180c9562.png)| 140 | |Tutorial button|In tutorial, only specific button can be pressed.|![](https://user-images.githubusercontent.com/12690315/46983810-30560280-d11d-11e8-86d5-b25117740df4.png)| 141 | |Iris in/out|Transition effect with iris in/out.|![](https://user-images.githubusercontent.com/12690315/46983811-30560280-d11d-11e8-8d81-b38679cf9970.gif)| 142 | 143 | 144 | 145 |



146 | 147 | ## Contributing 148 | 149 | ### Issues 150 | 151 | Issues are very valuable to this project. 152 | 153 | - Ideas are a valuable source of contributions others can make 154 | - Problems show where this project is lacking 155 | - With a question you show where contributors can improve the user experience 156 | 157 | ### Pull Requests 158 | 159 | Pull requests are, a great way to get your ideas into this repository. 160 | See [CONTRIBUTING.md](/../../blob/main/CONTRIBUTING.md) and [develop](https://github.com/mob-sakai/UnmaskForUGUI/tree/develop) branch.. 161 | 162 | ### Support 163 | 164 | This is an open source project that I am developing in my spare time. 165 | If you like it, please support me. 166 | With your support, I can spend more time on development. :) 167 | 168 | [![](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/2343451?) 169 | [![](https://user-images.githubusercontent.com/12690315/66942881-03686280-f085-11e9-9586-fc0b6011029f.png)](https://github.com/users/mob-sakai/sponsorship) 170 | 171 | 172 | 173 | 174 |



175 | 176 | ## License 177 | 178 | * MIT 179 | * © UTJ/UCL 180 | 181 | 182 | 183 | ## Author 184 | 185 | [mob-sakai](https://github.com/mob-sakai) 186 | [![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai) 187 | 188 | 189 | 190 | ## See Also 191 | 192 | * GitHub page : https://github.com/mob-sakai/UnmaskForUGUI 193 | * Releases : https://github.com/mob-sakai/UnmaskForUGUI/releases 194 | * Issue tracker : https://github.com/mob-sakai/UnmaskForUGUI/issues 195 | * Change log : https://github.com/mob-sakai/UnmaskForUGUI/blob/main/CHANGELOG.md 196 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c5f8a1ac798e442eb3c77b05470878d 3 | timeCreated: 1539214410 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b39bece0bad6e409da07817e7f8bf0ab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Demo/Light_Frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/UnmaskForUGUI/33356da2c43fa28397192baee70910c978e3169f/Samples~/Demo/Light_Frame.png -------------------------------------------------------------------------------- /Samples~/Demo/Light_Frame.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3225e5ee415e0418ab692380249a2574 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 16 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Android 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 747e0689915a546a2a70938363d1bbc4 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 0 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Samples~/Demo/UITransition_Art.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/UnmaskForUGUI/33356da2c43fa28397192baee70910c978e3169f/Samples~/Demo/UITransition_Art.png -------------------------------------------------------------------------------- /Samples~/Demo/UITransition_Art.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5e1e56d8affdfc47858b4e7000f1d60 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: iPhone 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 3fa1aa6d51c7b424fb0a721100cd31f4 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 0 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Samples~/Demo/Unity-chan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/UnmaskForUGUI/33356da2c43fa28397192baee70910c978e3169f/Samples~/Demo/Unity-chan.png -------------------------------------------------------------------------------- /Samples~/Demo/Unity-chan.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cd154e72107340939b1731297ff8632 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 16 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Android 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | - serializedVersion: 2 106 | buildTarget: WebGL 107 | maxTextureSize: 2048 108 | resizeAlgorithm: 0 109 | textureFormat: -1 110 | textureCompression: 1 111 | compressionQuality: 50 112 | crunchedCompression: 0 113 | allowsAlphaSplitting: 0 114 | overridden: 0 115 | androidETC2FallbackOverride: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 12d5dde3c05fc4dcc9f5336bd891f194 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | spritePackingTag: 128 | pSDRemoveMatte: 0 129 | pSDShowRemoveMatteOption: 0 130 | userData: 131 | assetBundleName: 132 | assetBundleVariant: 133 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unmask_Demo", 3 | "references": [ 4 | "Coffee.UnmaskForUGUI" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [] 14 | } -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acd12bb8ab04d49bda545268e0943c1d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Unmask_Demo 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: Show 12 | m_Type: 9 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 0} 17 | - m_Name: Unity-chan 18 | m_Type: 9 19 | m_DefaultFloat: 0 20 | m_DefaultInt: 0 21 | m_DefaultBool: 0 22 | m_Controller: {fileID: 0} 23 | m_AnimatorLayers: 24 | - serializedVersion: 5 25 | m_Name: Base Layer 26 | m_StateMachine: {fileID: 1107663234215992080} 27 | m_Mask: {fileID: 0} 28 | m_Motions: [] 29 | m_Behaviours: [] 30 | m_BlendingMode: 0 31 | m_SyncedLayerIndex: -1 32 | m_DefaultWeight: 0 33 | m_IKPass: 0 34 | m_SyncedLayerAffectsTiming: 0 35 | m_Controller: {fileID: 9100000} 36 | --- !u!74 &74359422084734458 37 | AnimationClip: 38 | m_ObjectHideFlags: 0 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 0} 41 | m_Name: Show 42 | serializedVersion: 6 43 | m_Legacy: 0 44 | m_Compressed: 0 45 | m_UseHighQualityCurve: 1 46 | m_RotationCurves: [] 47 | m_CompressedRotationCurves: [] 48 | m_EulerCurves: [] 49 | m_PositionCurves: [] 50 | m_ScaleCurves: 51 | - curve: 52 | serializedVersion: 2 53 | m_Curve: 54 | - serializedVersion: 2 55 | time: 0 56 | value: {x: 6, y: 6, z: 6} 57 | inSlope: {x: 0, y: 0, z: 0} 58 | outSlope: {x: 0, y: 0, z: 0} 59 | tangentMode: 0 60 | - serializedVersion: 2 61 | time: 0.6666667 62 | value: {x: 1, y: 1, z: 1} 63 | inSlope: {x: 4.200766, y: 4.3844137, z: 4.2190137} 64 | outSlope: {x: 8.975144, y: 8.713858, z: 9.194191} 65 | tangentMode: 0 66 | - serializedVersion: 2 67 | time: 1.3333334 68 | value: {x: 0, y: 0, z: 0} 69 | inSlope: {x: 0, y: 0, z: 0} 70 | outSlope: {x: 0, y: 0, z: 0} 71 | tangentMode: 0 72 | - serializedVersion: 2 73 | time: 2 74 | value: {x: 0, y: 0, z: 0} 75 | inSlope: {x: 0, y: 0, z: 0} 76 | outSlope: {x: 0, y: 0, z: 0} 77 | tangentMode: 0 78 | - serializedVersion: 2 79 | time: 3.3333333 80 | value: {x: 6, y: 6, z: 6} 81 | inSlope: {x: 0, y: 0, z: 0} 82 | outSlope: {x: 0, y: 0, z: 0} 83 | tangentMode: 0 84 | m_PreInfinity: 2 85 | m_PostInfinity: 2 86 | m_RotationOrder: 4 87 | path: Unmask 88 | m_FloatCurves: 89 | - curve: 90 | serializedVersion: 2 91 | m_Curve: 92 | - serializedVersion: 2 93 | time: 0 94 | value: 1 95 | inSlope: Infinity 96 | outSlope: Infinity 97 | tangentMode: 103 98 | - serializedVersion: 2 99 | time: 3.3333333 100 | value: 0 101 | inSlope: Infinity 102 | outSlope: Infinity 103 | tangentMode: 103 104 | m_PreInfinity: 2 105 | m_PostInfinity: 2 106 | m_RotationOrder: 4 107 | attribute: m_Enabled 108 | path: 109 | classID: 223 110 | script: {fileID: 0} 111 | m_PPtrCurves: [] 112 | m_SampleRate: 30 113 | m_WrapMode: 0 114 | m_Bounds: 115 | m_Center: {x: 0, y: 0, z: 0} 116 | m_Extent: {x: 0, y: 0, z: 0} 117 | m_ClipBindingConstant: 118 | genericBindings: [] 119 | pptrCurveMapping: [] 120 | m_AnimationClipSettings: 121 | serializedVersion: 2 122 | m_AdditiveReferencePoseClip: {fileID: 0} 123 | m_AdditiveReferencePoseTime: 0 124 | m_StartTime: 0 125 | m_StopTime: 3.3333333 126 | m_OrientationOffsetY: 0 127 | m_Level: 0 128 | m_CycleOffset: 0 129 | m_HasAdditiveReferencePose: 0 130 | m_LoopTime: 0 131 | m_LoopBlend: 0 132 | m_LoopBlendOrientation: 0 133 | m_LoopBlendPositionY: 0 134 | m_LoopBlendPositionXZ: 0 135 | m_KeepOriginalOrientation: 0 136 | m_KeepOriginalPositionY: 1 137 | m_KeepOriginalPositionXZ: 0 138 | m_HeightFromFeet: 0 139 | m_Mirror: 0 140 | m_EditorCurves: 141 | - curve: 142 | serializedVersion: 2 143 | m_Curve: 144 | - serializedVersion: 2 145 | time: 0 146 | value: 1 147 | inSlope: Infinity 148 | outSlope: Infinity 149 | tangentMode: 103 150 | - serializedVersion: 2 151 | time: 3.3333333 152 | value: 0 153 | inSlope: Infinity 154 | outSlope: Infinity 155 | tangentMode: 103 156 | m_PreInfinity: 2 157 | m_PostInfinity: 2 158 | m_RotationOrder: 4 159 | attribute: m_Enabled 160 | path: 161 | classID: 223 162 | script: {fileID: 0} 163 | - curve: 164 | serializedVersion: 2 165 | m_Curve: 166 | - serializedVersion: 2 167 | time: 0 168 | value: 6 169 | inSlope: 0 170 | outSlope: 0 171 | tangentMode: 136 172 | - serializedVersion: 2 173 | time: 0.6666667 174 | value: 1 175 | inSlope: 4.200766 176 | outSlope: 8.975144 177 | tangentMode: 1 178 | - serializedVersion: 2 179 | time: 1.3333334 180 | value: 0 181 | inSlope: 0 182 | outSlope: 0 183 | tangentMode: 136 184 | - serializedVersion: 2 185 | time: 2 186 | value: 0 187 | inSlope: 0 188 | outSlope: 0 189 | tangentMode: 136 190 | - serializedVersion: 2 191 | time: 3.3333333 192 | value: 6 193 | inSlope: 0 194 | outSlope: 0 195 | tangentMode: 136 196 | m_PreInfinity: 2 197 | m_PostInfinity: 2 198 | m_RotationOrder: 4 199 | attribute: m_LocalScale.x 200 | path: Unmask 201 | classID: 224 202 | script: {fileID: 0} 203 | - curve: 204 | serializedVersion: 2 205 | m_Curve: 206 | - serializedVersion: 2 207 | time: 0 208 | value: 6 209 | inSlope: 0 210 | outSlope: 0 211 | tangentMode: 136 212 | - serializedVersion: 2 213 | time: 0.6666667 214 | value: 1 215 | inSlope: 4.3844137 216 | outSlope: 8.713858 217 | tangentMode: 1 218 | - serializedVersion: 2 219 | time: 1.3333334 220 | value: 0 221 | inSlope: 0 222 | outSlope: 0 223 | tangentMode: 136 224 | - serializedVersion: 2 225 | time: 2 226 | value: 0 227 | inSlope: 0 228 | outSlope: 0 229 | tangentMode: 136 230 | - serializedVersion: 2 231 | time: 3.3333333 232 | value: 6 233 | inSlope: 0 234 | outSlope: 0 235 | tangentMode: 136 236 | m_PreInfinity: 2 237 | m_PostInfinity: 2 238 | m_RotationOrder: 4 239 | attribute: m_LocalScale.y 240 | path: Unmask 241 | classID: 224 242 | script: {fileID: 0} 243 | - curve: 244 | serializedVersion: 2 245 | m_Curve: 246 | - serializedVersion: 2 247 | time: 0 248 | value: 6 249 | inSlope: 0 250 | outSlope: 0 251 | tangentMode: 136 252 | - serializedVersion: 2 253 | time: 0.6666667 254 | value: 1 255 | inSlope: 4.2190137 256 | outSlope: 9.194191 257 | tangentMode: 1 258 | - serializedVersion: 2 259 | time: 1.3333334 260 | value: 0 261 | inSlope: 0 262 | outSlope: 0 263 | tangentMode: 136 264 | - serializedVersion: 2 265 | time: 2 266 | value: 0 267 | inSlope: 0 268 | outSlope: 0 269 | tangentMode: 136 270 | - serializedVersion: 2 271 | time: 3.3333333 272 | value: 6 273 | inSlope: 0 274 | outSlope: 0 275 | tangentMode: 136 276 | m_PreInfinity: 2 277 | m_PostInfinity: 2 278 | m_RotationOrder: 4 279 | attribute: m_LocalScale.z 280 | path: Unmask 281 | classID: 224 282 | script: {fileID: 0} 283 | m_EulerEditorCurves: [] 284 | m_HasGenericRootTransform: 0 285 | m_HasMotionFloatCurves: 0 286 | m_GenerateMotionCurves: 0 287 | m_IsEmpty: 0 288 | m_Events: [] 289 | --- !u!74 &74712277817849052 290 | AnimationClip: 291 | m_ObjectHideFlags: 0 292 | m_PrefabParentObject: {fileID: 0} 293 | m_PrefabInternal: {fileID: 0} 294 | m_Name: Unity-chan 295 | serializedVersion: 6 296 | m_Legacy: 0 297 | m_Compressed: 0 298 | m_UseHighQualityCurve: 1 299 | m_RotationCurves: [] 300 | m_CompressedRotationCurves: [] 301 | m_EulerCurves: [] 302 | m_PositionCurves: [] 303 | m_ScaleCurves: [] 304 | m_FloatCurves: 305 | - curve: 306 | serializedVersion: 2 307 | m_Curve: 308 | - serializedVersion: 2 309 | time: 0 310 | value: -106 311 | inSlope: 164.55727 312 | outSlope: 164.55727 313 | tangentMode: 0 314 | - serializedVersion: 2 315 | time: 0.13333334 316 | value: -120.75326 317 | inSlope: -36.76942 318 | outSlope: -36.76942 319 | tangentMode: 0 320 | - serializedVersion: 2 321 | time: 0.3 322 | value: -120.551094 323 | inSlope: 79.18263 324 | outSlope: 1345.8124 325 | tangentMode: 1 326 | - serializedVersion: 2 327 | time: 0.73333335 328 | value: 147.97392 329 | inSlope: 0 330 | outSlope: 0 331 | tangentMode: 1 332 | - serializedVersion: 2 333 | time: 1.2 334 | value: -137.52618 335 | inSlope: -1288.0786 336 | outSlope: -23.538046 337 | tangentMode: 1 338 | - serializedVersion: 2 339 | time: 1.3333334 340 | value: -106 341 | inSlope: 483.03482 342 | outSlope: 483.03482 343 | tangentMode: 0 344 | m_PreInfinity: 2 345 | m_PostInfinity: 2 346 | m_RotationOrder: 4 347 | attribute: m_AnchoredPosition.y 348 | path: 349 | classID: 224 350 | script: {fileID: 0} 351 | m_PPtrCurves: [] 352 | m_SampleRate: 30 353 | m_WrapMode: 0 354 | m_Bounds: 355 | m_Center: {x: 0, y: 0, z: 0} 356 | m_Extent: {x: 0, y: 0, z: 0} 357 | m_ClipBindingConstant: 358 | genericBindings: [] 359 | pptrCurveMapping: [] 360 | m_AnimationClipSettings: 361 | serializedVersion: 2 362 | m_AdditiveReferencePoseClip: {fileID: 0} 363 | m_AdditiveReferencePoseTime: 0 364 | m_StartTime: 0 365 | m_StopTime: 1.3333334 366 | m_OrientationOffsetY: 0 367 | m_Level: 0 368 | m_CycleOffset: 0 369 | m_HasAdditiveReferencePose: 0 370 | m_LoopTime: 0 371 | m_LoopBlend: 0 372 | m_LoopBlendOrientation: 0 373 | m_LoopBlendPositionY: 0 374 | m_LoopBlendPositionXZ: 0 375 | m_KeepOriginalOrientation: 0 376 | m_KeepOriginalPositionY: 1 377 | m_KeepOriginalPositionXZ: 0 378 | m_HeightFromFeet: 0 379 | m_Mirror: 0 380 | m_EditorCurves: 381 | - curve: 382 | serializedVersion: 2 383 | m_Curve: 384 | - serializedVersion: 2 385 | time: 0 386 | value: -106 387 | inSlope: 164.55727 388 | outSlope: 164.55727 389 | tangentMode: 0 390 | - serializedVersion: 2 391 | time: 0.13333334 392 | value: -120.75326 393 | inSlope: -36.76942 394 | outSlope: -36.76942 395 | tangentMode: 0 396 | - serializedVersion: 2 397 | time: 0.3 398 | value: -120.551094 399 | inSlope: 79.18263 400 | outSlope: 1345.8124 401 | tangentMode: 1 402 | - serializedVersion: 2 403 | time: 0.73333335 404 | value: 147.97392 405 | inSlope: 0 406 | outSlope: 0 407 | tangentMode: 1 408 | - serializedVersion: 2 409 | time: 1.2 410 | value: -137.52618 411 | inSlope: -1288.0786 412 | outSlope: -23.538046 413 | tangentMode: 1 414 | - serializedVersion: 2 415 | time: 1.3333334 416 | value: -106 417 | inSlope: 483.03482 418 | outSlope: 483.03482 419 | tangentMode: 0 420 | m_PreInfinity: 2 421 | m_PostInfinity: 2 422 | m_RotationOrder: 4 423 | attribute: m_AnchoredPosition.y 424 | path: 425 | classID: 224 426 | script: {fileID: 0} 427 | m_EulerEditorCurves: [] 428 | m_HasGenericRootTransform: 0 429 | m_HasMotionFloatCurves: 0 430 | m_GenerateMotionCurves: 0 431 | m_IsEmpty: 0 432 | m_Events: [] 433 | --- !u!1101 &1101087292470647114 434 | AnimatorStateTransition: 435 | m_ObjectHideFlags: 1 436 | m_PrefabParentObject: {fileID: 0} 437 | m_PrefabInternal: {fileID: 0} 438 | m_Name: 439 | m_Conditions: 440 | - m_ConditionMode: 1 441 | m_ConditionEvent: Show 442 | m_EventTreshold: 0 443 | m_DstStateMachine: {fileID: 0} 444 | m_DstState: {fileID: 1102825421547131036} 445 | m_Solo: 0 446 | m_Mute: 0 447 | m_IsExit: 0 448 | serializedVersion: 3 449 | m_TransitionDuration: 0 450 | m_TransitionOffset: 0 451 | m_ExitTime: 0.9 452 | m_HasExitTime: 0 453 | m_HasFixedDuration: 1 454 | m_InterruptionSource: 0 455 | m_OrderedInterruption: 1 456 | m_CanTransitionToSelf: 1 457 | --- !u!1101 &1101179962649842764 458 | AnimatorStateTransition: 459 | m_ObjectHideFlags: 1 460 | m_PrefabParentObject: {fileID: 0} 461 | m_PrefabInternal: {fileID: 0} 462 | m_Name: 463 | m_Conditions: 464 | - m_ConditionMode: 1 465 | m_ConditionEvent: Unity-chan 466 | m_EventTreshold: 0 467 | m_DstStateMachine: {fileID: 0} 468 | m_DstState: {fileID: 1102250721251044598} 469 | m_Solo: 0 470 | m_Mute: 0 471 | m_IsExit: 0 472 | serializedVersion: 3 473 | m_TransitionDuration: 0 474 | m_TransitionOffset: 0 475 | m_ExitTime: 0.9 476 | m_HasExitTime: 0 477 | m_HasFixedDuration: 1 478 | m_InterruptionSource: 0 479 | m_OrderedInterruption: 1 480 | m_CanTransitionToSelf: 1 481 | --- !u!1102 &1102250721251044598 482 | AnimatorState: 483 | serializedVersion: 5 484 | m_ObjectHideFlags: 1 485 | m_PrefabParentObject: {fileID: 0} 486 | m_PrefabInternal: {fileID: 0} 487 | m_Name: Unity-chan 488 | m_Speed: 1 489 | m_CycleOffset: 0 490 | m_Transitions: [] 491 | m_StateMachineBehaviours: [] 492 | m_Position: {x: 50, y: 50, z: 0} 493 | m_IKOnFeet: 0 494 | m_WriteDefaultValues: 0 495 | m_Mirror: 0 496 | m_SpeedParameterActive: 0 497 | m_MirrorParameterActive: 0 498 | m_CycleOffsetParameterActive: 0 499 | m_Motion: {fileID: 74712277817849052} 500 | m_Tag: 501 | m_SpeedParameter: 502 | m_MirrorParameter: 503 | m_CycleOffsetParameter: 504 | --- !u!1102 &1102340955297660218 505 | AnimatorState: 506 | serializedVersion: 5 507 | m_ObjectHideFlags: 1 508 | m_PrefabParentObject: {fileID: 0} 509 | m_PrefabInternal: {fileID: 0} 510 | m_Name: default 511 | m_Speed: 1 512 | m_CycleOffset: 0 513 | m_Transitions: [] 514 | m_StateMachineBehaviours: [] 515 | m_Position: {x: 50, y: 50, z: 0} 516 | m_IKOnFeet: 0 517 | m_WriteDefaultValues: 0 518 | m_Mirror: 0 519 | m_SpeedParameterActive: 0 520 | m_MirrorParameterActive: 0 521 | m_CycleOffsetParameterActive: 0 522 | m_Motion: {fileID: 0} 523 | m_Tag: 524 | m_SpeedParameter: 525 | m_MirrorParameter: 526 | m_CycleOffsetParameter: 527 | --- !u!1102 &1102825421547131036 528 | AnimatorState: 529 | serializedVersion: 5 530 | m_ObjectHideFlags: 1 531 | m_PrefabParentObject: {fileID: 0} 532 | m_PrefabInternal: {fileID: 0} 533 | m_Name: Show 534 | m_Speed: 1 535 | m_CycleOffset: 0 536 | m_Transitions: [] 537 | m_StateMachineBehaviours: [] 538 | m_Position: {x: 50, y: 50, z: 0} 539 | m_IKOnFeet: 0 540 | m_WriteDefaultValues: 0 541 | m_Mirror: 0 542 | m_SpeedParameterActive: 0 543 | m_MirrorParameterActive: 0 544 | m_CycleOffsetParameterActive: 0 545 | m_Motion: {fileID: 74359422084734458} 546 | m_Tag: 547 | m_SpeedParameter: 548 | m_MirrorParameter: 549 | m_CycleOffsetParameter: 550 | --- !u!1107 &1107663234215992080 551 | AnimatorStateMachine: 552 | serializedVersion: 5 553 | m_ObjectHideFlags: 1 554 | m_PrefabParentObject: {fileID: 0} 555 | m_PrefabInternal: {fileID: 0} 556 | m_Name: Base Layer 557 | m_ChildStates: 558 | - serializedVersion: 1 559 | m_State: {fileID: 1102825421547131036} 560 | m_Position: {x: 360, y: 12, z: 0} 561 | - serializedVersion: 1 562 | m_State: {fileID: 1102340955297660218} 563 | m_Position: {x: 360, y: -72, z: 0} 564 | - serializedVersion: 1 565 | m_State: {fileID: 1102250721251044598} 566 | m_Position: {x: 360, y: 60, z: 0} 567 | m_ChildStateMachines: [] 568 | m_AnyStateTransitions: 569 | - {fileID: 1101087292470647114} 570 | - {fileID: 1101179962649842764} 571 | m_EntryTransitions: [] 572 | m_StateMachineTransitions: {} 573 | m_StateMachineBehaviours: [] 574 | m_AnyStatePosition: {x: 48, y: 24, z: 0} 575 | m_EntryPosition: {x: 144, y: -84, z: 0} 576 | m_ExitPosition: {x: 800, y: 120, z: 0} 577 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 578 | m_DefaultState: {fileID: 1102340955297660218} 579 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a0c211e2368a4ccb99a4f99bb3195ab 3 | timeCreated: 1539248707 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Coffee.UIExtensions.Demos 5 | { 6 | public class Unmask_Demo : MonoBehaviour 7 | { 8 | [SerializeField] Unmask unmask = null; 9 | [SerializeField] Unmask[] smoothingUnmasks = new Unmask[0]; 10 | [SerializeField] Graphic transition = null; 11 | [SerializeField] Image transitionImage = null; 12 | [SerializeField] Sprite unity_chan = null; 13 | [SerializeField] Sprite unity_frame = null; 14 | 15 | public void AutoFitToButton(bool flag) 16 | { 17 | unmask.fitOnLateUpdate = flag; 18 | } 19 | 20 | public void SetTransitionColor(bool flag) 21 | { 22 | transition.color = flag ? Color.white : Color.black; 23 | } 24 | 25 | public void SetTransitionImage(bool flag) 26 | { 27 | transitionImage.sprite = flag ? unity_chan : unity_frame; 28 | transitionImage.SetNativeSize(); 29 | var size = transitionImage.rectTransform.rect.size; 30 | transitionImage.rectTransform.sizeDelta = new Vector2(150, size.y / size.x * 150); 31 | } 32 | 33 | public void EnableSmoothing(bool flag) 34 | { 35 | foreach (var unmask in smoothingUnmasks) 36 | { 37 | unmask.edgeSmoothing = flag ? 1 : 0; 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab46b16b64e214e0d91583c53ac12da4 3 | timeCreated: 1539491659 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32ce32a82c95d44f28b601b63832814f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo_Button.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Unmask_Demo_Button 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: Show 12 | m_Type: 9 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 9100000} 17 | m_AnimatorLayers: 18 | - serializedVersion: 5 19 | m_Name: Base Layer 20 | m_StateMachine: {fileID: 1107663234215992080} 21 | m_Mask: {fileID: 0} 22 | m_Motions: [] 23 | m_Behaviours: [] 24 | m_BlendingMode: 0 25 | m_SyncedLayerIndex: -1 26 | m_DefaultWeight: 0 27 | m_IKPass: 0 28 | m_SyncedLayerAffectsTiming: 0 29 | m_Controller: {fileID: 9100000} 30 | --- !u!74 &74082764197807214 31 | AnimationClip: 32 | m_ObjectHideFlags: 0 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 0} 35 | m_Name: Animation 36 | serializedVersion: 6 37 | m_Legacy: 0 38 | m_Compressed: 0 39 | m_UseHighQualityCurve: 1 40 | m_RotationCurves: [] 41 | m_CompressedRotationCurves: [] 42 | m_EulerCurves: 43 | - curve: 44 | serializedVersion: 2 45 | m_Curve: 46 | - serializedVersion: 2 47 | time: 0 48 | value: {x: 0, y: 0, z: 0} 49 | inSlope: {x: 0, y: 0, z: 0} 50 | outSlope: {x: 0, y: 0, z: 0} 51 | tangentMode: 0 52 | - serializedVersion: 2 53 | time: 0.5 54 | value: {x: 0, y: 0, z: 15} 55 | inSlope: {x: 0, y: 0, z: 0} 56 | outSlope: {x: 0, y: 0, z: 0} 57 | tangentMode: 0 58 | - serializedVersion: 2 59 | time: 1.5 60 | value: {x: 0, y: 0, z: -15} 61 | inSlope: {x: 0, y: 0, z: 0} 62 | outSlope: {x: 0, y: 0, z: 0} 63 | tangentMode: 0 64 | - serializedVersion: 2 65 | time: 2 66 | value: {x: 0, y: 0, z: 0} 67 | inSlope: {x: 0, y: 0, z: 0} 68 | outSlope: {x: 0, y: 0, z: 0} 69 | tangentMode: 0 70 | - serializedVersion: 2 71 | time: 2.5 72 | value: {x: 0, y: 0, z: 0} 73 | inSlope: {x: 0, y: 0, z: 0} 74 | outSlope: {x: 0, y: 0, z: 0} 75 | tangentMode: 0 76 | m_PreInfinity: 2 77 | m_PostInfinity: 2 78 | m_RotationOrder: 4 79 | path: 80 | m_PositionCurves: [] 81 | m_ScaleCurves: 82 | - curve: 83 | serializedVersion: 2 84 | m_Curve: 85 | - serializedVersion: 2 86 | time: 0 87 | value: {x: 1, y: 1, z: 1} 88 | inSlope: {x: 0, y: 0, z: 0} 89 | outSlope: {x: 0, y: 0, z: 0} 90 | tangentMode: 0 91 | - serializedVersion: 2 92 | time: 1.5 93 | value: {x: 0.8, y: 1.2, z: 1} 94 | inSlope: {x: 0, y: 0, z: 0} 95 | outSlope: {x: 0, y: 0, z: 0} 96 | tangentMode: 0 97 | - serializedVersion: 2 98 | time: 2.5 99 | value: {x: 1, y: 1, z: 1} 100 | inSlope: {x: 0, y: 0, z: 0} 101 | outSlope: {x: 0, y: 0, z: 0} 102 | tangentMode: 0 103 | m_PreInfinity: 2 104 | m_PostInfinity: 2 105 | m_RotationOrder: 4 106 | path: 107 | m_FloatCurves: [] 108 | m_PPtrCurves: [] 109 | m_SampleRate: 30 110 | m_WrapMode: 0 111 | m_Bounds: 112 | m_Center: {x: 0, y: 0, z: 0} 113 | m_Extent: {x: 0, y: 0, z: 0} 114 | m_ClipBindingConstant: 115 | genericBindings: [] 116 | pptrCurveMapping: [] 117 | m_AnimationClipSettings: 118 | serializedVersion: 2 119 | m_AdditiveReferencePoseClip: {fileID: 0} 120 | m_AdditiveReferencePoseTime: 0 121 | m_StartTime: 0 122 | m_StopTime: 2.5 123 | m_OrientationOffsetY: 0 124 | m_Level: 0 125 | m_CycleOffset: 0 126 | m_HasAdditiveReferencePose: 0 127 | m_LoopTime: 1 128 | m_LoopBlend: 0 129 | m_LoopBlendOrientation: 0 130 | m_LoopBlendPositionY: 0 131 | m_LoopBlendPositionXZ: 0 132 | m_KeepOriginalOrientation: 0 133 | m_KeepOriginalPositionY: 1 134 | m_KeepOriginalPositionXZ: 0 135 | m_HeightFromFeet: 0 136 | m_Mirror: 0 137 | m_EditorCurves: 138 | - curve: 139 | serializedVersion: 2 140 | m_Curve: 141 | - serializedVersion: 2 142 | time: 0 143 | value: 0 144 | inSlope: 0 145 | outSlope: 0 146 | tangentMode: 136 147 | - serializedVersion: 2 148 | time: 0.5 149 | value: 15 150 | inSlope: 0 151 | outSlope: 0 152 | tangentMode: 136 153 | - serializedVersion: 2 154 | time: 1.5 155 | value: -15 156 | inSlope: 0 157 | outSlope: 0 158 | tangentMode: 136 159 | - serializedVersion: 2 160 | time: 2 161 | value: 0 162 | inSlope: 0 163 | outSlope: 0 164 | tangentMode: 136 165 | - serializedVersion: 2 166 | time: 2.5 167 | value: 0 168 | inSlope: 0 169 | outSlope: 0 170 | tangentMode: 136 171 | m_PreInfinity: 2 172 | m_PostInfinity: 2 173 | m_RotationOrder: 4 174 | attribute: localEulerAnglesRaw.z 175 | path: 176 | classID: 224 177 | script: {fileID: 0} 178 | - curve: 179 | serializedVersion: 2 180 | m_Curve: 181 | - serializedVersion: 2 182 | time: 0 183 | value: 1 184 | inSlope: 0 185 | outSlope: 0 186 | tangentMode: 136 187 | - serializedVersion: 2 188 | time: 1.5 189 | value: 0.8 190 | inSlope: 0 191 | outSlope: 0 192 | tangentMode: 136 193 | - serializedVersion: 2 194 | time: 2.5 195 | value: 1 196 | inSlope: 0 197 | outSlope: 0 198 | tangentMode: 136 199 | m_PreInfinity: 2 200 | m_PostInfinity: 2 201 | m_RotationOrder: 4 202 | attribute: m_LocalScale.x 203 | path: 204 | classID: 224 205 | script: {fileID: 0} 206 | - curve: 207 | serializedVersion: 2 208 | m_Curve: 209 | - serializedVersion: 2 210 | time: 0 211 | value: 1 212 | inSlope: 0 213 | outSlope: 0 214 | tangentMode: 136 215 | - serializedVersion: 2 216 | time: 1.5 217 | value: 1.2 218 | inSlope: 0 219 | outSlope: 0 220 | tangentMode: 136 221 | - serializedVersion: 2 222 | time: 2.5 223 | value: 1 224 | inSlope: 0 225 | outSlope: 0 226 | tangentMode: 136 227 | m_PreInfinity: 2 228 | m_PostInfinity: 2 229 | m_RotationOrder: 4 230 | attribute: m_LocalScale.y 231 | path: 232 | classID: 224 233 | script: {fileID: 0} 234 | m_EulerEditorCurves: [] 235 | m_HasGenericRootTransform: 1 236 | m_HasMotionFloatCurves: 0 237 | m_GenerateMotionCurves: 0 238 | m_IsEmpty: 0 239 | m_Events: [] 240 | --- !u!1102 &1102197570524598928 241 | AnimatorState: 242 | serializedVersion: 5 243 | m_ObjectHideFlags: 1 244 | m_PrefabParentObject: {fileID: 0} 245 | m_PrefabInternal: {fileID: 0} 246 | m_Name: Animation 247 | m_Speed: 1 248 | m_CycleOffset: 0 249 | m_Transitions: [] 250 | m_StateMachineBehaviours: [] 251 | m_Position: {x: 50, y: 50, z: 0} 252 | m_IKOnFeet: 0 253 | m_WriteDefaultValues: 1 254 | m_Mirror: 0 255 | m_SpeedParameterActive: 0 256 | m_MirrorParameterActive: 0 257 | m_CycleOffsetParameterActive: 0 258 | m_Motion: {fileID: 74082764197807214} 259 | m_Tag: 260 | m_SpeedParameter: 261 | m_MirrorParameter: 262 | m_CycleOffsetParameter: 263 | --- !u!1107 &1107663234215992080 264 | AnimatorStateMachine: 265 | serializedVersion: 5 266 | m_ObjectHideFlags: 1 267 | m_PrefabParentObject: {fileID: 0} 268 | m_PrefabInternal: {fileID: 0} 269 | m_Name: Base Layer 270 | m_ChildStates: 271 | - serializedVersion: 1 272 | m_State: {fileID: 1102197570524598928} 273 | m_Position: {x: 336, y: -84, z: 0} 274 | m_ChildStateMachines: [] 275 | m_AnyStateTransitions: [] 276 | m_EntryTransitions: [] 277 | m_StateMachineTransitions: {} 278 | m_StateMachineBehaviours: [] 279 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 280 | m_EntryPosition: {x: 144, y: -84, z: 0} 281 | m_ExitPosition: {x: 800, y: 120, z: 0} 282 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 283 | m_DefaultState: {fileID: 1102197570524598928} 284 | -------------------------------------------------------------------------------- /Samples~/Demo/Unmask_Demo_Button.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb134c10bcf4344b6812e6dc0d970dd1 3 | timeCreated: 1539248707 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50a872063d2754fcd9d092eab7677003 3 | folderAsset: yes 4 | timeCreated: 1539214485 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Scripts/Coffee.UnmaskForUGUI.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coffee.UnmaskForUGUI", 3 | "references": [], 4 | "includePlatforms": [], 5 | "excludePlatforms": [] 6 | } -------------------------------------------------------------------------------- /Scripts/Coffee.UnmaskForUGUI.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ef573751495a4f88822a98a88954a0b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e643812cd08a4453699dfb822174293d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Editor/Coffee.UnmaskForUGUI.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coffee.UnmaskForUGUI.Editor", 3 | "references": [ 4 | "Coffee.UnmaskForUGUI" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": false, 15 | "defineConstraints": [] 16 | } -------------------------------------------------------------------------------- /Scripts/Editor/Coffee.UnmaskForUGUI.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffa5e7486ed1842bc83e3e28c764641b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts/Editor/ImportSampleMenu.cs: -------------------------------------------------------------------------------- 1 | #if !UNITY_2019_1_OR_NEWER 2 | using System.IO; 3 | using System.Linq; 4 | using System.Text.RegularExpressions; 5 | using UnityEditor; 6 | 7 | namespace Coffee.UIExtensions.Editors 8 | { 9 | internal static class ImportSampleMenu_UIUnmask 10 | { 11 | private const string k_DisplayName = "UI Unmask"; 12 | private const string k_JsonGuid = "011faffdd04c64066883bc8402a48942"; 13 | 14 | [MenuItem("Assets/Samples/" + k_DisplayName + "/Import Demo")] 15 | private static void ImportDemo() 16 | { 17 | ImportSample(k_JsonGuid, "Demo"); 18 | } 19 | 20 | private static void ImportSample(string jsonGuid, string sampleName) 21 | { 22 | var jsonPath = AssetDatabase.GUIDToAssetPath(jsonGuid); 23 | var packageRoot = Path.GetDirectoryName(jsonPath).Replace('\\', '/'); 24 | var json = File.ReadAllText(jsonPath); 25 | var version = Regex.Match(json, "\"version\"\\s*:\\s*\"([^\"]+)\"").Groups[1].Value; 26 | var src = string.Format("{0}/Samples~/{1}", packageRoot, sampleName); 27 | var dst = string.Format("Assets/Samples/{0}/{1}/{2}", k_DisplayName, version, sampleName); 28 | var previousPath = GetPreviousSamplePath(k_DisplayName, sampleName); 29 | 30 | // Remove the previous sample directory. 31 | if (!string.IsNullOrEmpty(previousPath)) 32 | { 33 | var msg = "A different version of the sample is already imported at\n\n" 34 | + previousPath 35 | + "\n\nIt will be deleted when you update. Are you sure you want to continue?"; 36 | if (!EditorUtility.DisplayDialog("Sample Importer", msg, "OK", "Cancel")) 37 | return; 38 | 39 | FileUtil.DeleteFileOrDirectory(previousPath); 40 | 41 | var metaFile = previousPath + ".meta"; 42 | if (File.Exists(metaFile)) 43 | FileUtil.DeleteFileOrDirectory(metaFile); 44 | } 45 | 46 | if (!Directory.Exists(dst)) 47 | FileUtil.DeleteFileOrDirectory(dst); 48 | 49 | var dstDir = Path.GetDirectoryName(dst); 50 | if (!Directory.Exists(dstDir)) 51 | Directory.CreateDirectory(dstDir); 52 | 53 | if (Directory.Exists(src)) 54 | FileUtil.CopyFileOrDirectory(src, dst); 55 | else 56 | throw new DirectoryNotFoundException(src); 57 | 58 | AssetDatabase.Refresh(ImportAssetOptions.ImportRecursive); 59 | } 60 | 61 | private static string GetPreviousSamplePath(string displayName, string sampleName) 62 | { 63 | var sampleRoot = string.Format("Assets/Samples/{0}", displayName); 64 | var sampleRootInfo = new DirectoryInfo(sampleRoot); 65 | if (!sampleRootInfo.Exists) return null; 66 | 67 | return sampleRootInfo.GetDirectories() 68 | .Select(versionDir => Path.Combine(versionDir.ToString(), sampleName)) 69 | .FirstOrDefault(Directory.Exists); 70 | } 71 | } 72 | } 73 | #endif 74 | -------------------------------------------------------------------------------- /Scripts/Editor/ImportSampleMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c85dfe3e8c67c49c3ba7d8c035da69bf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/MenuOptions.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Coffee.UIExtensions.Editors 6 | { 7 | internal class MenuOptions_UIUnmask 8 | { 9 | [MenuItem("GameObject/UI/Unmask/Tutorial Button")] 10 | private static void CreateTutorialButton2(MenuCommand menuCommand) 11 | { 12 | #if UNITY_2021_2_OR_NEWER 13 | const string menuItemName = "GameObject/UI/Legacy/Button"; 14 | #else 15 | const string menuItemName = "GameObject/UI/Button"; 16 | #endif 17 | EditorApplication.ExecuteMenuItem(menuItemName); 18 | var button = Selection.activeGameObject.GetComponent