From 2cbf0b999a76526ddc3f1fc77b11b04d69039c30 Mon Sep 17 00:00:00 2001 From: gwaredd Date: Tue, 6 Jul 2021 10:29:11 +0100 Subject: [PATCH] fix for warning message --- Editor/Scripts/MarkdownEditor.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Editor/Scripts/MarkdownEditor.cs b/Editor/Scripts/MarkdownEditor.cs index 8c42ad1..3c4b840 100644 --- a/Editor/Scripts/MarkdownEditor.cs +++ b/Editor/Scripts/MarkdownEditor.cs @@ -90,12 +90,10 @@ void DrawEditor() void DrawDefaultEditor() { -// if( mDefaultEditor == null ) -// { -// mDefaultEditor = CreateEditor( target, Type.GetType( "UnityEditor.TextAssetInspector, UnityEditor" ) ); -// } - - mDefaultEditor = mDefaultEditor ?? CreateEditor( target, Type.GetType( "UnityEditor.TextAssetInspector, UnityEditor" ) ); + if( mDefaultEditor == null ) + { + mDefaultEditor = CreateEditor( target, Type.GetType( "UnityEditor.TextAssetInspector, UnityEditor" ) ); + } if( mDefaultEditor != null ) {