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 thornekey · Aug 04, 2014 at 03:21 AM · textureobjecticonminimapreplace

Objects on minimap replaced with icon?

I have successfully made a minimap... It is an orthographic camera with the view port scaled down to the appropriate size. My question is: How would i make it so that instead of showing the actual object it shows an icon?

here is a mock up i made for an example:

alt text alt text

Regards

ex2.png (1.4 kB)
ex1.png (1.7 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Aug 05, 2014 at 12:22 AM

Simply use two cameras with different layermasks. So each object actually has both visual representations but the one is only seen by your main camera and the other only by your minimap camera. Simply place the minimap symbols (which should be a child of the actual object) on a seperate layer (you would call that layer "minimap" ;)) and let the minimap camera render only this layer. In your maincameras culling mask you should exclude the minimap layer. That's all.

Comment
Add comment · Show 5 · 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 thornekey · Aug 05, 2014 at 12:29 AM 0
Share

how would i add the icon to the object? what if the object moved? can i do it through a script?

avatar image Bunny83 · Aug 05, 2014 at 01:01 AM 0
Share

You simply add a child object to the object. It automatically moves along with the parent.

avatar image thornekey · Aug 05, 2014 at 01:56 AM 0
Share

that seems like a quick and dirty fix to a big problem. $$anonymous$$y game is multiplayer and every object will be displayed on the $$anonymous$$imap. Adding children will be a bit expensive.

It'd be easier to have each object a tag and find the tag in the $$anonymous$$imap script and display it as the icon.. But i just dont know how to go about that.

avatar image aman_jha · Aug 05, 2014 at 02:05 AM 0
Share

$$anonymous$$aybe having the children only enabled when it is in the view of the $$anonymous$$imap camera?

avatar image Bunny83 · Aug 05, 2014 at 02:30 AM 0
Share

@Yoman: That's not necessary as Unity does frustum culling anyways.

@thornekey: Why do you think adding a child object is too expensive? As the child is only visible by the $$anonymous$$imap camera there is no more overhead as you would have anyways. You want to render your scene twice (since you have two cameras). The $$anonymous$$imap representation usually is simpler (just a quad / sprite / ... for an object).

Actually rendering an icon manually in an immediate mode like in OnGUI is actually way worse for performance, as there it's impossible to batch anything. You can do the child-adding via script if you want, anyways you have to decide somehow which icon / replacement should be used for which object.

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

24 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

Related Questions

Problems with texture icon in Unity3D 4 Answers

Displaying Objective Points Through GUI. 2 Answers

Unity 3 scales my iPhone/iPad icons to nonstandard sizes 0 Answers

Assigning UV Map to model at runtime 0 Answers

Fit image to plane 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