• 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 brunopava · Sep 11, 2017 at 10:53 PM · editoreditor-scriptingeditorguieditorguilayouteditor extension

Custom inspector difficulties creating a Box / Group like widget

Hi!

I'm having some difficulties creating a custom inspector script.

What I'm hoping to achieve is something like this box bellow: alt text

Or this video: https://www.youtube.com/watch?time_continue=13&v=yqKG_8OXymM

I have experimented with:

 GUILayout.Box()

But since GUILayout.Box() only accepts content in form o GUIContent it does not fit my needs.

What I want to know exactly is if there is an API that facilitates the creation of such boxes or do I need to create my own wrapper using Rects / GUISkin and such.

The point is, I could do that wrapper but I bet I won't achieve such a clean layout as the provided examples and I'm very concerned with the visuals and UX of this particular editor script I'm working.

screen-shot-2017-09-11-at-73500-pm.png (31.4 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
3

Answer by brunopava · Sep 12, 2017 at 05:57 PM

ANSWER:

This asset provides enough examples to acomplish what I was looking for. https://assetstore.unity.com/packages/tools/gui/editor-style-viewer-3282

Solution example:

 GUILayout.BeginVertical("HelpBox");
 
     GUILayout.Label("OUTSIDE");
 
         GUILayout.BeginHorizontal();
 
             GUILayout.BeginVertical("GroupBox");
 
                 GUILayout.Label("INSIDE");
 
             GUILayout.EndVertical ();
 
     GUILayout.EndHorizontal();
 
 GUILayout.EndVertical ();




alt text


screen-shot-2017-09-12-at-25437-pm.png (10.7 kB)
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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

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

Related Questions

Recreate default editor look manually without base.OnInspectorGUI [UnityEditor] 2 Answers

Better Unity Event UI 0 Answers

Custom Inspector for a List ? 2 Answers

Setting custom amount of space between elements in a custom inspector with EditorGUILayout ? 0 Answers

SceneView.onSceneGUIDelegate GUI sorting problem 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges