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 VesuvianPrime · May 04, 2014 at 09:38 PM · editorinspectormenu

How can I make a small context menu in the inspector?

Hi all

Is it possible to make a menu like this pop-up when pressing a button in the inspector? I understand the basics of CustomEditor scripts and how to get a button working, I'm just looking for a way to make the menu.

alt text

Thanks, Ves

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

3 Replies

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

Answer by VesuvianPrime · Jul 30, 2014 at 11:28 AM

The answer I was actually looking for was to use GenericMenus:

http://docs.unity3d.com/ScriptReference/GenericMenu.html

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
1

Answer by SeeSharp · May 04, 2014 at 10:14 PM

Hi,

Are you asking for something like the light 'selection'?(Example below)

alt text

Or the one where you right-click to bring that menu up?

If you are talking about the one where you right-click to bring that menu up, then I'm sorry, but to my knowledge, it is impossible. Notice key word: To my knowledge.

If you want something like in the picture I provided, then you need a custom inspector with a ComboBox. Here's two tutorials I found and used about custom inspectors: Unity's official tutorial, and an 'unofficial' tutorial.

You could probably get a ComboBox tutorial from Unity's official documentation, or another source.

Please ask if you need further assistance.

Best of luck,

SeeSharp.

Comment
Add comment · Show 2 · 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 VesuvianPrime · May 04, 2014 at 11:00 PM 0
Share

Hmm, I suppose I could make do with a combo box, but it's gonna be ugly. Thanks for the advice.

avatar image SeeSharp · May 04, 2014 at 11:04 PM 0
Share

No problem. Please be sure to mark my answer correct if it answered your question :).

Oh and I'm not 100% sure that it's impossible to have the context menu, as I have never seen this get done before.

Best of luck,

SeeSharp.

avatar image
0

Answer by 0V3RR1D3 · May 04, 2014 at 09:45 PM

Coudent you use an enum? - http://unity3d.com/learn/tutorials/modules/beginner/scripting/enumerations

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

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

Inspector Popup format to look like tag or layer popup 1 Answer

Make popup window in inspector if deleting GameObject 0 Answers

Drop down with sizes 1 Answer

ReImport in c# of GameObjects only for Scene Objects, not assets? 1 Answer

Cogwheel icon in inspector 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