Looklikeinspector and looklikecontrol is deprecated

Thats the yellowe warning i Get but it dosent say wich script it is or what too do. Does someone know the solution ? Thanks

Get rid of them and use labelWidth instead.

–Eric

i would like too get rid off them cause they are annoying but what do you mean? it keeps coming sometimes as yellow warnings in the console, and you cant click on them and open a script, and the Message dont say what too do. Can you explain how too do that, im sure alot off Developers are running in too this.

These methods were replaced with the following:

which can be used as follows:

// Instead of:
EditorGUIUtility.LookLikeControls(25, 50);
// Use:
EditorGUIUtility.labelWidth = 25;
EditorGUIUtility.fieldWidth = 50;

// Instead of:
EditorGUIUtility.LookLikeInspector();
// Use:
EditorGUIUtility.labelWidth = 0;
EditorGUIUtility.fieldWidth = 0;
1 Like

It’s telling you exactly what the problem is. “LookLikeInspector” and “LookLikeControl” are deprecated, so you’re not meant to use them any more. They’re still there, but only for backwards compatibility. So you should replace them with whatever the new thing is.

When Eric said to “get rid of them” he was referring to the things the warnings mention, not the warnings themselves.

What angrypenguin said.

Yes you can. The only way you couldn’t is if the code that uses LookLikeInspector etc. is in a DLL.

–Eric

Great answer. Thank you.