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 UdevMike2k · Apr 04, 2013 at 09:10 AM · buttonlistinspectormenu

Inspector scripting, adding lists, checkboxes and buttons [With Image]

Hey guys, I have a relatively easy(I hope) question about inspector scripting. I am making a script that will instance a variety of models and move them to the left as in a side scrolling space shooter. I have several levels(stages) that I need instanced.

So my question is how can I create elements visible in the right image. I'd like to have a list that will load different parameters below it depending on the stage selected. In addition to buttons and checkboxes. Also, if I need a different script file, how may I connect it to my main script?

Thanks a lot for any leads!

alt text

Comment
Add comment · Show 3
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 · Apr 04, 2013 at 11:37 AM 0
Share

Is your question about how to make a specific look for a specific item, like the header in the list on the right? Or do you wonder how to override the default inspector so you can draw whatever you want in it?

avatar image UdevMike2k · Apr 04, 2013 at 12:02 PM 0
Share

I'd like to be able to override it and enable the user to add items to a list, which the script I make will then read from and change variables accordingly.

avatar image AnOrdinarySandwich · Apr 06, 2017 at 06:31 PM 0
Share

Creating your own custom Inspector look can be complex, especially if you really want to make it highly configured. Take a look at the ICE AI character controller Inspector for a fine example of how amazing and detailed it can be.

But I think you're looking for this:

First, you'll need the class that has the data you want to display, then you'll need another class that's sub-classes Editor, which will access that first data class (through target), and perform the actual Inspector display.

Here's the Unity tutorial on custom Inspectors: https://unity3d.com/learn/tutorials/topics/interface-essentials/building-custom-inspector

Here's the scripting manual link for EditorGUILayout: https://docs.unity3d.com/ScriptReference/EditorGUILayout.html

I'm only just beginning to do this myself, so it's still a slow progress as I have to look up everything and learn as I go :)

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

12 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

Related Questions

Back button on menu to go back to previous menu screen 0 Answers

Adding a Custom Button to the Inspector 0 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How can I add a button to a list? 1 Answer

A node in a childnode? 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