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 Jan_Julius · Nov 11, 2014 at 09:26 AM · guispritespritessprite editor

Using sprites as GUI

I have a sheet of interface elements that I want to use as GUI but how can I use the sprites in my code? I've used the sprite editor set it to multiple etc. but how can I use this in my code? when I drag them into my sprite variable it just displays the whole sheet.

Thanks,

Jan Julius.

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 oxa89 · Nov 11, 2014 at 10:57 AM 0
Share

Why don't you drag sprites on the scene, make GUI look as you wish and detect click on them when needed?

avatar image Jan_Julius · Nov 11, 2014 at 12:26 PM 0
Share

Is nGUI easy to use with mobile/android games?

avatar image SanSolo · Nov 11, 2014 at 12:31 PM 0
Share

It is very easy to use and works great on mobile. It is among the top selling assets on the store and support is great too.

avatar image SanSolo · Nov 11, 2014 at 12:32 PM 0
Share

There's also 2Dtoolkit, but that is more than just GUI tool. I bought NGUI because i found a book on it. The book is for an outdated version of NGUI, but good to understand the tool.

avatar image Jan_Julius · Nov 11, 2014 at 12:35 PM 0
Share

Oh I see, I'm unable to purchase anything though and am stuck with the assets I receive, I programmed it with the old system like I did with a lot of my previous games just the regular GUI that's installed with Unity but my project leader gave me a sheet full of sprites whom I had to cut out with the sprite editor, but I'm rather clueless and don't really know what to do with a few things as in placing stars for finishing a level, my old method was just looping through and adding a star for ever loop a few 10s of coordinates away but I have no idea how I would be doing that now.

Thanks.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by SanSolo · Nov 11, 2014 at 11:11 AM

You'd need a GUI manager anyway to handle multiple resolutions. So i'd recommend NGUI. It has Atlas maker where you can create an atlas from your images and use them for GUI.

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

27 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

Related Questions

Change UI GUI Image Sprite at runtime .. Unity 5 .. js 1 Answer

Non-Rectangular sprites in the sprite editor 0 Answers

How to get one script to manage many sprites 0 Answers

How to position elements on scene 0 Answers

How to add sprites to a canvas via scripting 1 Answer


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