Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
3
Question by Casper 1 · Feb 23, 2012 at 11:39 PM · meshhideshowpowerbar

Hide/Show part of a GameObject

Hello

I have a GameObject that has the mesh of an arrow.

I want this arrow to "power" up like a power bar.

My idea is to have 2 arrows in the same place where one of the arrows is hidden.

Then when the user presses "Space" the hidden arrow slowly begins to be revealed, however I have no idea how to do this.

The idea is similar to this: (Except this is 2D)

http://www.basketball-games.net/play/crazy-hoopz.htm

alt text

Comment
Add comment · Show 3
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 Travis 18 · Feb 24, 2012 at 12:13 AM 0
Share

Are you looking for a 3D version of the power up arrow in your pic there?

avatar image Casper 1 · Feb 24, 2012 at 12:38 AM 0
Share

If I understand you correctly, then yes.

I want a 3D version of what my link contains :-)

avatar image Fattie · Jan 18, 2013 at 03:49 PM 0
Share

2DToolkit contains proper clipped sprites, you just adjust a variable and the cut moves up and down. incredibly handy.

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Casper 1 · Mar 07, 2012 at 07:10 PM

After a lot of research I ended up using masking which I achieved by reading and using this http://www.unifycommunity.com/wiki/index.php?title=DepthMask

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 ForceMagic · Jan 06, 2016 at 06:49 PM 0
Share

Your link is broken.

avatar image
1

Answer by PAEvenson · Feb 25, 2012 at 03:14 AM

I suggest researching animated textures. You COULD fade in the gameobect based on the material's alpha, but it will fade in the whole gameobject. You could also do it in a shader, but it would be rather complicated. I suggest looking at animated textures first.,The simplest solution would be using an animated texture. You COULD slowly fade in a gameobject using the materials alpha value, but you will only be able to fade in the whole object. You could also possibly write a shader to do it, but it would be rather complicated. Research animated textures first. If you feeling ballsy research some shader stuff. You will need to use a mask for the arrow, then scale and interpolate the colors based on the height. Hope this points you in the right direction.

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
avatar image
1

Answer by amuzulo · Apr 19, 2012 at 08:11 AM

If you want a really simple solution, another possibility is to put a cube in front of the area you want to hide and make it the same color as the background.

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

9 People are following this question.

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

Related Questions

Show & Hide GUItexture on keypress 3 Answers

Unity 2019.4.9f1 - Toggle Show/Hide Gameobject with one keystroke. 1 Answer

show "labelnew" after clicking a button and hide "labelold" 1 Answer

Can you use renderer.enabled on array members ? 3 Answers

[FIXED & CLOSED!] How do I show and hide 3D text? 2 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