- Home /
Question by
kramcomposer · Nov 15, 2012 at 05:28 PM ·
inspectorcustomlocked
Check to see if Inspector is Locked
Question says it all. Ive got a custom inspector, and I need to see if the user has Locked the inspector.
Comment
Answer by loboho · Mar 17, 2016 at 03:19 PM
theres's a cheating way:
public static bool InspectorIsLock()
{
var type = typeof(EditorWindow).Assembly.GetType("UnityEditor.InspectorWindow");
var window = EditorWindow.GetWindow(type);
PropertyInfo info = type.GetProperty("isLocked", BindingFlags.Public | BindingFlags.Instance);
return (bool)info.GetValue(window, null);
}
Your answer
Follow this Question
Related Questions
Array of abstract class in inspector 2 Answers
Custom inspector for files of certain type. 2 Answers
How would I go about creating a custom Unity Event in a Custom Unity Editor/Inspector? 0 Answers
Avoid Base Values being public via Custom Inspector 1 Answer
Hide serialized property from a prefab but show it from another one. 0 Answers