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 question was closed Jul 28, 2014 at 04:25 PM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by xem · Jul 27, 2014 at 09:17 PM · 2dimageresolutionoverlay

Display a 2D image over my 3D scene

Hello!

I'm just beginning with Unity and I'm new on this forum. I've read all the manuals and tutorials I could find, but I still have a few problems so you'll see me around in the following weeks, when I'm stuck :)

My first question is maybe very straightforward but I couldn't find how to do it.

I'm making a game where I have a 3D scene (say, a FPS map), and I want to display a 2D overlay (for example, the hand holding the gun), like in Doom 1.

My hand+gun image is a pixel-art image and it's exactly 50*50px. My resolution is fixed too: 960*600px.

I'd like to display this image on top of everything, at its native size, and centered at the bottom of the screen.

Is that possible? How?

Thanks a lot for your help!

Sketch of my game's interface

Max

sans titre.png (11.2 kB)
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 robertbu · Jul 27, 2014 at 09:27 PM 0
Share

Research:

  • GUI.DrawTexture()

  • GUITexture

  • Quad (parented to the camera)

  • Quad displayed by second (probably Orthographic) with a higher depth and using layers.

  • Sprite (setup like the previous two points).

These are the common ones that do what you are asking. There are pros and cons to each. And there are others as well, like Graphics.DrawTexture() and GUI.DrawTextureWithTexCoords().

avatar image xem · Jul 28, 2014 at 04:23 PM 0
Share

Thanks! The problem was indeed that I didn't know what to search for :)

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by xem · Jul 28, 2014 at 04:24 PM

Okay, I found this complete answer: http://johnstejskal.com/wp/unity3d-how-to-make-a-2d-gui-hud-interface-to-display-scorelives/ Thanks, and sorry for asking something so dumb :)

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 eovento · Sep 20, 2018 at 11:59 AM 1
Share

Nothing to be sorry, the drawing made my day :))

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Problems assigning sprite's images 1 Answer

Adjust overlay position for different resolutions 0 Answers

everything stretched on iPhone 5 2 Answers

Problem with 2D sprites 0 Answers

Simple way to fit rotated UI element to parent 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