- Home /
Now that LookLikeInspector() is obsolete, what do I use?
The changelog here states that it has been replaced with "a single unified look," but what does that mean?
I think it means that Unity will just display that information all in one way ins$$anonymous$$d of giving you the option of LookLikeInspector and LookLikeControls, although I have never used the two so I may be mistaken.
I thought so too, but I can't find the single option anywhere, and it's not enabled by default. EditorGUIUtility.LookLikeControls() doesn't do it either.
Answer by numberkruncher · Apr 10, 2014 at 12:30 PM
These methods were replaced with the following static properties:
Replace your usage of EditorGUIUtility.LookLikeControls
with:
// Instead of:
EditorGUIUtility.LookLikeControls(25, 50);
// Use:
EditorGUIUtility.labelWidth = 25;
EditorGUIUtility.fieldWidth = 50;
Replace your usage of EditorGUIUtility.LookLikeInspector
with:
// Instead of:
EditorGUIUtility.LookLikeInspector();
// Use:
EditorGUIUtility.labelWidth = 0;
EditorGUIUtility.fieldWidth = 0;
You may have noticed that the inspector became indented since Unity 4.3. This can be overridden by using the following:
// Just in case Unity reverse this change...
// Let's restore the current wideMode when we are finished with it!
bool restoreWideMode = EditorGUIUtility.wideMode;
EditorGUIUtility.wideMode = true;
// Your stuff as normal...
EditorGUIUtility.wideMode = restoreWideMode;
Answer by purdyjo · Nov 15, 2013 at 05:08 PM
There is only one function now, and it is EditorGUIUtility.LookLikeControls(). There is also an overload of it that takes two floats for label widths and field widths.
Your answer
![](https://koobas.hobune.stream/wayback/20220613121930im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Select parent object when LOD object is clicked 0 Answers
Why does allocation heavy code not scale to multiple threads? 0 Answers
Manually creating Editor sometimes leads to NullReferenceException in SerializedObject constructor 0 Answers
Programming interactive editor viewport elements (ie: the arrows to translate the transform) 1 Answer
Unity Editor - Severe performance delay for most actions? 3 Answers