summaryrefslogtreecommitdiff
path: root/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal
diff options
context:
space:
mode:
Diffstat (limited to 'Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal')
-rw-r--r--Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs20
-rw-r--r--Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs.meta11
2 files changed, 31 insertions, 0 deletions
diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs
new file mode 100644
index 00000000..4e211306
--- /dev/null
+++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs
@@ -0,0 +1,20 @@
+using UnityEngine;
+
+namespace XNodeEditor.Internal {
+ public struct RerouteReference {
+ public XNode.NodePort port;
+ public int connectionIndex;
+ public int pointIndex;
+
+ public RerouteReference(XNode.NodePort port, int connectionIndex, int pointIndex) {
+ this.port = port;
+ this.connectionIndex = connectionIndex;
+ this.pointIndex = pointIndex;
+ }
+
+ public void InsertPoint(Vector2 pos) { port.GetReroutePoints(connectionIndex).Insert(pointIndex, pos); }
+ public void SetPoint(Vector2 pos) { port.GetReroutePoints(connectionIndex) [pointIndex] = pos; }
+ public void RemovePoint() { port.GetReroutePoints(connectionIndex).RemoveAt(pointIndex); }
+ public Vector2 GetPoint() { return port.GetReroutePoints(connectionIndex) [pointIndex]; }
+ }
+} \ No newline at end of file
diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs.meta
new file mode 100644
index 00000000..9a2f9cb0
--- /dev/null
+++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal/RerouteReference.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 399f3c5fb717b2c458c3e9746f8959a3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: