From c3067018535dbe228c2c374fc1f0911f0bbdb3cb Mon Sep 17 00:00:00 2001 From: Thor Brigsted Date: Sun, 17 Feb 2019 12:24:58 +0100 Subject: [PATCH] .Net 2.0 compatability --- Scripts/Editor/NodeEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Editor/NodeEditor.cs b/Scripts/Editor/NodeEditor.cs index 44594f0..f131f66 100644 --- a/Scripts/Editor/NodeEditor.cs +++ b/Scripts/Editor/NodeEditor.cs @@ -106,7 +106,7 @@ namespace XNodeEditor { } public void Rename(string newName) { - if (string.IsNullOrWhiteSpace(newName)) newName = UnityEditor.ObjectNames.NicifyVariableName(target.GetType().Name); + if (newName == null || newName.Trim() == "") newName = UnityEditor.ObjectNames.NicifyVariableName(target.GetType().Name); target.name = newName; AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); }