mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
Fixed error on adding nodes in scene graphs
This commit is contained in:
parent
6a69cdaf9c
commit
f3b211ed83
@ -143,7 +143,7 @@ namespace XNodeEditor {
|
||||
Undo.RegisterCreatedObjectUndo(node, "Create Node");
|
||||
node.position = position;
|
||||
if (node.name == null || node.name.Trim() == "") node.name = NodeEditorUtilities.NodeDefaultName(type);
|
||||
AssetDatabase.AddObjectToAsset(node, target);
|
||||
if (!string.IsNullOrEmpty(AssetDatabase.GetAssetPath(target))) AssetDatabase.AddObjectToAsset(node, target);
|
||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||
NodeEditorWindow.RepaintAll();
|
||||
return node;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user