Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by WhispyWoods · Nov 02, 2019 at 08:29 PM · spriterendererfadeoutfadein

FadeIn/Out object composed of multiple sprites?

So I was making a basic RPG and all my tests until now were using simple sprites.

There are different circumstances when I need the characters to fade in and out in order to make the transitions look smooth, and it's working and looking just fine.

 

Now I started using Anima2D, so my characters are composed of multiple sprites, but I realized that when they FadeOut/In you can see through the hair, clothes, etc, and I really don't like how it's looking now.

Small example, you can see the legs behind the skirt during the transition. alt text

And that's it. I want the fadein/out animation to look homogeneous, but I don't know how to approach this problem, so I'm looking for suggestions.

My first guess is that it's something a shader can help with, but since I don't really have experience working with shaders, I have noidea.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TarasHalynskyi · Apr 14, 2020 at 01:25 AM 0
Share

Same problem

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by shaileshteli14 · Apr 14, 2020 at 03:04 AM

@TarasHalynskyi @WhispyWoods Hello, I do have a little solution but, I don't know if it would actually help you. The thing is, just add a sprite mask. In reference to the above chase, add a sprite mask component to the skirt, and add the skirt sprite into it. Then for legs, set the "Mask Interaction" option to "Visible outside the mask".So, that only the part of the legs which are not covered by the skirt will be visible. I haven't tried it but, it should work. Let me know if it works fine.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TarasHalynskyi · Apr 14, 2020 at 03:43 AM 1
Share

Yea it works man. Thanks. Implemented it just some $$anonymous$$utes before your answer =).

avatar image
0

Answer by TarasHalynskyi · Apr 14, 2020 at 03:41 AM

Hi @WhispyWoods I have a solution for u.

  1. Make the custom value of "Order in layer" for each part of your model. (What I think you already did). And make it "Visible outside the mask".

  2. Add "Sprite Mask" to each part. Insert in mask same sprite as on part. Activate "Custome Range" and put Alpha Cuttof to 1 for each mask.

  3. Put the same "Sorting Layer" of the front part of the range on your model parts (I think it should be the same on every part of the model) and "Order in Layer" for every "Sprite Mask". "Order in Layer" should be n - 1. Where n equals to "Order in Layer" of your part.

After this everything will work as u want. As for me, I have used runtime solution but it can be not efficient if u want to use many instances of prefab with this algorithm. If it's one model it is much better to make it once in the editor. Let me know if u will need a code of runtime solution. alt text


screenshot-3.png (110.9 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

226 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What's the easiest way to fade a sprite in? - Looking for equiv of jQuery's fadeIn() 0 Answers

Audio Fade With Toggle 1 Answer

Instantiate prefab with its component c# 0 Answers

Sprites are invisible when passed between scenes 1 Answer

[Solved] Fading Two Materials Using Color 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges