Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
0
Question by czater · Jun 01, 2016 at 05:52 PM · spritedamagedecalchanging

Showing damage on sprite - how to?

Is there any other way to show damage on sprite (ex. on bricks) than creating damaged sprite and changing it after hit? Maybe some material magic or so?

Edit: Basicly i want to recreate space invaders game and i wonder if i must create shiled from "bricks" or is there any other way to make gameobject that behave like this. Link: http://www.pacxon4u.com/space-invaders/

Comment
Add comment · Show 5
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 saud_ahmed020 · Jun 01, 2016 at 06:02 PM 0
Share

@czater Do you want to show same sprite as damaged form or just change the correct sprite with damaged one ??

 public Image yourImage;
 public Sprite damagedSprite;
 

// for changing sprite

  yourImage.sprite == damagedSprite;

  
avatar image czater · Jun 01, 2016 at 07:37 PM 0
Share

best for me would be if i can use same sprite for normal and damaged. I mean damaged= normal sprite + some magic staff (shader or sth?) and I wonder if it is possible to do this this way.

avatar image Mmmpies czater · Jun 01, 2016 at 07:47 PM 0
Share

I've converted this to a comment, I know it isn't obvious but the big Reply link is actually to post an Answer! If you want to reply a small reply appears to the right of the name of the poster you reply to, helpfully (not) it's invisible unless you hover over it.

avatar image saud_ahmed020 czater · Jun 02, 2016 at 06:56 AM 0
Share

@czater As far as I know, there is no such way in unity that you are searching.

avatar image Alec-Slayden · Jun 02, 2016 at 08:35 AM 0
Share

I'm having trouble with that link so I will do my best to guess and make recommendations in the form of a comment. $$anonymous$$y recommendations would be (some of these may require the elements to be UI images rather than sprite renderers): 1) just swap them. it's a good idea, it's simple and flexible. I know that's not helpful if you're looking for an alternative, but it is my first recommendation. 2) keep the sprites as white (if possible) and set their color in the inspector according to their damage state. 3) Use a second sprite on top that fades in as damage increases (or for UI sprites, fills in using radial / linear fill) 4) There are, indeed, a large number of material effects and special effect packs in the asset store available that might give you something to work with that you can turn on and off easily.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by xpcrepair23 · Dec 31, 2020 at 10:39 PM

For loop with inner loop and generate the shield from small bricks and destroy as they are shot..

Check out mine. https://youtu.be/xDJ4zzxvqpU

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

76 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

Related Questions

Changing Sprites in Code (c#) help 0 Answers

Help with Changing Sprites in Code (c#) 0 Answers

Function to set enum is not working right. 2 Answers

How to access individual sprites by name when running a "right-click on asset" menuitem? 0 Answers

order in layer not respected in shader 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