mirror of
https://github.com/Siccity/xNode.git
synced 2026-02-04 22:34:54 +08:00
Merge pull request #42 from nostek/enhancement/createnodename
Changed new nodes to not include namespaces in their names
This commit is contained in:
commit
d460e93db2
@ -301,7 +301,7 @@ namespace XNodeEditor {
|
|||||||
public void CreateNode(Type type, Vector2 position) {
|
public void CreateNode(Type type, Vector2 position) {
|
||||||
XNode.Node node = graph.AddNode(type);
|
XNode.Node node = graph.AddNode(type);
|
||||||
node.position = position;
|
node.position = position;
|
||||||
node.name = UnityEditor.ObjectNames.NicifyVariableName(type.ToString());
|
node.name = UnityEditor.ObjectNames.NicifyVariableName(type.Name);
|
||||||
AssetDatabase.AddObjectToAsset(node, graph);
|
AssetDatabase.AddObjectToAsset(node, graph);
|
||||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||||
Repaint();
|
Repaint();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user