- Home /
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:
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.
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 ();
Your answer
Follow this Question
Related Questions
Track when the value is changed and get it 0 Answers
Better Unity Event UI 0 Answers
Unity editor extension - create drag and drop (similar to Buildbox) 1 Answer
How can i create a pup-up menu like the one for choose the shader on materials in unity 2019? 1 Answer
Recreate default editor look manually without base.OnInspectorGUI [UnityEditor] 2 Answers