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 s_guy · Jun 13, 2013 at 02:36 AM · animation2dguispriteongui

Any reason to use Unity's GUI paradigm if I'm working with sprite sheets and don't need GUI button presses?

I'm making an (effectively) 2d game that is using sprite sheets a.k.a atlases and I would like to continue to do so for my GUI textures. My GUI basically works like a classic arcade or Nintendo heads-up display. There is no mouse interaction, text input, or sliders / scroll bars.

Looking into the GUI and GUILayout classes, the only straightforward way I see to use a sprite sheet in Unity's built-in GUI paradigm is with GUI.DrawTextureWithTexCoords(). This just draws to an explicit location, using explicit UVs from your sheet.

I have infrastructure to work with sprites and their animations (within sheets) conveniently in main scene. For drawing the GUI on top, I can put the GUI sprites nearer the orthogonal camera (or maybe I'll set up an extra camera for explicit GUI draw order). Is there any reason I should still consider the built-in GUI classes or even use OnGUI()?

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 Next Beat Games · Jun 13, 2013 at 03:58 AM 0
Share

I personally wouldn't use Unity's GUI. Its slow. You should set up your GUI to render how everything else is in your game with the difference that the GUI elements are rendered last. Or as you mentioned, have the GUI elements a bit closer to the camera

avatar image s_guy · Jun 13, 2013 at 03:28 PM 0
Share

Thanks for confir$$anonymous$$g my gut feeling.

1 Reply

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

Answer by Fattie · Jun 13, 2013 at 05:22 AM

Never use Unity's GUI for any reason. Ever. It's only a scratch development tool.

Just completely forget about it and pretend you never heard of it.

Note too that PlayerPrefs is a non-starter because it's not encrypted, grab Secured PlayerPrefs or write your own steganography wrapper.

Regarding 2.5D, everyone uses 2DToolkit or s similar product.

The time saving is unbelievable. It's not realistically possible to use Unity and not use 2DTK. (including in 3D projects where it's the only way to go for anything flat, buttons, signs, whatever.)

It has an extremely advanced sprite sheet management, including automatically doing low-res versions if you are working pixel-perfect, etc etc etc. You just drop PNGs in a folder and it's all done

Purchase 2DTK and all its competitors from the asset store, try them and decide which is for you.

(Note that TK now includes completely inherently "buttons" - very often this is all you will ever need for 90% of titles.)

Regarding GUI, many people use NGUI. This is just personal, but I don't like it. It has a learning curve, and for me the idea of spending time learning to "stick buttons in a game" is insane, but that's just me.** But again NGUI is incredibly popular and it may be for you, if you're project is one of those super-gui-related things. Again if you are doing some sort of gui-heavy thing, and you can't get another job ;-), buy NGUI and all competitors and decide which is best for your pipeline.

Regarding text. The only realistic pipeline for text in Unity is what is explained in the long comment here...

http://answers.unity3d.com/questions/384623/setting-font-size-according-to-screen-dpi.html

With that you can do anything, zero learning curve, any input from your design team, any typography, one draw call, what you see is what you get in the editor, and it's utterly proven and bug-free.

Regarding glowing and other lines on the screen, grab Vectrosity. If you need 3D letters, grab flying text 3D. For shape-shfting type things grab Mega-Fiers and the other products the same guys make.

Finally of course you'll use Prime31 every day, it's a basic part of development, the main middleware for games

Hope it helps in some way !


**making games for a living is the best job that has ever been, or will ever be, invented on this planet. the idea of having the job "making games for a living" and then spending more than 8 seconds "doing buttons" is a bit like being married to Gisele Bundchen or Ryan Gossling and then spending time, say, doing government paperwork. Let's get back to BLOWING STUFF UP ! :)

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 s_guy · Jun 13, 2013 at 03:29 PM 0
Share

Thanks for all of the awesome leads!

avatar image Fattie · Jun 13, 2013 at 03:32 PM 0
Share

i really hope it helps cheers

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

16 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

Related Questions

Having trouble changing sprites in 2 dimensional animation 1 Answer

How to make a sprite stay at a consistant baseline during animation? 1 Answer

Can you change the sprites of a 2d character rig (at runtime)? 1 Answer

Replace Sprite Sheet that's Already Animted? 0 Answers

Recoloring animated sprites [Solved] 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