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
0
Question by baris150490 · Dec 27, 2013 at 01:35 PM · guiuser interfaceray

Which way is a better solution for UI creation?

Hi, i am wondering that which way would be a better solution for ui creation.Currently i am using 3d objects as buttons and for such things.Never used gui textures for the time being.Now i am wondering would it be better using a gui texture for performance purposes?All i do is creating a simple ray and checking which button is in interact with it and do sth over it.Also i won't have to deal with different aspect ratios and screen sizes since its a 3d object and no strechings etc as gui deforms. So i won't need to code that too.Could anyone give me some advices on whether should i stay on what i am doing or change the ui creation via gui?

Comment
Add comment · Show 2
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 Owen-Reynolds · Dec 27, 2013 at 01:41 PM 0
Share

Do you want the buttons to be 3D objects? If so, that way is "better."

Your current buttons, just sitting there waiting to be pushed, are you worried they aren't doing nothing fast enough?

avatar image baris150490 · Dec 27, 2013 at 01:45 PM 0
Share

$$anonymous$$y buttons are 3d objects that represent a 2d image on the screen that can be touched like a gui texture.They are doing their job perfectly, my concern is the colliders they have attached.I marked them as triggers so they won't interact with any of the rigid bodies in the scene but i am a little concerned if i am going on a messy road.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by sparkzbarca · Dec 27, 2013 at 02:09 PM

sounds fine, you can just put them in a special layer if need be thats only casted against for button checks. Simple boxes with box colliders arent going to noticably impact performance so that matters not at all.

Comment
Add comment · Show 2 · 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 Owen-Reynolds · Dec 27, 2013 at 03:06 PM 0
Share

...and then if you really are worried, all game/non-GUI raycasts would say to skip items on that layer.

avatar image baris150490 · Dec 27, 2013 at 03:10 PM 0
Share

Thank you a lot for the comments guys.Since i am checking the buttons via bounds.IntersectsRay there is no need of layer :)

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

20 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

Related Questions

How do you get a minimap to stay rooted to the top left corner of the screen despite resolution changes? 3 Answers

UI buttons become unselectable on scene change 2 Answers

Is the new UI system still not recommended for mobile? (Unity 5) 1 Answer

Calculate pixel size of stretched RectTransform in editor 0 Answers

how to hit a gui button with raycast 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