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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Pauls · Feb 06, 2013 at 11:23 AM · 2d3dcirclerectangle

Using 2d image for dragging?

Hi,

i was just wondering: i would like to use this image to open a door, so the more we drag it down, the more the door will open.

alt text

I thought i could put 2 circles and 1 rectangle in an empty in Unity, and scale the rectangle and make the bottom circle follow the movement. But this means creating the 3 shapes with Blender, and add a material as if it was a 3d object (whereas i would like to use it as a 2d object). Is there another way?

Thanks

EDIT:

the shadow issue :

alt text

grey.png (9.3 kB)
light.png (13.7 kB)
Comment
Add comment · Show 7
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 XienDev · Feb 06, 2013 at 11:48 AM 0
Share

Look at GUILayout.VerticalSlider, add this to your custom stile and all should be fine =)

avatar image robertbu · Feb 06, 2013 at 04:00 PM 0
Share

If you are using GUI, then @Pauls suggestion is a good one. If you are not using GUI, use a plane and construct a material with the handle as the texture. $$anonymous$$ake sure you select a shader that supports transparency.

avatar image Pauls · Feb 06, 2013 at 04:39 PM 0
Share

@robertbu @XienDev thanks, this is for mobile, is gui a good suggestion for that? i read that the Gui function needs more resources, and the same with transparency. But alright, i will try these two techniques, if you know any other way, please let me know! Thanks !

avatar image robertbu · Feb 06, 2013 at 06:10 PM 0
Share

We don't use GUI so I cannot speak to GUI's performance on mobile. We use an add-on package called EZGUI and have not had performance issues on iOS. NGUI is popular as well. Transparency is a bit more expensive, but you see it used all the time on mobile. From a performance standpoint, I'd worry more about Drawcalls than transparency. EZGUI (and I believe NGUI as well) build texture atlases and set UV coordinates so that multiple UI elements handled in a single draw call. You can read more about Draw Call batching here:

http://docs.unity3d.com/Documentation/$$anonymous$$anual/DrawCallBatching.html

avatar image Pauls · Feb 06, 2013 at 06:23 PM 0
Share

Okay thanks!

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

10 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

Related Questions

2D object look at 3D object 0 Answers

2d sprite bacground motion? 2 Answers

UDP app signature? 1 Answer

2D and 3D lights in a scene. URP,2D and 3D lights in scene URP 1 Answer

3d and 2d game 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