Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by SirMacJefferson · Sep 01, 2011 at 04:10 AM · 2dfpsgraphicscrosshair

Drawing crosshairs and other 2D graphics onto the screen?

I'm trying to develop a demo for an FPS here on Unity, and it's been going good so far (with the help of Unity Answers in some places). However, I'm trying to implement a firing system, but I'm not sure how to draw a crosshair. Does Unity allow making 2D GameObjects of which are scaled by pixels instead of units? I'm familiar with making 2D games where everything is scaled in pixels, but I'm not sure if you can do that with Unity. Any help would be appreciated, Thanks!

Comment
Add comment
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

2 Replies

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

Answer by Rennat · Sep 01, 2011 at 04:14 AM

You can use a `GuiTexture` to draw 2d assets using pixel dimensions.

Comment
Add comment · Show 3 · 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 SirMacJefferson · Sep 01, 2011 at 04:35 AM 0
Share

Thanks! You posted first, so I guess I'll mark you as correct :) I'm sure this will help a lot.

avatar image FTheCloud · Sep 01, 2011 at 04:59 AM 0
Share

you should give him a thumbs up if his answer was right so his credit will show on his karma

avatar image SirMacJefferson · Sep 01, 2011 at 10:54 PM 0
Share

Oh, I thought marking correct gave karma..sorry, I'm still not familiar with the way this site works, heh...well, I gave thumb-ups to both answerers.

avatar image
1

Answer by Adamcbrz · Sep 01, 2011 at 04:17 AM

Look into GUI Textures. Most the time this accomplishes what you are looking for with a crosshair. The easiest way to handle this is to create the 2D image and add it to your assets. Then with that image selected Add new GUI Texture and that texture will be applied at the size of the image.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

2D graphic problem with tilemap and resolution 0 Answers

Sidescroll Shooter Crosshair? 0 Answers

Best way to draw an ECG trace. 2 Answers

Choppy on iPhone only... 1 Answer

Problems with Clamping Player to Screen 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