13 [CustomEditor(typeof(LeapImageRetriever))]
16 private GUIContent _textureGUIContent;
17 private GUIContent _distortionTextureGUIContent;
22 _textureGUIContent =
new GUIContent(
"Sensor Texture");
23 _distortionTextureGUIContent =
new GUIContent(
"Distortion Texture");
27 base.OnInspectorGUI();
29 if (Application.isPlaying) {
30 var data =
target.TextureData;
31 var dataType = typeof(
Object);
33 EditorGUI.BeginDisabledGroup(
true);
34 EditorGUILayout.ObjectField(_textureGUIContent, data.TextureData.CombinedTexture, dataType,
true);
35 EditorGUILayout.ObjectField(_distortionTextureGUIContent, data.Distortion.CombinedTexture, dataType,
true);
36 EditorGUI.EndDisabledGroup();
override void OnInspectorGUI()