mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 01:06:01 +08:00
.Net 2.0 compatability
This commit is contained in:
parent
8cb647734a
commit
c306701853
@ -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));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user