The changelog here states that it has been replaced with “a single unified look,” but what does that mean?
2 Answers
2These 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;
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.
I think it means that Unity will just display that information all in one way instead of giving you the option of LookLikeInspector and LookLikeControls, although I have never used the two so I may be mistaken.
– Josh707I 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.
– Sprakle