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
2
Question by Mike 12 · Dec 07, 2010 at 05:26 PM · contextmenu

Where is the Context-Menu Located in Unity?

I want to make a function visible in the "context-menu" of my object, using [ContextMenu("Context-Menu")] followed by a function definition. However, I can't seem to find the context menu in the inspector. So, it seems that I can't make use of this feature right now because I can't find the context menu in Unity.

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
4

Answer by burnumd · Feb 14, 2011 at 10:00 PM

In the inspector, each component has a small gear-shaped icon in the upper right-hand corner of the panel. Clicking that gear will display the component's context menu. When you've set a ContextMenu attribute for a function, it should appear at the bottom of the context menu for that component.

Note that the component must be added to a GameObject and you must be viewing that GameObject in the Inspector for the context menu to appear (ie, it will not appear if you simply select the script in the "Project" pane).

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
avatar image
3

Answer by SteveFSP · Dec 07, 2010 at 05:40 PM

A context-menu is the menu that appears when you right-click or hold-click the mouse over the area associated with the menu. In your case, the inspector. So position the mouse over the inspector and, for a two button mouse, right-click. If there is a menu associated with the inspector, it should appear.

For a one button mouse, I think it is to click and hold.

Wikipedia

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 Statement · Dec 07, 2010 at 05:51 PM 0
Share

Or the short version: Right click the component.

avatar image Mike 12 · Dec 08, 2010 at 05:41 PM 0
Share

Right click the component, or right-click the inspector? Umm... It didn't work. These things I've already tried and I couldn't find them. If anyone has like a screen cap showing me this context menu, that would be awesome. $$anonymous$$aybe I'm too thick to understand everyone's complicating words.

avatar image SteveFSP · Dec 09, 2010 at 05:16 PM 0
Share

How about updating your question with an example of your code? Then I can try it out and possibly give you a step-by-step.

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

No one has followed this question yet.

Related Questions

Extending the Project View 2 Answers

Determine the Scene that is selected when using context menu 0 Answers

Procedural Context Menu 0 Answers

HTML / Webplayer help! Where do I add this line of code on the HTML script for it to disable context menu? 1 Answer

Adding to GameObject context menu WITHOUT [MenuItem(...)] 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