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 faftek · Apr 02, 2014 at 06:54 PM · mouseclickmouse positionclick objects

How to highlight a box in a grid on mouse hover, action whenever clicked

Alright so I should probably mention I do know what a collision is, but i've never really worked much in unity so i'm just starting out. I've created a static grid in photoshop(i'm going to make this dynamic later), each sqaure in the grid 40x40px.

Essentially I just want it so whenever the mouse hovers over a box that box will glow, and will have a collision but only upon click.

Feel free to show advanced code if necessary, I'll be able to figure all of that out, I used to use XNA and this is a big jump, so I appreciate the help! I've also attached a screenshot of the current environment if that gives you any ideas.

alt text]

Comment
Add comment · Show 1
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 Gruffy · Apr 02, 2014 at 08:18 PM 0
Share

Hey bud, sounds like you need to look at the On$$anonymous$$ouse events that are supplied in Unity. here is the link to docs for that subject matter, checking about halfway down to see the On$$anonymous$$ouse Events like On$$anonymous$$ouseOver, Down, Enter, Exit... all of which can be used to effect hover and click actions. With respect to highlighting with your hover or click etc, you might go for a material or color change. For that you should look at.. Color Renderer.$$anonymous$$aterial

hope these help you on your way bud. when you have something coded and you get stuck , bring it back here and we can help with anything you get stuck with. take care bud Gruffy

0 Replies

· Add your reply
  • Sort: 

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

21 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

Related Questions

Block Touch 1 Answer

Unity mouse input gradually becomes off 0 Answers

Do not allow "click" on anithing unless it's in a GUI.Box 0 Answers

Check if an image has been clicked 1 Answer

Disable mouse input and cursor in game 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