diff options
Diffstat (limited to 'Other/NodeEditorExamples/Assets')
383 files changed, 35199 insertions, 0 deletions
diff --git a/Other/NodeEditorExamples/Assets/Editor.meta b/Other/NodeEditorExamples/Assets/Editor.meta new file mode 100644 index 00000000..266512b2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: feb8807ffdb4611488777099c58fb6e5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs b/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs new file mode 100644 index 00000000..5d05072e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using UnityEditor; + +public class NodeEditor : EditorWindow +{ + + Rect window1; + Rect window2; + + [MenuItem("Window/Node editor")] + static void ShowEditor() + { + NodeEditor editor = EditorWindow.GetWindow<NodeEditor>(); + editor.Init(); + } + + public void Init() + { + window1 = new Rect(10, 10, 100, 100); + window2 = new Rect(210, 210, 100, 100); + } + + void OnGUI() + { + DrawNodeCurve(window1, window2); // Here the curve is drawn under the windows + + BeginWindows(); + window1 = GUI.Window(1, window1, DrawNodeWindow, "Window 1"); // Updates the Rect's when these are dragged + window2 = GUI.Window(2, window2, DrawNodeWindow, "Window 2"); + EndWindows(); + } + + void DrawNodeWindow(int id) + { + GUI.DragWindow(); + } + + void DrawNodeCurve(Rect start, Rect end) + { + Vector3 startPos = new Vector3(start.x + start.width, start.y + start.height / 2, 0); + Vector3 endPos = new Vector3(end.x, end.y + end.height / 2, 0); + Vector3 startTan = startPos + Vector3.right * 50; + Vector3 endTan = endPos + Vector3.left * 50; + Color shadowCol = new Color(0, 0, 0, 0.06f); + for (int i = 0; i < 3; i++) // Draw a shadow + Handles.DrawBezier(startPos, endPos, startTan, endTan, shadowCol, null, (i + 1) * 5); + Handles.DrawBezier(startPos, endPos, startTan, endTan, Color.black, null, 1); + } +} + diff --git a/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs.meta new file mode 100644 index 00000000..d7546d6d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Editor/NodeEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3857e41167c57c945847a3cdfe91ef48 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples.meta b/Other/NodeEditorExamples/Assets/Examples.meta new file mode 100644 index 00000000..73fe3b31 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d712ee7272d5a65438e68292ea78c0df +folderAsset: yes +timeCreated: 1502911698 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor.meta new file mode 100644 index 00000000..ded41b30 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 26b3c076f0e1ec34395fc43f0ac642bb +folderAsset: yes +timeCreated: 1502695061 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes.meta new file mode 100644 index 00000000..812c4815 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 809bc940ae3b5fc4f88a62702b143539 +folderAsset: yes +timeCreated: 1502695165 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes.meta new file mode 100644 index 00000000..12e35e80 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32e99ed3c4c33a245a4ee182fd560c24 +folderAsset: yes +timeCreated: 1502695282 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs new file mode 100644 index 00000000..1ffac177 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs @@ -0,0 +1,73 @@ + +using System.Collections.Generic; + +using UnityEngine; +using UnityEditor; + +using UNEB; +using LibNoise.Generator; + +public class PerlinNode : Node +{ + private Perlin _noise = new Perlin(); + + public override void Init() { + var noiseIn = AddInput(); + noiseIn.name = "Input"; + + var mask = AddInput(); + mask.name = "Mask"; + + var noiseOut = AddOutput(); + noiseOut.name = "Output"; + noiseOut.getValue = () => { return _noise; }; + + FitKnobs(); + + bodyRect.height += 95f; + bodyRect.width = 150f; + } + + public override void OnBodyGUI() + { + EditorGUI.BeginChangeCheck(); + + _noise.Seed = EditorGUILayout.IntField("Seed", _noise.Seed); + _noise.OctaveCount = EditorGUILayout.IntField("Octaves", _noise.OctaveCount); + _noise.Persistence = EditorGUILayout.DoubleField("Persistence", _noise.Persistence); + _noise.Frequency = EditorGUILayout.DoubleField("Frequency", _noise.Frequency); + _noise.Lacunarity = EditorGUILayout.DoubleField("Lacunarity", _noise.Lacunarity); + + if (EditorGUI.EndChangeCheck()) { + updateOutputNodes(); + } + } + + // Uses a simple DFS traversal to find the connected outputs. + // Assumes a tree-like structure following output to input. + // Does not handle cycles. + private void updateOutputNodes() + { + // Temp solution. + var dfs = new Stack<Node>(); + + dfs.Push(this); + + while (dfs.Count != 0) { + + var node = dfs.Pop(); + + // Search neighbors + foreach (var output in node.Outputs) { + foreach (var input in output.Inputs) { + dfs.Push(input.ParentNode); + } + } + + var outputNode = node as OutputTexture2D; + if (outputNode != null) { + outputNode.UpdateTexture(); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs.meta new file mode 100644 index 00000000..ae4ff21c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/PerlinNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1f2d0ea566c0d2e4799418dc4757938e +timeCreated: 1502695509 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs new file mode 100644 index 00000000..b5a82013 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs @@ -0,0 +1,35 @@ + +using UnityEditor; +using LibNoise.Generator; +using UNEB; + +public class VoronoiNode : Node +{ + private Voronoi _noise = new Voronoi(); + + public override void Init() + { + var noiseIn = AddInput(); + noiseIn.name = "Input"; + + var mask = AddInput(); + mask.name = "Mask"; + + var noiseOut = AddOutput(); + noiseOut.name = "Output"; + noiseOut.getValue = () => { return _noise; }; + + FitKnobs(); + + bodyRect.height += 80f; + bodyRect.width = 150f; + } + + public override void OnBodyGUI() + { + _noise.Seed = EditorGUILayout.IntField("Seed", _noise.Seed); + _noise.Frequency = EditorGUILayout.DoubleField("Frequency", _noise.Frequency); + _noise.Displacement = EditorGUILayout.DoubleField("Displacement", _noise.Displacement); + _noise.UseDistance = EditorGUILayout.Toggle("Use Distance", _noise.UseDistance); + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs.meta new file mode 100644 index 00000000..02e63cde --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/GeneratorNodes/VoronoiNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a0eb0464f69bb1140b0cf06461db0501 +timeCreated: 1502696495 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes.meta new file mode 100644 index 00000000..12586983 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 76cd34ec88c324d46b9b5041c12a93a8 +folderAsset: yes +timeCreated: 1502695460 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs new file mode 100644 index 00000000..7babc539 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs @@ -0,0 +1,32 @@ + +using UnityEngine; +using UnityEditor; +using UNEB; + +public class CurveNode : Node +{ + private AnimationCurve _curve = new AnimationCurve(); + private readonly Rect kCurveRange = new Rect(-1, -1, 2, 2); + + private const float kBodyHeight = 100f; + + public override void Init() + { + var input = AddInput(); + input.name = "Input"; + + var output = AddOutput(); + output.name = "Output"; + + FitKnobs(); + + bodyRect.height += kBodyHeight; + bodyRect.width = 150f; + } + + public override void OnBodyGUI() + { + float boxHeight = kBodyHeight - kHeaderHeight; + _curve = EditorGUILayout.CurveField(_curve, Color.cyan, kCurveRange, GUILayout.Height(boxHeight), GUILayout.ExpandWidth(true)); + } +} diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs.meta new file mode 100644 index 00000000..e797acc3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/CurveNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ed443b489ef3d2345a35685cf3a9e1e5 +timeCreated: 1502703666 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs new file mode 100644 index 00000000..8e568bf6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs @@ -0,0 +1,34 @@ +using LibNoise.Operator; + +using UnityEngine; +using UnityEditor; +using UNEB; + +public class SelectNode : Node +{ + private Select _op = new Select(); + + public override void Init() + { + var inputA = AddInput(); + inputA.name = "Input A"; + + var inputB = AddInput(); + inputB.name = "Input B"; + + var output = AddOutput(); + output.name = "Output"; + + FitKnobs(); + + bodyRect.height += 60f; + bodyRect.width = 150f; + } + + public override void OnBodyGUI() + { + _op.FallOff = EditorGUILayout.DoubleField("Fall Off", _op.FallOff); + _op.Minimum = EditorGUILayout.DoubleField("Min Bound", _op.Minimum); + _op.Maximum = EditorGUILayout.DoubleField("Max Bound", _op.Maximum); + } +} diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs.meta new file mode 100644 index 00000000..8b89c28c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OperatorNodes/SelectNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2ff619b535e53e74a94aa5c56dfc462b +timeCreated: 1502702570 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs new file mode 100644 index 00000000..5e379668 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs @@ -0,0 +1,7 @@ + +using UnityEngine; +using UNEB; + +public class OutputMesh : Node { + +} diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs.meta new file mode 100644 index 00000000..7face9eb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputMesh.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c975064dd2bbba44d8bb3655a76889e2 +timeCreated: 1502709420 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs new file mode 100644 index 00000000..c20a99d8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs @@ -0,0 +1,70 @@ + +using UnityEngine; +using UnityEditor; +using UNEB; + +public class OutputTexture2D : Node +{ + private Texture2D texPreview; + + NodeInput inputNoise; + + private int _texRes = 100; + public int Resolution + { + get { return _texRes; } + set { _texRes = Mathf.Clamp(value, 10, 300); } + } + + public override void Init() + { + inputNoise = AddInput(); + inputNoise.name = "Input Noise"; + + texPreview = new Texture2D(200, 200); + + FitKnobs(); + bodyRect.height += 245; + bodyRect.width = 210f; + } + + public override void OnBodyGUI() + { + EditorGUI.BeginChangeCheck(); + Resolution = EditorGUILayout.IntField("Resolution", Resolution); + + GUILayout.Box(texPreview, GUILayout.Width(texPreview.width), GUILayout.Height(texPreview.height)); + + if (GUILayout.Button("Update")) { + UpdateTexture(); + } + + if (EditorGUI.EndChangeCheck()) { + UpdateTexture(); + } + } + + public void UpdateTexture() + { + if (!inputNoise.HasOutputConnected()) { + return; + } + + var noise = inputNoise.Outputs[0].GetValue<LibNoise.Generator.Perlin>(); + + for (int x = 0; x < texPreview.width; ++x) { + for (int y = 0; y < texPreview.height; ++y) { + + var point = new Vector3(x, y, 0f) / _texRes; + float value = (float)noise.GetValue(point); + + value = Mathf.Clamp01((value + 1) / 2f); + Color color = Color.HSVToRGB(value, 1f, 1f); + + texPreview.SetPixel(x, y, color); + } + } + + texPreview.Apply(); + } +} diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs.meta new file mode 100644 index 00000000..e1c18fbd --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Nodes/OutputTexture2D.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 565809ecf7ca4524bbae5ea481a509a8 +timeCreated: 1502709401 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins.meta new file mode 100644 index 00000000..586f36f5 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9356b1522106ee24c9f99ff77093fb80 +folderAsset: yes +timeCreated: 1502695553 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise.meta new file mode 100644 index 00000000..5ab9f3d6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8ae2a1a1e3f06043946795bf88db726 +folderAsset: yes +timeCreated: 1502695119 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt new file mode 100644 index 00000000..65c5ca88 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt.meta new file mode 100644 index 00000000..46a47724 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.LESSER.txt.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 95ee612b2757f48569ed91e17b141883 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt.meta new file mode 100644 index 00000000..2b35e52a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/COPYING.txt.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 8390780810d5f4732a6a41190622d691 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator.meta new file mode 100644 index 00000000..b37c722d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 01d2ad28d1dda48d091ca1d68c49dfb4 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs new file mode 100644 index 00000000..5c1f4a0a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs @@ -0,0 +1,148 @@ +using System; +using UnityEngine; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs a three-dimensional billowy noise. [GENERATOR] + /// </summary> + public class Billow : ModuleBase + { + #region Fields + + private double _frequency = 1.0; + private double _lacunarity = 2.0; + private QualityMode _quality = QualityMode.Medium; + private int _octaveCount = 6; + private double _persistence = 0.5; + private int _seed; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Billow. + /// </summary> + public Billow() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Billow. + /// </summary> + /// <param name="frequency">The frequency of the first octave.</param> + /// <param name="lacunarity">The lacunarity of the billowy noise.</param> + /// <param name="persistence">The persistence of the billowy noise.</param> + /// <param name="octaves">The number of octaves of the billowy noise.</param> + /// <param name="seed">The seed of the billowy noise.</param> + /// <param name="quality">The quality of the billowy noise.</param> + public Billow(double frequency, double lacunarity, double persistence, int octaves, int seed, + QualityMode quality) + : base(0) + { + Frequency = frequency; + Lacunarity = lacunarity; + OctaveCount = octaves; + Persistence = persistence; + Seed = seed; + Quality = quality; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the first octave. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + /// <summary> + /// Gets or sets the lacunarity of the billowy noise. + /// </summary> + public double Lacunarity + { + get { return _lacunarity; } + set { _lacunarity = value; } + } + + /// <summary> + /// Gets or sets the quality of the billowy noise. + /// </summary> + public QualityMode Quality + { + get { return _quality; } + set { _quality = value; } + } + + /// <summary> + /// Gets or sets the number of octaves of the billowy noise. + /// </summary> + public int OctaveCount + { + get { return _octaveCount; } + set { _octaveCount = Mathf.Clamp(value, 1, Utils.OctavesMaximum); } + } + + /// <summary> + /// Gets or sets the persistence of the billowy noise. + /// </summary> + public double Persistence + { + get { return _persistence; } + set { _persistence = value; } + } + + /// <summary> + /// Gets or sets the seed of the billowy noise. + /// </summary> + public int Seed + { + get { return _seed; } + set { _seed = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + var value = 0.0; + var curp = 1.0; + x *= _frequency; + y *= _frequency; + z *= _frequency; + for (var i = 0; i < _octaveCount; i++) + { + var nx = Utils.MakeInt32Range(x); + var ny = Utils.MakeInt32Range(y); + var nz = Utils.MakeInt32Range(z); + var seed = (_seed + i) & 0xffffffff; + var signal = Utils.GradientCoherentNoise3D(nx, ny, nz, seed, _quality); + signal = 2.0 * Math.Abs(signal) - 1.0; + value += signal * curp; + x *= _lacunarity; + y *= _lacunarity; + z *= _lacunarity; + curp *= _persistence; + } + return value + 0.5; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs.meta new file mode 100644 index 00000000..77a61f00 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Billow.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: f9f0293dd46394b779bf22259c6dad97 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs new file mode 100644 index 00000000..a4bc557d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs @@ -0,0 +1,41 @@ +using System; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs a checkerboard pattern. [GENERATOR] + /// </summary> + public class Checker : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Checker. + /// </summary> + public Checker() + : base(0) + { + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + var ix = (int) (Math.Floor(Utils.MakeInt32Range(x))); + var iy = (int) (Math.Floor(Utils.MakeInt32Range(y))); + var iz = (int) (Math.Floor(Utils.MakeInt32Range(z))); + return (ix & 1 ^ iy & 1 ^ iz & 1) != 0 ? -1.0 : 1.0; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs.meta new file mode 100644 index 00000000..f865935a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Checker.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: eb233ecbeadf94f018307ccdfb683ec9 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs new file mode 100644 index 00000000..5d4f2a79 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs @@ -0,0 +1,65 @@ +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs a constant value. [GENERATOR] + /// </summary> + public class Const : ModuleBase + { + #region Fields + + private double _value; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Const. + /// </summary> + public Const() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Const. + /// </summary> + /// <param name="value">The constant value.</param> + public Const(double value) + : base(0) + { + Value = value; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the constant value. + /// </summary> + public double Value + { + get { return _value; } + set { _value = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + return _value; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs.meta new file mode 100644 index 00000000..f17ff45c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Const.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: c6cec7c8a26b54cd3ab29b44d6360a9f diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs new file mode 100644 index 00000000..4195919e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs @@ -0,0 +1,73 @@ +using System; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs concentric cylinders. [GENERATOR] + /// </summary> + public class Cylinders : ModuleBase + { + #region Fields + + private double _frequency = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Cylinders. + /// </summary> + public Cylinders() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Cylinders. + /// </summary> + /// <param name="frequency">The frequency of the concentric cylinders.</param> + public Cylinders(double frequency) + : base(0) + { + Frequency = frequency; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the concentric cylinders. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + x *= _frequency; + z *= _frequency; + var dfc = Math.Sqrt(x * x + z * z); + var dfss = dfc - Math.Floor(dfc); + var dfls = 1.0 - dfss; + var nd = Math.Min(dfss, dfls); + return 1.0 - (nd * 4.0); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs.meta new file mode 100644 index 00000000..e6efbde4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Cylinders.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: b9fae44e80dd846dd9781b972e97c6e6 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs new file mode 100644 index 00000000..cca8e21e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs @@ -0,0 +1,146 @@ +using UnityEngine; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs a three-dimensional perlin noise. [GENERATOR] + /// </summary> + public class Perlin : ModuleBase + { + #region Fields + + private double _frequency = 1.0; + private double _lacunarity = 2.0; + private QualityMode _quality = QualityMode.Medium; + private int _octaveCount = 6; + private double _persistence = 0.5; + private int _seed; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Perlin. + /// </summary> + public Perlin() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Perlin. + /// </summary> + /// <param name="frequency">The frequency of the first octave.</param> + /// <param name="lacunarity">The lacunarity of the perlin noise.</param> + /// <param name="persistence">The persistence of the perlin noise.</param> + /// <param name="octaves">The number of octaves of the perlin noise.</param> + /// <param name="seed">The seed of the perlin noise.</param> + /// <param name="quality">The quality of the perlin noise.</param> + public Perlin(double frequency, double lacunarity, double persistence, int octaves, int seed, + QualityMode quality) + : base(0) + { + Frequency = frequency; + Lacunarity = lacunarity; + OctaveCount = octaves; + Persistence = persistence; + Seed = seed; + Quality = quality; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the first octave. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + /// <summary> + /// Gets or sets the lacunarity of the perlin noise. + /// </summary> + public double Lacunarity + { + get { return _lacunarity; } + set { _lacunarity = value; } + } + + /// <summary> + /// Gets or sets the quality of the perlin noise. + /// </summary> + public QualityMode Quality + { + get { return _quality; } + set { _quality = value; } + } + + /// <summary> + /// Gets or sets the number of octaves of the perlin noise. + /// </summary> + public int OctaveCount + { + get { return _octaveCount; } + set { _octaveCount = Mathf.Clamp(value, 1, Utils.OctavesMaximum); } + } + + /// <summary> + /// Gets or sets the persistence of the perlin noise. + /// </summary> + public double Persistence + { + get { return _persistence; } + set { _persistence = value; } + } + + /// <summary> + /// Gets or sets the seed of the perlin noise. + /// </summary> + public int Seed + { + get { return _seed; } + set { _seed = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + var value = 0.0; + var cp = 1.0; + x *= _frequency; + y *= _frequency; + z *= _frequency; + for (var i = 0; i < _octaveCount; i++) + { + var nx = Utils.MakeInt32Range(x); + var ny = Utils.MakeInt32Range(y); + var nz = Utils.MakeInt32Range(z); + var seed = (_seed + i) & 0xffffffff; + var signal = Utils.GradientCoherentNoise3D(nx, ny, nz, seed, _quality); + value += signal * cp; + x *= _lacunarity; + y *= _lacunarity; + z *= _lacunarity; + cp *= _persistence; + } + return value; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs.meta new file mode 100644 index 00000000..f9fef821 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Perlin.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: f4531ed2ca2bf4002a1b9515f754ea6a diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs new file mode 100644 index 00000000..b0afdbb6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs @@ -0,0 +1,164 @@ +using System; +using UnityEngine; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs 3-dimensional ridged-multifractal noise. [GENERATOR] + /// </summary> + public class RidgedMultifractal : ModuleBase + { + #region Fields + + private double _frequency = 1.0; + private double _lacunarity = 2.0; + private QualityMode _quality = QualityMode.Medium; + private int _octaveCount = 6; + private int _seed; + private readonly double[] _weights = new double[Utils.OctavesMaximum]; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of RidgedMultifractal. + /// </summary> + public RidgedMultifractal() + : base(0) + { + UpdateWeights(); + } + + /// <summary> + /// Initializes a new instance of RidgedMultifractal. + /// </summary> + /// <param name="frequency">The frequency of the first octave.</param> + /// <param name="lacunarity">The lacunarity of the ridged-multifractal noise.</param> + /// <param name="octaves">The number of octaves of the ridged-multifractal noise.</param> + /// <param name="seed">The seed of the ridged-multifractal noise.</param> + /// <param name="quality">The quality of the ridged-multifractal noise.</param> + public RidgedMultifractal(double frequency, double lacunarity, int octaves, int seed, QualityMode quality) + : base(0) + { + Frequency = frequency; + Lacunarity = lacunarity; + OctaveCount = octaves; + Seed = seed; + Quality = quality; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the first octave. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + /// <summary> + /// Gets or sets the lacunarity of the ridged-multifractal noise. + /// </summary> + public double Lacunarity + { + get { return _lacunarity; } + set + { + _lacunarity = value; + UpdateWeights(); + } + } + + /// <summary> + /// Gets or sets the quality of the ridged-multifractal noise. + /// </summary> + public QualityMode Quality + { + get { return _quality; } + set { _quality = value; } + } + + /// <summary> + /// Gets or sets the number of octaves of the ridged-multifractal noise. + /// </summary> + public int OctaveCount + { + get { return _octaveCount; } + set { _octaveCount = Mathf.Clamp(value, 1, Utils.OctavesMaximum); } + } + + /// <summary> + /// Gets or sets the seed of the ridged-multifractal noise. + /// </summary> + public int Seed + { + get { return _seed; } + set { _seed = value; } + } + + #endregion + + #region Methods + + /// <summary> + /// Updates the weights of the ridged-multifractal noise. + /// </summary> + private void UpdateWeights() + { + var f = 1.0; + for (var i = 0; i < Utils.OctavesMaximum; i++) + { + _weights[i] = Math.Pow(f, -1.0); + f *= _lacunarity; + } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + x *= _frequency; + y *= _frequency; + z *= _frequency; + var value = 0.0; + var weight = 1.0; + var offset = 1.0; // TODO: Review why Offset is never assigned + var gain = 2.0; // TODO: Review why gain is never assigned + for (var i = 0; i < _octaveCount; i++) + { + var nx = Utils.MakeInt32Range(x); + var ny = Utils.MakeInt32Range(y); + var nz = Utils.MakeInt32Range(z); + long seed = (_seed + i) & 0x7fffffff; + var signal = Utils.GradientCoherentNoise3D(nx, ny, nz, seed, _quality); + signal = Math.Abs(signal); + signal = offset - signal; + signal *= signal; + signal *= weight; + weight = signal * gain; + weight = Mathf.Clamp01((float) weight); + value += (signal * _weights[i]); + x *= _lacunarity; + y *= _lacunarity; + z *= _lacunarity; + } + return (value * 1.25) - 1.0; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs.meta new file mode 100644 index 00000000..26b1b9aa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/RidgedMultifractal.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 80802e8c5f463441795212412a4cf4ef diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs new file mode 100644 index 00000000..99d8d8ef --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs @@ -0,0 +1,74 @@ +using System; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs concentric spheres. [GENERATOR] + /// </summary> + public class Spheres : ModuleBase + { + #region Fields + + private double _frequency = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Spheres. + /// </summary> + public Spheres() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Spheres. + /// </summary> + /// <param name="frequency">The frequency of the concentric spheres.</param> + public Spheres(double frequency) + : base(0) + { + Frequency = frequency; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the concentric spheres. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + x *= _frequency; + y *= _frequency; + z *= _frequency; + var dfc = Math.Sqrt(x * x + y * y + z * z); + var dfss = dfc - Math.Floor(dfc); + var dfls = 1.0 - dfss; + var nd = Math.Min(dfss, dfls); + return 1.0 - (nd * 4.0); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs.meta new file mode 100644 index 00000000..cf8eba9b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Spheres.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 9cd65dace5b2b41c4bc8d1d344da6cfc diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs new file mode 100644 index 00000000..876e7aa8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs @@ -0,0 +1,150 @@ +using System; + +namespace LibNoise.Generator +{ + /// <summary> + /// Provides a noise module that outputs Voronoi cells. [GENERATOR] + /// </summary> + public class Voronoi : ModuleBase + { + #region Fields + + private double _displacement = 1.0; + private double _frequency = 1.0; + private int _seed; + private bool _distance; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Voronoi. + /// </summary> + public Voronoi() + : base(0) + { + } + + /// <summary> + /// Initializes a new instance of Voronoi. + /// </summary> + /// <param name="frequency">The frequency of the first octave.</param> + /// <param name="displacement">The displacement of the ridged-multifractal noise.</param> + /// <param name="seed">The seed of the ridged-multifractal noise.</param> + /// <param name="distance">Indicates whether the distance from the nearest seed point is applied to the output value.</param> + public Voronoi(double frequency, double displacement, int seed, bool distance) + : base(0) + { + Frequency = frequency; + Displacement = displacement; + Seed = seed; + UseDistance = distance; + Seed = seed; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the displacement value of the Voronoi cells. + /// </summary> + public double Displacement + { + get { return _displacement; } + set { _displacement = value; } + } + + /// <summary> + /// Gets or sets the frequency of the seed points. + /// </summary> + public double Frequency + { + get { return _frequency; } + set { _frequency = value; } + } + + /// <summary> + /// Gets or sets the seed value used by the Voronoi cells. + /// </summary> + public int Seed + { + get { return _seed; } + set { _seed = value; } + } + + /// <summary> + /// Gets or sets a value whether the distance from the nearest seed point is applied to the output value. + /// </summary> + public bool UseDistance + { + get { return _distance; } + set { _distance = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + x *= _frequency; + y *= _frequency; + z *= _frequency; + var xi = (x > 0.0 ? (int) x : (int) x - 1); + var iy = (y > 0.0 ? (int) y : (int) y - 1); + var iz = (z > 0.0 ? (int) z : (int) z - 1); + var md = 2147483647.0; + double xc = 0; + double yc = 0; + double zc = 0; + for (var zcu = iz - 2; zcu <= iz + 2; zcu++) + { + for (var ycu = iy - 2; ycu <= iy + 2; ycu++) + { + for (var xcu = xi - 2; xcu <= xi + 2; xcu++) + { + var xp = xcu + Utils.ValueNoise3D(xcu, ycu, zcu, _seed); + var yp = ycu + Utils.ValueNoise3D(xcu, ycu, zcu, _seed + 1); + var zp = zcu + Utils.ValueNoise3D(xcu, ycu, zcu, _seed + 2); + var xd = xp - x; + var yd = yp - y; + var zd = zp - z; + var d = xd * xd + yd * yd + zd * zd; + if (d < md) + { + md = d; + xc = xp; + yc = yp; + zc = zp; + } + } + } + } + double v; + if (_distance) + { + var xd = xc - x; + var yd = yc - y; + var zd = zc - z; + v = (Math.Sqrt(xd * xd + yd * yd + zd * zd)) * Utils.Sqrt3 - 1.0; + } + else + { + v = 0.0; + } + return v + (_displacement * Utils.ValueNoise3D((int) (Math.Floor(xc)), (int) (Math.Floor(yc)), + (int) (Math.Floor(zc)), 0)); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs.meta new file mode 100644 index 00000000..559371fb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Generator/Voronoi.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 0d715628644034e579a398e471e978bf diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs new file mode 100644 index 00000000..91920a6c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs @@ -0,0 +1,132 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace LibNoise +{ + /// <summary> + /// Provides a series of gradient presets + /// </summary> + public static class GradientPresets + { + #region Fields + + private static readonly Gradient _empty; + private static readonly Gradient _grayscale; + private static readonly Gradient _rgb; + private static readonly Gradient _rgba; + private static readonly Gradient _terrain; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Gradient. + /// </summary> + static GradientPresets() + { + // Grayscale gradient color keys + var grayscaleColorKeys = new List<GradientColorKey> + { + new GradientColorKey(Color.black, 0), + new GradientColorKey(Color.white, 1) + }; + + // RGB gradient color keys + var rgbColorKeys = new List<GradientColorKey> + { + new GradientColorKey(Color.red, 0), + new GradientColorKey(Color.green, 0.5f), + new GradientColorKey(Color.blue, 1) + }; + + // RGBA gradient color keys + var rgbaColorKeys = new List<GradientColorKey> + { + new GradientColorKey(Color.red, 0), + new GradientColorKey(Color.green, 1 / 3f), + new GradientColorKey(Color.blue, 2 / 3f), + new GradientColorKey(Color.black, 1) + }; + + // RGBA gradient alpha keys + var rgbaAlphaKeys = new List<GradientAlphaKey> {new GradientAlphaKey(0, 2 / 3f), new GradientAlphaKey(1, 1)}; + + // Terrain gradient color keys + var terrainColorKeys = new List<GradientColorKey> + { + new GradientColorKey(new Color(0, 0, 0.5f), 0), + new GradientColorKey(new Color(0.125f, 0.25f, 0.5f), 0.4f), + new GradientColorKey(new Color(0.25f, 0.375f, 0.75f), 0.48f), + new GradientColorKey(new Color(0, 0.75f, 0), 0.5f), + new GradientColorKey(new Color(0.75f, 0.75f, 0), 0.625f), + new GradientColorKey(new Color(0.625f, 0.375f, 0.25f), 0.75f), + new GradientColorKey(new Color(0.5f, 1, 1), 0.875f), + new GradientColorKey(Color.white, 1) + }; + + // Generic gradient alpha keys + var alphaKeys = new List<GradientAlphaKey> {new GradientAlphaKey(1, 0), new GradientAlphaKey(1, 1)}; + + _empty = new Gradient(); + + _rgb = new Gradient(); + _rgb.SetKeys(rgbColorKeys.ToArray(), alphaKeys.ToArray()); + + _rgba = new Gradient(); + _rgba.SetKeys(rgbaColorKeys.ToArray(), rgbaAlphaKeys.ToArray()); + + _grayscale = new Gradient(); + _grayscale.SetKeys(grayscaleColorKeys.ToArray(), alphaKeys.ToArray()); + + _terrain = new Gradient(); + _terrain.SetKeys(terrainColorKeys.ToArray(), alphaKeys.ToArray()); + } + + #endregion + + #region Properties + + /// <summary> + /// Gets the empty instance of Gradient. + /// </summary> + public static Gradient Empty + { + get { return _empty; } + } + + /// <summary> + /// Gets the grayscale instance of Gradient. + /// </summary> + public static Gradient Grayscale + { + get { return _grayscale; } + } + + /// <summary> + /// Gets the RGB instance of Gradient. + /// </summary> + public static Gradient RGB + { + get { return _rgb; } + } + + /// <summary> + /// Gets the RGBA instance of Gradient. + /// </summary> + public static Gradient RGBA + { + get { return _rgba; } + } + + /// <summary> + /// Gets the terrain instance of Gradient. + /// </summary> + public static Gradient Terrain + { + get { return _terrain; } + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs.meta new file mode 100644 index 00000000..b0ba020d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/GradientPresets.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 7274fe25a8f9642c9b3e34a7e54ecd6f diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs new file mode 100644 index 00000000..c6cef0f1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs @@ -0,0 +1,187 @@ +using System; +using System.Xml.Serialization; +using UnityEngine; +using Debug = System.Diagnostics.Debug; + +namespace LibNoise +{ + + #region Enumerations + + /// <summary> + /// Defines a collection of quality modes. + /// </summary> + public enum QualityMode + { + Low, + Medium, + High, + } + + #endregion + + /// <summary> + /// Base class for noise modules. + /// </summary> + public abstract class ModuleBase : IDisposable + { + #region Fields + + private ModuleBase[] _modules; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Helpers. + /// </summary> + /// <param name="count">The number of source modules.</param> + protected ModuleBase(int count) + { + if (count > 0) + { + _modules = new ModuleBase[count]; + } + } + + #endregion + + #region Indexers + + /// <summary> + /// Gets or sets a source module by index. + /// </summary> + /// <param name="index">The index of the source module to aquire.</param> + /// <returns>The requested source module.</returns> + public virtual ModuleBase this[int index] + { + get + { + Debug.Assert(_modules != null); + Debug.Assert(_modules.Length > 0); + if (index < 0 || index >= _modules.Length) + { + throw new ArgumentOutOfRangeException("Index out of valid module range"); + } + if (_modules[index] == null) + { + throw new ArgumentNullException("Desired element is null"); + } + return _modules[index]; + } + set + { + Debug.Assert(_modules.Length > 0); + if (index < 0 || index >= _modules.Length) + { + throw new ArgumentOutOfRangeException("Index out of valid module range"); + } + if (value == null) + { + throw new ArgumentNullException("Value should not be null"); + } + _modules[index] = value; + } + } + + #endregion + + #region Properties + protected ModuleBase[] Modules + { + get { return _modules; } + } + + /// <summary> + /// Gets the number of source modules required by this noise module. + /// </summary> + public int SourceModuleCount + { + get { return (_modules == null) ? 0 : _modules.Length; } + } + + #endregion + + #region Methods + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public abstract double GetValue(double x, double y, double z); + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="coordinate">The input coordinate.</param> + /// <returns>The resulting output value.</returns> + public double GetValue(Vector3 coordinate) + { + return GetValue(coordinate.x, coordinate.y, coordinate.z); + } + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="coordinate">The input coordinate.</param> + /// <returns>The resulting output value.</returns> + public double GetValue(ref Vector3 coordinate) + { + return GetValue(coordinate.x, coordinate.y, coordinate.z); + } + + #endregion + + #region IDisposable Members + + [XmlIgnore] +#if !XBOX360 && !ZUNE + [NonSerialized] +#endif + private bool _disposed; + + /// <summary> + /// Gets a value whether the object is disposed. + /// </summary> + public bool IsDisposed + { + get { return _disposed; } + } + + /// <summary> + /// Immediately releases the unmanaged resources used by this object. + /// </summary> + public void Dispose() + { + if (!_disposed) + { + _disposed = Disposing(); + } + GC.SuppressFinalize(this); + } + + /// <summary> + /// Immediately releases the unmanaged resources used by this object. + /// </summary> + /// <returns>True if the object is completely disposed.</returns> + protected virtual bool Disposing() + { + if (_modules != null) + { + for (var i = 0; i < _modules.Length; i++) + { + _modules[i].Dispose(); + _modules[i] = null; + } + _modules = null; + } + return true; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs.meta new file mode 100644 index 00000000..db4a6d78 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/ModuleBase.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: e90c63f5533e4400583745edd03b9a44 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs new file mode 100644 index 00000000..fdc2c6d1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs @@ -0,0 +1,575 @@ +using System; +using System.Xml.Serialization; +using UnityEngine; + +namespace LibNoise +{ + /// <summary> + /// Provides a two-dimensional noise map. + /// </summary> + /// <remarks>This covers most of the functionality from LibNoise's noiseutils library, but + /// the method calls might not be the same. See the tutorials project if you're wondering + /// which calls are equivalent.</remarks> + public class Noise2D : IDisposable + { + #region Constants + + public static readonly double South = -90.0; + public static readonly double North = 90.0; + public static readonly double West = -180.0; + public static readonly double East = 180.0; + public static readonly double AngleMin = -180.0; + public static readonly double AngleMax = 180.0; + public static readonly double Left = -1.0; + public static readonly double Right = 1.0; + public static readonly double Top = -1.0; + public static readonly double Bottom = 1.0; + + #endregion + + #region Fields + + private int _width; + private int _height; + private float[,] _data; + private readonly int _ucWidth; + private readonly int _ucHeight; + private int _ucBorder = 1; // Border size of extra noise for uncropped data. + + private readonly float[,] _ucData; + // Uncropped data. This has a border of extra noise data used for calculating normal map edges. + + private float _borderValue = float.NaN; + private ModuleBase _generator; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Noise2D. + /// </summary> + protected Noise2D() + { + } + + /// <summary> + /// Initializes a new instance of Noise2D. + /// </summary> + /// <param name="size">The width and height of the noise map.</param> + public Noise2D(int size) + : this(size, size, null) + { + } + + /// <summary> + /// Initializes a new instance of Noise2D. + /// </summary> + /// <param name="size">The width and height of the noise map.</param> + /// <param name="generator">The generator module.</param> + public Noise2D(int size, ModuleBase generator) + : this(size, size, generator) + { + } + + /// <summary> + /// Initializes a new instance of Noise2D. + /// </summary> + /// <param name="width">The width of the noise map.</param> + /// <param name="height">The height of the noise map.</param> + /// <param name="generator">The generator module.</param> + public Noise2D(int width, int height, ModuleBase generator = null) + { + _generator = generator; + _width = width; + _height = height; + _data = new float[width, height]; + _ucWidth = width + _ucBorder * 2; + _ucHeight = height + _ucBorder * 2; + _ucData = new float[width + _ucBorder * 2, height + _ucBorder * 2]; + } + + #endregion + + #region Indexers + + /// <summary> + /// Gets or sets a value in the noise map by its position. + /// </summary> + /// <param name="x">The position on the x-axis.</param> + /// <param name="y">The position on the y-axis.</param> + /// <param name="isCropped">Indicates whether to select the cropped (default) or uncropped noise map data.</param> + /// <returns>The corresponding value.</returns> + public float this[int x, int y, bool isCropped = true] + { + get + { + if (isCropped) + { + if (x < 0 && x >= _width) + { + throw new ArgumentOutOfRangeException("Invalid x position"); + } + if (y < 0 && y >= _height) + { + throw new ArgumentOutOfRangeException("Invalid y position"); + } + return _data[x, y]; + } + if (x < 0 && x >= _ucWidth) + { + throw new ArgumentOutOfRangeException("Invalid x position"); + } + if (y < 0 && y >= _ucHeight) + { + throw new ArgumentOutOfRangeException("Invalid y position"); + } + return _ucData[x, y]; + } + set + { + if (isCropped) + { + if (x < 0 && x >= _width) + { + throw new ArgumentOutOfRangeException("Invalid x position"); + } + if (y < 0 && y >= _height) + { + throw new ArgumentOutOfRangeException("Invalid y position"); + } + _data[x, y] = value; + } + else + { + if (x < 0 && x >= _ucWidth) + { + throw new ArgumentOutOfRangeException("Invalid x position"); + } + if (y < 0 && y >= _ucHeight) + { + throw new ArgumentOutOfRangeException("Invalid y position"); + } + _ucData[x, y] = value; + } + } + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the constant value at the noise maps borders. + /// </summary> + public float Border + { + get { return _borderValue; } + set { _borderValue = value; } + } + + /// <summary> + /// Gets or sets the generator module. + /// </summary> + public ModuleBase Generator + { + get { return _generator; } + set { _generator = value; } + } + + /// <summary> + /// Gets the height of the noise map. + /// </summary> + public int Height + { + get { return _height; } + } + + /// <summary> + /// Gets the width of the noise map. + /// </summary> + public int Width + { + get { return _width; } + } + + #endregion + + #region Methods + + /// <summary> + /// Gets normalized noise map data with all values in the set of {0..1}. + /// </summary> + /// <param name="isCropped">Indicates whether to select the cropped (default) or uncropped noise map data.</param> + /// <param name="xCrop">This value crops off data from the right of the noise map data.</param> + /// <param name="yCrop">This value crops off data from the bottom of the noise map data.</param> + /// <returns>The normalized noise map data.</returns> + public float[,] GetNormalizedData(bool isCropped = true, int xCrop = 0, int yCrop = 0) + { + return GetData(isCropped, xCrop, yCrop, true); + } + + /// <summary> + /// Gets noise map data. + /// </summary> + /// <param name="isCropped">Indicates whether to select the cropped (default) or uncropped noise map data.</param> + /// <param name="xCrop">This value crops off data from the right of the noise map data.</param> + /// <param name="yCrop">This value crops off data from the bottom of the noise map data.</param> + /// <param name="isNormalized">Indicates whether to normalize noise map data.</param> + /// <returns>The noise map data.</returns> + public float[,] GetData(bool isCropped = true, int xCrop = 0, int yCrop = 0, bool isNormalized = false) + { + int width, height; + float[,] data; + if (isCropped) + { + width = _width; + height = _height; + data = _data; + } + else + { + width = _ucWidth; + height = _ucHeight; + data = _ucData; + } + width -= xCrop; + height -= yCrop; + var result = new float[width, height]; + for (var x = 0; x < width; x++) + { + for (var y = 0; y < height; y++) + { + float sample; + if (isNormalized) + { + sample = (data[x, y] + 1) / 2; + } + else + { + sample = data[x, y]; + } + result[x, y] = sample; + } + } + return result; + } + + /// <summary> + /// Clears the noise map. + /// </summary> + /// <param name="value">The constant value to clear the noise map with.</param> + public void Clear(float value = 0f) + { + for (var x = 0; x < _width; x++) + { + for (var y = 0; y < _height; y++) + { + _data[x, y] = value; + } + } + } + + /// <summary> + /// Generates a planar projection of a point in the noise map. + /// </summary> + /// <param name="x">The position on the x-axis.</param> + /// <param name="y">The position on the y-axis.</param> + /// <returns>The corresponding noise map value.</returns> + private double GeneratePlanar(double x, double y) + { + return _generator.GetValue(x, 0.0, y); + } + + /// <summary> + /// Generates a non-seamless planar projection of the noise map. + /// </summary> + /// <param name="left">The clip region to the left.</param> + /// <param name="right">The clip region to the right.</param> + /// <param name="top">The clip region to the top.</param> + /// <param name="bottom">The clip region to the bottom.</param> + /// <param name="isSeamless">Indicates whether the resulting noise map should be seamless.</param> + public void GeneratePlanar(double left, double right, double top, double bottom, bool isSeamless = true) + { + if (right <= left || bottom <= top) + { + throw new ArgumentException("Invalid right/left or bottom/top combination"); + } + if (_generator == null) + { + throw new ArgumentNullException("Generator is null"); + } + var xe = right - left; + var ze = bottom - top; + var xd = xe / ((double) _width - _ucBorder); + var zd = ze / ((double) _height - _ucBorder); + var xc = left; + for (var x = 0; x < _ucWidth; x++) + { + var zc = top; + for (var y = 0; y < _ucHeight; y++) + { + float fv; + if (isSeamless) + { + fv = (float) GeneratePlanar(xc, zc); + } + else + { + var swv = GeneratePlanar(xc, zc); + var sev = GeneratePlanar(xc + xe, zc); + var nwv = GeneratePlanar(xc, zc + ze); + var nev = GeneratePlanar(xc + xe, zc + ze); + var xb = 1.0 - ((xc - left) / xe); + var zb = 1.0 - ((zc - top) / ze); + var z0 = Utils.InterpolateLinear(swv, sev, xb); + var z1 = Utils.InterpolateLinear(nwv, nev, xb); + fv = (float) Utils.InterpolateLinear(z0, z1, zb); + } + _ucData[x, y] = fv; + if (x >= _ucBorder && y >= _ucBorder && x < _width + _ucBorder && + y < _height + _ucBorder) + { + _data[x - _ucBorder, y - _ucBorder] = fv; // Cropped data + } + zc += zd; + } + xc += xd; + } + } + + /// <summary> + /// Generates a cylindrical projection of a point in the noise map. + /// </summary> + /// <param name="angle">The angle of the point.</param> + /// <param name="height">The height of the point.</param> + /// <returns>The corresponding noise map value.</returns> + private double GenerateCylindrical(double angle, double height) + { + var x = Math.Cos(angle * Mathf.Deg2Rad); + var y = height; + var z = Math.Sin(angle * Mathf.Deg2Rad); + return _generator.GetValue(x, y, z); + } + + /// <summary> + /// Generates a cylindrical projection of the noise map. + /// </summary> + /// <param name="angleMin">The maximum angle of the clip region.</param> + /// <param name="angleMax">The minimum angle of the clip region.</param> + /// <param name="heightMin">The minimum height of the clip region.</param> + /// <param name="heightMax">The maximum height of the clip region.</param> + public void GenerateCylindrical(double angleMin, double angleMax, double heightMin, double heightMax) + { + if (angleMax <= angleMin || heightMax <= heightMin) + { + throw new ArgumentException("Invalid angle or height parameters"); + } + if (_generator == null) + { + throw new ArgumentNullException("Generator is null"); + } + var ae = angleMax - angleMin; + var he = heightMax - heightMin; + var xd = ae / ((double) _width - _ucBorder); + var yd = he / ((double) _height - _ucBorder); + var ca = angleMin; + for (var x = 0; x < _ucWidth; x++) + { + var ch = heightMin; + for (var y = 0; y < _ucHeight; y++) + { + _ucData[x, y] = (float) GenerateCylindrical(ca, ch); + if (x >= _ucBorder && y >= _ucBorder && x < _width + _ucBorder && + y < _height + _ucBorder) + { + _data[x - _ucBorder, y - _ucBorder] = (float) GenerateCylindrical(ca, ch); + // Cropped data + } + ch += yd; + } + ca += xd; + } + } + + /// <summary> + /// Generates a spherical projection of a point in the noise map. + /// </summary> + /// <param name="lat">The latitude of the point.</param> + /// <param name="lon">The longitude of the point.</param> + /// <returns>The corresponding noise map value.</returns> + private double GenerateSpherical(double lat, double lon) + { + var r = Math.Cos(Mathf.Deg2Rad * lat); + return _generator.GetValue(r * Math.Cos(Mathf.Deg2Rad * lon), Math.Sin(Mathf.Deg2Rad * lat), + r * Math.Sin(Mathf.Deg2Rad * lon)); + } + + /// <summary> + /// Generates a spherical projection of the noise map. + /// </summary> + /// <param name="south">The clip region to the south.</param> + /// <param name="north">The clip region to the north.</param> + /// <param name="west">The clip region to the west.</param> + /// <param name="east">The clip region to the east.</param> + public void GenerateSpherical(double south, double north, double west, double east) + { + if (east <= west || north <= south) + { + throw new ArgumentException("Invalid east/west or north/south combination"); + } + if (_generator == null) + { + throw new ArgumentNullException("Generator is null"); + } + var loe = east - west; + var lae = north - south; + var xd = loe / ((double) _width - _ucBorder); + var yd = lae / ((double) _height - _ucBorder); + var clo = west; + for (var x = 0; x < _ucWidth; x++) + { + var cla = south; + for (var y = 0; y < _ucHeight; y++) + { + _ucData[x, y] = (float) GenerateSpherical(cla, clo); + if (x >= _ucBorder && y >= _ucBorder && x < _width + _ucBorder && + y < _height + _ucBorder) + { + _data[x - _ucBorder, y - _ucBorder] = (float) GenerateSpherical(cla, clo); + // Cropped data + } + cla += yd; + } + clo += xd; + } + } + + /// <summary> + /// Creates a grayscale texture map for the current content of the noise map. + /// </summary> + /// <returns>The created texture map.</returns> + public Texture2D GetTexture() + { + return GetTexture(GradientPresets.Grayscale); + } + + /// <summary> + /// Creates a texture map for the current content of the noise map. + /// </summary> + /// <param name="gradient">The gradient to color the texture map with.</param> + /// <returns>The created texture map.</returns> + public Texture2D GetTexture(Gradient gradient) + { + var texture = new Texture2D(_width, _height); + var pixels = new Color[_width * _height]; + for (var x = 0; x < _width; x++) + { + for (var y = 0; y < _height; y++) + { + float sample; + if (!float.IsNaN(_borderValue) && + (x == 0 || x == _width - _ucBorder || y == 0 || y == _height - _ucBorder)) + { + sample = _borderValue; + } + else + { + sample = _data[x, y]; + } + pixels[x + y * _width] = gradient.Evaluate((sample + 1) / 2); + } + } + texture.SetPixels(pixels); + texture.wrapMode = TextureWrapMode.Clamp; + texture.Apply(); + return texture; + } + + /// <summary> + /// Creates a normal map for the current content of the noise map. + /// </summary> + /// <param name="intensity">The scaling of the normal map values.</param> + /// <returns>The created normal map.</returns> + public Texture2D GetNormalMap(float intensity) + { + var texture = new Texture2D(_width, _height); + var pixels = new Color[_width * _height]; + for (var x = 0; x < _ucWidth; x++) + { + for (var y = 0; y < _ucHeight; y++) + { + var xPos = (_ucData[Mathf.Max(0, x - _ucBorder), y] - + _ucData[Mathf.Min(x + _ucBorder, _height + _ucBorder), y]) / 2; + var yPos = (_ucData[x, Mathf.Max(0, y - _ucBorder)] - + _ucData[x, Mathf.Min(y + _ucBorder, _width + _ucBorder)]) / 2; + var normalX = new Vector3(xPos * intensity, 0, 1); + var normalY = new Vector3(0, yPos * intensity, 1); + // Get normal vector + var normalVector = normalX + normalY; + normalVector.Normalize(); + // Get color vector + var colorVector = Vector3.zero; + colorVector.x = (normalVector.x + 1) / 2; + colorVector.y = (normalVector.y + 1) / 2; + colorVector.z = (normalVector.z + 1) / 2; + // Start at (x + _ucBorder, y + _ucBorder) so that resulting normal map aligns with cropped data + if (x >= _ucBorder && y >= _ucBorder && x < _width + _ucBorder && + y < _height + _ucBorder) + { + pixels[(x - _ucBorder) + (y - _ucBorder) * _width] = new Color(colorVector.x, + colorVector.y, colorVector.z); + } + } + } + texture.SetPixels(pixels); + texture.wrapMode = TextureWrapMode.Clamp; + texture.Apply(); + return texture; + } + + #endregion + + #region IDisposable Members + + [XmlIgnore] +#if !XBOX360 && !ZUNE + [NonSerialized] +#endif + private bool _disposed; + + /// <summary> + /// Gets a value whether the object is disposed. + /// </summary> + public bool IsDisposed + { + get { return _disposed; } + } + + /// <summary> + /// Immediately releases the unmanaged resources used by this object. + /// </summary> + public void Dispose() + { + if (!_disposed) + { + _disposed = Disposing(); + } + GC.SuppressFinalize(this); + } + + /// <summary> + /// Immediately releases the unmanaged resources used by this object. + /// </summary> + /// <returns>True if the object is completely disposed.</returns> + protected virtual bool Disposing() + { + _data = null; + _width = 0; + _height = 0; + return true; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs.meta new file mode 100644 index 00000000..5355cce2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Noise2D.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 9b7ba00b7ee094d618be890f09a59f95 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator.meta new file mode 100644 index 00000000..1c8e0e85 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: dc5e0fafbdfd44742b85ea173f0ac76f diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs new file mode 100644 index 00000000..789b99d0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs @@ -0,0 +1,51 @@ +using System; +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the absolute value of the output value from + /// a source module. [OPERATOR] + /// </summary> + public class Abs : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Abs. + /// </summary> + public Abs() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Abs. + /// </summary> + /// <param name="input">The input module.</param> + public Abs(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + return Math.Abs(Modules[0].GetValue(x, y, z)); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs.meta new file mode 100644 index 00000000..36b83ade --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Abs.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 23b1f62fc46bd4ea79b73bdfa896b034 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs new file mode 100644 index 00000000..4e91bba0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs @@ -0,0 +1,53 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the sum of the two output values from two + /// source modules. [OPERATOR] + /// </summary> + public class Add : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Add. + /// </summary> + public Add() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Add. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Add(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + return Modules[0].GetValue(x, y, z) + Modules[1].GetValue(x, y, z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs.meta new file mode 100644 index 00000000..d7938fc6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Add.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: d7ac90f93a2ab427c831c60c111bf54f diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs new file mode 100644 index 00000000..d7e57ade --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs @@ -0,0 +1,76 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs a weighted blend of the output values from + /// two source modules given the output value supplied by a control module. [OPERATOR] + /// </summary> + public class Blend : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Blend. + /// </summary> + public Blend() + : base(3) + { + } + + /// <summary> + /// Initializes a new instance of Blend. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + /// <param name="controller">The controller of the operator.</param> + public Blend(ModuleBase lhs, ModuleBase rhs, ModuleBase controller) + : base(3) + { + Modules[0] = lhs; + Modules[1] = rhs; + Modules[2] = controller; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the controlling module. + /// </summary> + public ModuleBase Controller + { + get { return Modules[2]; } + set + { + Debug.Assert(value != null); + Modules[2] = value; + } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + Debug.Assert(Modules[2] != null); + var a = Modules[0].GetValue(x, y, z); + var b = Modules[1].GetValue(x, y, z); + var c = (Modules[2].GetValue(x, y, z) + 1.0) / 2.0; + return Utils.InterpolateLinear(a, b, c); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs.meta new file mode 100644 index 00000000..d993a1eb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Blend.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 26925e2038d704fcfb699b013c25ae69 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs new file mode 100644 index 00000000..38a28b6f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs @@ -0,0 +1,83 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that caches the last output value generated by a source + /// module. [OPERATOR] + /// </summary> + public class Cache : ModuleBase + { + #region Fields + + private double _value; + private bool _cached; + private double _x; + private double _y; + private double _z; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Cache. + /// </summary> + public Cache() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Cache. + /// </summary> + /// <param name="input">The input module.</param> + public Cache(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Gets or sets a source module by index. + /// </summary> + /// <param name="index">The index of the source module to aquire.</param> + /// <returns>The requested source module.</returns> + public override ModuleBase this[int index] + { + get { return base[index]; } + set + { + base[index] = value; + _cached = false; + } + } + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + if (!(_cached && _x == x && _y == y && _z == z)) + { + _value = Modules[0].GetValue(x, y, z); + _x = x; + _y = y; + _z = z; + } + _cached = true; + return _value; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs.meta new file mode 100644 index 00000000..494c9f4d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Cache.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 97d943450f43c42f8a85dd94d870b34e diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs new file mode 100644 index 00000000..eeafe487 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs @@ -0,0 +1,124 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that clamps the output value from a source module to a + /// range of values. [OPERATOR] + /// </summary> + public class Clamp : ModuleBase + { + #region Fields + + private double _min = -1.0; + private double _max = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Clamp. + /// </summary> + public Clamp() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Clamp. + /// </summary> + /// <param name="input">The input module.</param> + public Clamp(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Clamp. + /// </summary> + /// <param name="input">The input module.</param> + /// <param name="min">The minimum value.</param> + /// <param name="max">The maximum value.</param> + public Clamp(double min, double max, ModuleBase input) + : base(1) + { + Minimum = min; + Maximum = max; + Modules[0] = input; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the maximum to clamp to. + /// </summary> + public double Maximum + { + get { return _max; } + set { _max = value; } + } + + /// <summary> + /// Gets or sets the minimum to clamp to. + /// </summary> + public double Minimum + { + get { return _min; } + set { _min = value; } + } + + #endregion + + #region Methods + + /// <summary> + /// Sets the bounds. + /// </summary> + /// <param name="min">The minimum value.</param> + /// <param name="max">The maximum value.</param> + public void SetBounds(double min, double max) + { + Debug.Assert(min < max); + _min = min; + _max = max; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + if (_min > _max) + { + var t = _min; + _min = _max; + _max = t; + } + var v = Modules[0].GetValue(x, y, z); + if (v < _min) + { + return _min; + } + if (v > _max) + { + return _max; + } + return v; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs.meta new file mode 100644 index 00000000..d22542ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Clamp.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 1f614701fffbe4d6881a735ef849eb92 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs new file mode 100644 index 00000000..e973762a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs @@ -0,0 +1,133 @@ +using System.Collections.Generic; +using UnityEngine; +using Debug = System.Diagnostics.Debug; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that maps the output value from a source module onto an + /// arbitrary function curve. [OPERATOR] + /// </summary> + public class Curve : ModuleBase + { + #region Fields + + private readonly List<KeyValuePair<double, double>> _data = new List<KeyValuePair<double, double>>(); + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Curve. + /// </summary> + public Curve() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Curve. + /// </summary> + /// <param name="input">The input module.</param> + public Curve(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets the number of control points. + /// </summary> + public int ControlPointCount + { + get { return _data.Count; } + } + + /// <summary> + /// Gets the list of control points. + /// </summary> + public List<KeyValuePair<double, double>> ControlPoints + { + get { return _data; } + } + + #endregion + + #region Methods + + /// <summary> + /// Adds a control point to the curve. + /// </summary> + /// <param name="input">The curves input value.</param> + /// <param name="output">The curves output value.</param> + public void Add(double input, double output) + { + var kvp = new KeyValuePair<double, double>(input, output); + if (!_data.Contains(kvp)) + { + _data.Add(kvp); + } + _data.Sort( + delegate(KeyValuePair<double, double> lhs, KeyValuePair<double, double> rhs) + { + return lhs.Key.CompareTo(rhs.Key); + }); + } + + /// <summary> + /// Clears the control points. + /// </summary> + public void Clear() + { + _data.Clear(); + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(ControlPointCount >= 4); + var smv = Modules[0].GetValue(x, y, z); + int ip; + for (ip = 0; ip < _data.Count; ip++) + { + if (smv < _data[ip].Key) + { + break; + } + } + var i0 = Mathf.Clamp(ip - 2, 0, _data.Count - 1); + var i1 = Mathf.Clamp(ip - 1, 0, _data.Count - 1); + var i2 = Mathf.Clamp(ip, 0, _data.Count - 1); + var i3 = Mathf.Clamp(ip + 1, 0, _data.Count - 1); + if (i1 == i2) + { + return _data[i1].Value; + } + //double ip0 = _data[i1].Value; + //double ip1 = _data[i2].Value; + var ip0 = _data[i1].Key; + var ip1 = _data[i2].Key; + var a = (smv - ip0) / (ip1 - ip0); + return Utils.InterpolateCubic(_data[i0].Value, _data[i1].Value, _data[i2].Value, + _data[i3].Value, a); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs.meta new file mode 100644 index 00000000..833518a9 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Curve.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: d429892d39ef845f392933debac7bfa9 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs new file mode 100644 index 00000000..c14b8365 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs @@ -0,0 +1,106 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that uses three source modules to displace each + /// coordinate of the input value before returning the output value from + /// a source module. [OPERATOR] + /// </summary> + public class Displace : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Displace. + /// </summary> + public Displace() + : base(4) + { + } + + /// <summary> + /// Initializes a new instance of Displace. + /// </summary> + /// <param name="input">The input module.</param> + /// <param name="x">The displacement module of the x-axis.</param> + /// <param name="y">The displacement module of the y-axis.</param> + /// <param name="z">The displacement module of the z-axis.</param> + public Displace(ModuleBase input, ModuleBase x, ModuleBase y, ModuleBase z) + : base(4) + { + Modules[0] = input; + Modules[1] = x; + Modules[2] = y; + Modules[3] = z; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the controlling module on the x-axis. + /// </summary> + public ModuleBase X + { + get { return Modules[1]; } + set + { + Debug.Assert(value != null); + Modules[1] = value; + } + } + + /// <summary> + /// Gets or sets the controlling module on the z-axis. + /// </summary> + public ModuleBase Y + { + get { return Modules[2]; } + set + { + Debug.Assert(value != null); + Modules[2] = value; + } + } + + /// <summary> + /// Gets or sets the controlling module on the z-axis. + /// </summary> + public ModuleBase Z + { + get { return Modules[3]; } + set + { + Debug.Assert(value != null); + Modules[3] = value; + } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + Debug.Assert(Modules[2] != null); + Debug.Assert(Modules[3] != null); + var dx = x + Modules[1].GetValue(x, y, z); + var dy = y + Modules[2].GetValue(x, y, z); + var dz = z + Modules[3].GetValue(x, y, z); + return Modules[0].GetValue(dx, dy, dz); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs.meta new file mode 100644 index 00000000..56558e44 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Displace.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: ae7f5b41abbf54441933a154a7da8df8 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs new file mode 100644 index 00000000..a8d7db95 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs @@ -0,0 +1,83 @@ +using System; +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that maps the output value from a source module onto an + /// exponential curve. [OPERATOR] + /// </summary> + public class Exponent : ModuleBase + { + #region Fields + + private double _exponent = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Exponent. + /// </summary> + public Exponent() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Exponent. + /// </summary> + /// <param name="input">The input module.</param> + public Exponent(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Exponent. + /// </summary> + /// <param name="exponent">The exponent to use.</param> + /// <param name="input">The input module.</param> + public Exponent(double exponent, ModuleBase input) + : base(1) + { + Modules[0] = input; + Value = exponent; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the exponent. + /// </summary> + public double Value + { + get { return _exponent; } + set { _exponent = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + var v = Modules[0].GetValue(x, y, z); + return (Math.Pow(Math.Abs((v + 1.0) / 2.0), _exponent) * 2.0 - 1.0); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs.meta new file mode 100644 index 00000000..ce41330e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Exponent.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: c3edd0e0a654443fd92d4418bffa8a5d diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs new file mode 100644 index 00000000..89ff52ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs @@ -0,0 +1,49 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that inverts the output value from a source module. [OPERATOR] + /// </summary> + public class Invert : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Invert. + /// </summary> + public Invert() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Invert. + /// </summary> + /// <param name="input">The input module.</param> + public Invert(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + return -Modules[0].GetValue(x, y, z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs.meta new file mode 100644 index 00000000..1565bd3a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Invert.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 32c3770b72d4a4b47b1703ca8240448a diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs new file mode 100644 index 00000000..b6845cbc --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs @@ -0,0 +1,56 @@ +using System; +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the larger of the two output values from two + /// source modules. [OPERATOR] + /// </summary> + public class Max : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Max. + /// </summary> + public Max() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Max. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Max(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + var a = Modules[0].GetValue(x, y, z); + var b = Modules[1].GetValue(x, y, z); + return Math.Max(a, b); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs.meta new file mode 100644 index 00000000..d5753784 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Max.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 3d783a2fe1eb44925b1dfca3fccfa3c5 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs new file mode 100644 index 00000000..c6c74316 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs @@ -0,0 +1,56 @@ +using System; +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the smaller of the two output values from two + /// source modules. [OPERATOR] + /// </summary> + public class Min : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Min. + /// </summary> + public Min() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Min. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Min(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + var a = Modules[0].GetValue(x, y, z); + var b = Modules[1].GetValue(x, y, z); + return Math.Min(a, b); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs.meta new file mode 100644 index 00000000..26da0955 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Min.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: e0ff3830dd0434df994555aef62c8b9a diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs new file mode 100644 index 00000000..3346d4ba --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs @@ -0,0 +1,53 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the product of the two output values from + /// two source modules. [OPERATOR] + /// </summary> + public class Multiply : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Multiply. + /// </summary> + public Multiply() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Multiply. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Multiply(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + return Modules[0].GetValue(x, y, z) * Modules[1].GetValue(x, y, z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs.meta new file mode 100644 index 00000000..3cdc1179 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Multiply.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 70b45911e3d204f82a1b4a9c74b8657c diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs new file mode 100644 index 00000000..137b75c7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs @@ -0,0 +1,54 @@ +using System; +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs value from a first source module + /// to the power of the output value from a second source module. [OPERATOR] + /// </summary> + public class Power : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Power. + /// </summary> + public Power() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Power. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Power(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + return Math.Pow(Modules[0].GetValue(x, y, z), Modules[1].GetValue(x, y, z)); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs.meta new file mode 100644 index 00000000..b9085829 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Power.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: ab5f89d2b3238431891abbc5b670cb9b diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs new file mode 100644 index 00000000..53e229fd --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs @@ -0,0 +1,150 @@ +using System; +using UnityEngine; +using Debug = System.Diagnostics.Debug; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that rotates the input value around the origin before + /// returning the output value from a source module. [OPERATOR] + /// </summary> + public class Rotate : ModuleBase + { + #region Fields + + private double _x; + private double _x1Matrix; + private double _x2Matrix; + private double _x3Matrix; + private double _y; + private double _y1Matrix; + private double _y2Matrix; + private double _y3Matrix; + private double _z; + private double _z1Matrix; + private double _z2Matrix; + private double _z3Matrix; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Rotate. + /// </summary> + public Rotate() + : base(1) + { + SetAngles(0.0, 0.0, 0.0); + } + + /// <summary> + /// Initializes a new instance of Rotate. + /// </summary> + /// <param name="input">The input module.</param> + public Rotate(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Rotate. + /// </summary> + /// <param name="x">The rotation around the x-axis.</param> + /// <param name="y">The rotation around the y-axis.</param> + /// <param name="z">The rotation around the z-axis.</param> + /// <param name="input">The input module.</param> + public Rotate(double x, double y, double z, ModuleBase input) + : base(1) + { + Modules[0] = input; + SetAngles(x, y, z); + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the rotation around the x-axis in degree. + /// </summary> + public double X + { + get { return _x; } + set { SetAngles(value, _y, _z); } + } + + /// <summary> + /// Gets or sets the rotation around the y-axis in degree. + /// </summary> + public double Y + { + get { return _y; } + set { SetAngles(_x, value, _z); } + } + + /// <summary> + /// Gets or sets the rotation around the z-axis in degree. + /// </summary> + public double Z + { + get { return _x; } + set { SetAngles(_x, _y, value); } + } + + #endregion + + #region Methods + + /// <summary> + /// Sets the rotation angles. + /// </summary> + /// <param name="x">The rotation around the x-axis.</param> + /// <param name="y">The rotation around the y-axis.</param> + /// <param name="z">The rotation around the z-axis.</param> + private void SetAngles(double x, double y, double z) + { + var xc = Math.Cos(x * Mathf.Deg2Rad); + var yc = Math.Cos(y * Mathf.Deg2Rad); + var zc = Math.Cos(z * Mathf.Deg2Rad); + var xs = Math.Sin(x * Mathf.Deg2Rad); + var ys = Math.Sin(y * Mathf.Deg2Rad); + var zs = Math.Sin(z * Mathf.Deg2Rad); + _x1Matrix = ys * xs * zs + yc * zc; + _y1Matrix = xc * zs; + _z1Matrix = ys * zc - yc * xs * zs; + _x2Matrix = ys * xs * zc - yc * zs; + _y2Matrix = xc * zc; + _z2Matrix = -yc * xs * zc - ys * zs; + _x3Matrix = -ys * xc; + _y3Matrix = xs; + _z3Matrix = yc * xc; + _x = x; + _y = y; + _z = z; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + var nx = (_x1Matrix * x) + (_y1Matrix * y) + (_z1Matrix * z); + var ny = (_x2Matrix * x) + (_y2Matrix * y) + (_z2Matrix * z); + var nz = (_x3Matrix * x) + (_y3Matrix * y) + (_z3Matrix * z); + return Modules[0].GetValue(nx, ny, nz); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs.meta new file mode 100644 index 00000000..fda425c9 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Rotate.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 798fa977dd6f54c2e843b49808125267 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs new file mode 100644 index 00000000..85c9479e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs @@ -0,0 +1,105 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that scales the coordinates of the input value before + /// returning the output value from a source module. [OPERATOR] + /// </summary> + public class Scale : ModuleBase + { + #region Fields + + private double _x = 1.0; + private double _y = 1.0; + private double _z = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Scale. + /// </summary> + public Scale() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Scale. + /// </summary> + /// <param name="input">The input module.</param> + public Scale(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Scale. + /// </summary> + /// <param name="x">The scaling on the x-axis.</param> + /// <param name="y">The scaling on the y-axis.</param> + /// <param name="z">The scaling on the z-axis.</param> + /// <param name="input">The input module.</param> + public Scale(double x, double y, double z, ModuleBase input) + : base(1) + { + Modules[0] = input; + X = x; + Y = y; + Z = z; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the scaling factor on the x-axis. + /// </summary> + public double X + { + get { return _x; } + set { _x = value; } + } + + /// <summary> + /// Gets or sets the scaling factor on the y-axis. + /// </summary> + public double Y + { + get { return _y; } + set { _y = value; } + } + + /// <summary> + /// Gets or sets the scaling factor on the z-axis. + /// </summary> + public double Z + { + get { return _z; } + set { _z = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + return Modules[0].GetValue(x * _x, y * _y, z * _z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs.meta new file mode 100644 index 00000000..8a70c2cb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Scale.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: d8b3b32e2ea7d4b649e21bb7c8efdfc1 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs new file mode 100644 index 00000000..8da7799d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs @@ -0,0 +1,79 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that applies a scaling factor and a bias to the output + /// value from a source module. [OPERATOR] + /// </summary> + public class ScaleBias : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of ScaleBias. + /// </summary> + public ScaleBias() + : base(1) + { + Scale = 1; + } + + /// <summary> + /// Initializes a new instance of ScaleBias. + /// </summary> + /// <param name="input">The input module.</param> + public ScaleBias(ModuleBase input) + : base(1) + { + Modules[0] = input; + Scale = 1; + } + + /// <summary> + /// Initializes a new instance of ScaleBias. + /// </summary> + /// <param name="scale">The scaling factor to apply to the output value from the source module.</param> + /// <param name="bias">The bias to apply to the scaled output value from the source module.</param> + /// <param name="input">The input module.</param> + public ScaleBias(double scale, double bias, ModuleBase input) + : base(1) + { + Modules[0] = input; + Bias = bias; + Scale = scale; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the bias to apply to the scaled output value from the source module. + /// </summary> + public double Bias { get; set; } + + /// <summary> + /// Gets or sets the scaling factor to apply to the output value from the source module. + /// </summary> + public double Scale { get; set; } + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + return Modules[0].GetValue(x, y, z) * Scale + Bias; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs.meta new file mode 100644 index 00000000..f6c79870 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/ScaleBias.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 5e791d0bd67434b428188c7342ff8789 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs new file mode 100644 index 00000000..c7320e43 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs @@ -0,0 +1,192 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the value selected from one of two source + /// modules chosen by the output value from a control module. [OPERATOR] + /// </summary> + public class Select : ModuleBase + { + #region Fields + + private double _fallOff; + private double _raw; + private double _min = -1.0; + private double _max = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Select. + /// </summary> + public Select() + : base(3) + { + } + + /// <summary> + /// Initializes a new instance of Select. + /// </summary> + /// <param name="inputA">The first input module.</param> + /// <param name="inputB">The second input module.</param> + /// <param name="controller">The controller module.</param> + public Select(ModuleBase inputA, ModuleBase inputB, ModuleBase controller) + : base(3) + { + Modules[0] = inputA; + Modules[1] = inputB; + Modules[2] = controller; + } + + /// <summary> + /// Initializes a new instance of Select. + /// </summary> + /// <param name="min">The minimum value.</param> + /// <param name="max">The maximum value.</param> + /// <param name="fallOff">The falloff value at the edge transition.</param> + /// <param name="inputA">The first input module.</param> + /// <param name="inputB">The second input module.</param> + public Select(double min, double max, double fallOff, ModuleBase inputA, ModuleBase inputB) + : this(inputA, inputB, null) + { + _min = min; + _max = max; + FallOff = fallOff; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the controlling module. + /// </summary> + public ModuleBase Controller + { + get { return Modules[2]; } + set + { + Debug.Assert(value != null); + Modules[2] = value; + } + } + + /// <summary> + /// Gets or sets the falloff value at the edge transition. + /// </summary> + /// <remarks> + /// Called SetEdgeFallOff() on the original LibNoise. + /// </remarks> + public double FallOff + { + get { return _fallOff; } + set + { + var bs = _max - _min; + _raw = value; + _fallOff = (value > bs / 2) ? bs / 2 : value; + } + } + + /// <summary> + /// Gets or sets the maximum, and re-calculated the fall-off accordingly. + /// </summary> + public double Maximum + { + get { return _max; } + set + { + _max = value; + FallOff = _raw; + } + } + + /// <summary> + /// Gets or sets the minimum, and re-calculated the fall-off accordingly. + /// </summary> + public double Minimum + { + get { return _min; } + set + { + _min = value; + FallOff = _raw; + } + } + + #endregion + + #region Methods + + /// <summary> + /// Sets the bounds. + /// </summary> + /// <param name="min">The minimum value.</param> + /// <param name="max">The maximum value.</param> + public void SetBounds(double min, double max) + { + Debug.Assert(min < max); + _min = min; + _max = max; + FallOff = _fallOff; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + Debug.Assert(Modules[2] != null); + var cv = Modules[2].GetValue(x, y, z); + if (_fallOff > 0.0) + { + double a; + if (cv < (_min - _fallOff)) + { + return Modules[0].GetValue(x, y, z); + } + if (cv < (_min + _fallOff)) + { + var lc = (_min - _fallOff); + var uc = (_min + _fallOff); + a = Utils.MapCubicSCurve((cv - lc) / (uc - lc)); + return Utils.InterpolateLinear(Modules[0].GetValue(x, y, z), + Modules[1].GetValue(x, y, z), a); + } + if (cv < (_max - _fallOff)) + { + return Modules[1].GetValue(x, y, z); + } + if (cv < (_max + _fallOff)) + { + var lc = (_max - _fallOff); + var uc = (_max + _fallOff); + a = Utils.MapCubicSCurve((cv - lc) / (uc - lc)); + return Utils.InterpolateLinear(Modules[1].GetValue(x, y, z), + Modules[0].GetValue(x, y, z), a); + } + return Modules[0].GetValue(x, y, z); + } + if (cv < _min || cv > _max) + { + return Modules[0].GetValue(x, y, z); + } + return Modules[1].GetValue(x, y, z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs.meta new file mode 100644 index 00000000..310cc39a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Select.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 68ae76f31b0c84b0593bf02785ebed7c diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs new file mode 100644 index 00000000..2dbd42ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs @@ -0,0 +1,53 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that outputs the difference of the two output values from two + /// source modules. [OPERATOR] + /// </summary> + public class Subtract : ModuleBase + { + #region Constructors + + /// <summary> + /// Initializes a new instance of Subtract. + /// </summary> + public Subtract() + : base(2) + { + } + + /// <summary> + /// Initializes a new instance of Subtract. + /// </summary> + /// <param name="lhs">The left hand input module.</param> + /// <param name="rhs">The right hand input module.</param> + public Subtract(ModuleBase lhs, ModuleBase rhs) + : base(2) + { + Modules[0] = lhs; + Modules[1] = rhs; + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(Modules[1] != null); + return Modules[0].GetValue(x, y, z) - Modules[1].GetValue(x, y, z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs.meta new file mode 100644 index 00000000..7bb1ccaa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Subtract.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: babee65c2a2764d2da05db9230dd8a22 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs new file mode 100644 index 00000000..5b80f641 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Debug = System.Diagnostics.Debug; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that maps the output value from a source module onto a + /// terrace-forming curve. [OPERATOR] + /// </summary> + public class Terrace : ModuleBase + { + #region Fields + + private readonly List<double> _data = new List<double>(); + private bool _inverted; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Terrace. + /// </summary> + public Terrace() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Terrace. + /// </summary> + /// <param name="input">The input module.</param> + public Terrace(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Terrace. + /// </summary> + /// <param name="inverted">Indicates whether the terrace curve is inverted.</param> + /// <param name="input">The input module.</param> + public Terrace(bool inverted, ModuleBase input) + : base(1) + { + Modules[0] = input; + IsInverted = inverted; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets the number of control points. + /// </summary> + public int ControlPointCount + { + get { return _data.Count; } + } + + /// <summary> + /// Gets the list of control points. + /// </summary> + public List<double> ControlPoints + { + get { return _data; } + } + + /// <summary> + /// Gets or sets a value whether the terrace curve is inverted. + /// </summary> + public bool IsInverted + { + get { return _inverted; } + set { _inverted = value; } + } + + #endregion + + #region Methods + + /// <summary> + /// Adds a control point to the curve. + /// </summary> + /// <param name="input">The curves input value.</param> + public void Add(double input) + { + if (!_data.Contains(input)) + { + _data.Add(input); + } + _data.Sort(delegate(double lhs, double rhs) { return lhs.CompareTo(rhs); }); + } + + /// <summary> + /// Clears the control points. + /// </summary> + public void Clear() + { + _data.Clear(); + } + + /// <summary> + /// Auto-generates a terrace curve. + /// </summary> + /// <param name="steps">The number of steps.</param> + public void Generate(int steps) + { + if (steps < 2) + { + throw new ArgumentException("Need at least two steps"); + } + Clear(); + var ts = 2.0 / (steps - 1.0); + var cv = -1.0; + for (var i = 0; i < steps; i++) + { + Add(cv); + cv += ts; + } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + Debug.Assert(ControlPointCount >= 2); + var smv = Modules[0].GetValue(x, y, z); + int ip; + for (ip = 0; ip < _data.Count; ip++) + { + if (smv < _data[ip]) + { + break; + } + } + var i0 = Mathf.Clamp(ip - 1, 0, _data.Count - 1); + var i1 = Mathf.Clamp(ip, 0, _data.Count - 1); + if (i0 == i1) + { + return _data[i1]; + } + var v0 = _data[i0]; + var v1 = _data[i1]; + var a = (smv - v0) / (v1 - v0); + if (_inverted) + { + a = 1.0 - a; + var t = v0; + v0 = v1; + v1 = t; + } + a *= a; + return Utils.InterpolateLinear(v0, v1, a); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs.meta new file mode 100644 index 00000000..2894f8e4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Terrace.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: adbad148cd4a64869873cc8d85051249 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs new file mode 100644 index 00000000..fa6e6790 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs @@ -0,0 +1,105 @@ +using System.Diagnostics; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that moves the coordinates of the input value before + /// returning the output value from a source module. [OPERATOR] + /// </summary> + public class Translate : ModuleBase + { + #region Fields + + private double _x = 1.0; + private double _y = 1.0; + private double _z = 1.0; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Translate. + /// </summary> + public Translate() + : base(1) + { + } + + /// <summary> + /// Initializes a new instance of Translate. + /// </summary> + /// <param name="input">The input module.</param> + public Translate(ModuleBase input) + : base(1) + { + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Translate. + /// </summary> + /// <param name="x">The translation on the x-axis.</param> + /// <param name="y">The translation on the y-axis.</param> + /// <param name="z">The translation on the z-axis.</param> + /// <param name="input">The input module.</param> + public Translate(double x, double y, double z, ModuleBase input) + : base(1) + { + Modules[0] = input; + X = x; + Y = y; + Z = z; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the translation on the x-axis. + /// </summary> + public double X + { + get { return _x; } + set { _x = value; } + } + + /// <summary> + /// Gets or sets the translation on the y-axis. + /// </summary> + public double Y + { + get { return _y; } + set { _y = value; } + } + + /// <summary> + /// Gets or sets the translation on the z-axis. + /// </summary> + public double Z + { + get { return _z; } + set { _z = value; } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + return Modules[0].GetValue(x + _x, y + _y, z + _z); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs.meta new file mode 100644 index 00000000..cae50ff8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Translate.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 584b45e999fb2415295c796d01c406d9 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs new file mode 100644 index 00000000..5c25805b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs @@ -0,0 +1,164 @@ +using System.Diagnostics; +using LibNoise.Generator; + +namespace LibNoise.Operator +{ + /// <summary> + /// Provides a noise module that that randomly displaces the input value before + /// returning the output value from a source module. [OPERATOR] + /// </summary> + public class Turbulence : ModuleBase + { + #region Constants + + private const double X0 = (12414.0 / 65536.0); + private const double Y0 = (65124.0 / 65536.0); + private const double Z0 = (31337.0 / 65536.0); + private const double X1 = (26519.0 / 65536.0); + private const double Y1 = (18128.0 / 65536.0); + private const double Z1 = (60493.0 / 65536.0); + private const double X2 = (53820.0 / 65536.0); + private const double Y2 = (11213.0 / 65536.0); + private const double Z2 = (44845.0 / 65536.0); + + #endregion + + #region Fields + + private double _power = 1.0; + private readonly Perlin _xDistort; + private readonly Perlin _yDistort; + private readonly Perlin _zDistort; + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of Turbulence. + /// </summary> + public Turbulence() + : base(1) + { + _xDistort = new Perlin(); + _yDistort = new Perlin(); + _zDistort = new Perlin(); + } + + /// <summary> + /// Initializes a new instance of Turbulence. + /// </summary> + /// <param name="input">The input module.</param> + public Turbulence(ModuleBase input) + : base(1) + { + _xDistort = new Perlin(); + _yDistort = new Perlin(); + _zDistort = new Perlin(); + Modules[0] = input; + } + + /// <summary> + /// Initializes a new instance of Turbulence. + /// </summary> + public Turbulence(double power, ModuleBase input) + : this(new Perlin(), new Perlin(), new Perlin(), power, input) + { + } + + /// <summary> + /// Initializes a new instance of Turbulence. + /// </summary> + /// <param name="x">The perlin noise to apply on the x-axis.</param> + /// <param name="y">The perlin noise to apply on the y-axis.</param> + /// <param name="z">The perlin noise to apply on the z-axis.</param> + /// <param name="power">The power of the turbulence.</param> + /// <param name="input">The input module.</param> + public Turbulence(Perlin x, Perlin y, Perlin z, double power, ModuleBase input) + : base(1) + { + _xDistort = x; + _yDistort = y; + _zDistort = z; + Modules[0] = input; + Power = power; + } + + #endregion + + #region Properties + + /// <summary> + /// Gets or sets the frequency of the turbulence. + /// </summary> + public double Frequency + { + get { return _xDistort.Frequency; } + set + { + _xDistort.Frequency = value; + _yDistort.Frequency = value; + _zDistort.Frequency = value; + } + } + + /// <summary> + /// Gets or sets the power of the turbulence. + /// </summary> + public double Power + { + get { return _power; } + set { _power = value; } + } + + /// <summary> + /// Gets or sets the roughness of the turbulence. + /// </summary> + public int Roughness + { + get { return _xDistort.OctaveCount; } + set + { + _xDistort.OctaveCount = value; + _yDistort.OctaveCount = value; + _zDistort.OctaveCount = value; + } + } + + /// <summary> + /// Gets or sets the seed of the turbulence. + /// </summary> + public int Seed + { + get { return _xDistort.Seed; } + set + { + _xDistort.Seed = value; + _yDistort.Seed = value + 1; + _zDistort.Seed = value + 2; + } + } + + #endregion + + #region ModuleBase Members + + /// <summary> + /// Returns the output value for the given input coordinates. + /// </summary> + /// <param name="x">The input coordinate on the x-axis.</param> + /// <param name="y">The input coordinate on the y-axis.</param> + /// <param name="z">The input coordinate on the z-axis.</param> + /// <returns>The resulting output value.</returns> + public override double GetValue(double x, double y, double z) + { + Debug.Assert(Modules[0] != null); + var xd = x + (_xDistort.GetValue(x + X0, y + Y0, z + Z0) * _power); + var yd = y + (_yDistort.GetValue(x + X1, y + Y1, z + Z1) * _power); + var zd = z + (_zDistort.GetValue(x + X2, y + Y2, z + Z2) * _power); + return Modules[0].GetValue(xd, yd, zd); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs.meta new file mode 100644 index 00000000..8a5c934c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Operator/Turbulence.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 0fff09f24d7f041909a70459bf281bd6 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties.meta new file mode 100644 index 00000000..7131a566 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 49675d30a4ae9442e91c545a7507cd48 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..5764ea83 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. + +[assembly: AssemblyTitle("LibNoise.Unity")] +[assembly: AssemblyProduct("LibNoise.Unity")] +[assembly: + AssemblyDescription("C# Unity Port of LibNoise, Ported from BigBlackBlock Gamestudio port of LibNoise to XNA")] +[assembly: AssemblyCompany("None")] +[assembly: + AssemblyCopyright( + "LibUnity.Xna Copyright © Jason Bevins 2003-2007, 2010 BigBlackBlock Gamestudio, LibNoise.Unity Copyright © 2010 Unity Commons, distributed under the terms on the Lesser GPL" + )] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. + +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM + +[assembly: Guid("aa606d44-f8c3-47aa-a2b5-9156119ff843")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// + +[assembly: AssemblyVersion("1.0.0.0")]
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs.meta new file mode 100644 index 00000000..66652972 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 9834969af61da4894b115a330b272bb9 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md new file mode 100644 index 00000000..92211c8b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md @@ -0,0 +1,25 @@ +# LibNoise.Unity + +The main repository for LibNoise.Unity is currently maintained by +[Ricardo J. Méndez](https://github.com/ricardojmendez). Pull requests +are welcome. + +## License + +LibNoise.Unity is released under the +[LGPL license](https://www.gnu.org/licenses/lgpl.html). See COPYING.txt and +COPYING.LESSER.txt for details. + +## About + +[LibNoise](http://libnoise.sourceforge.net/) was originally created by +Jason Bevins. The library was later ported to Xna by [Marc André Ueberall](http://www.big-black-block.com/#home), and moved to Unity by Tim Speltz. Speltz’s original development forum thread contains a Unity package with +an example scene, which can be found +[here](http://forum.unity3d.com/threads/68764-LibNoise-Ported-to-Unity). Please note that LibNoise.Unity is only a repository for the library code itself and +contains no example files. + +[You can also see the converted tutorials examples on this repository](https://github.com/ricardojmendez/LibNoiseTutorials). + +Other contributors to LibNoise.Unity include +[Teddy Bradford](https://github.com/teddybradford) who reworked much of the +Noise2D class to improve tiling support for noise maps. diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md.meta new file mode 100644 index 00000000..90d585c3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/README.md.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 68ca633e34cae4d52ace312cfc9c6652 diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs new file mode 100644 index 00000000..e2d68c4f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs @@ -0,0 +1,286 @@ +using System; + +namespace LibNoise +{ + internal static class Utils + { + #region Constants + + internal const double Sqrt3 = 1.7320508075688772935; + internal const int OctavesMaximum = 30; + +#if NOISE_VERSION_1 + private const int GeneratorNoiseX = 1; + private const int GeneratorNoiseY = 31337; + private const int GeneratorNoiseZ = 263; + private const int GeneratorSeed = 1013; + private const int GeneratorShift = 13; + #else + private const int GeneratorNoiseX = 1619; + private const int GeneratorNoiseY = 31337; + private const int GeneratorNoiseZ = 6971; + private const int GeneratorSeed = 1013; + private const int GeneratorShift = 8; +#endif + + #endregion + + #region Fields + + internal static readonly double[] Randoms = + { + -0.763874, -0.596439, -0.246489, 0.0, 0.396055, 0.904518, -0.158073, 0.0, + -0.499004, -0.8665, -0.0131631, 0.0, 0.468724, -0.824756, 0.316346, 0.0, + 0.829598, 0.43195, 0.353816, 0.0, -0.454473, 0.629497, -0.630228, 0.0, + -0.162349, -0.869962, -0.465628, 0.0, 0.932805, 0.253451, 0.256198, 0.0, + -0.345419, 0.927299, -0.144227, 0.0, -0.715026, -0.293698, -0.634413, 0.0, + -0.245997, 0.717467, -0.651711, 0.0, -0.967409, -0.250435, -0.037451, 0.0, + 0.901729, 0.397108, -0.170852, 0.0, 0.892657, -0.0720622, -0.444938, 0.0, + 0.0260084, -0.0361701, 0.999007, 0.0, 0.949107, -0.19486, 0.247439, 0.0, + 0.471803, -0.807064, -0.355036, 0.0, 0.879737, 0.141845, 0.453809, 0.0, + 0.570747, 0.696415, 0.435033, 0.0, -0.141751, -0.988233, -0.0574584, 0.0, + -0.58219, -0.0303005, 0.812488, 0.0, -0.60922, 0.239482, -0.755975, 0.0, + 0.299394, -0.197066, -0.933557, 0.0, -0.851615, -0.220702, -0.47544, 0.0, + 0.848886, 0.341829, -0.403169, 0.0, -0.156129, -0.687241, 0.709453, 0.0, + -0.665651, 0.626724, 0.405124, 0.0, 0.595914, -0.674582, 0.43569, 0.0, + 0.171025, -0.509292, 0.843428, 0.0, 0.78605, 0.536414, -0.307222, 0.0, + 0.18905, -0.791613, 0.581042, 0.0, -0.294916, 0.844994, 0.446105, 0.0, + 0.342031, -0.58736, -0.7335, 0.0, 0.57155, 0.7869, 0.232635, 0.0, + 0.885026, -0.408223, 0.223791, 0.0, -0.789518, 0.571645, 0.223347, 0.0, + 0.774571, 0.31566, 0.548087, 0.0, -0.79695, -0.0433603, -0.602487, 0.0, + -0.142425, -0.473249, -0.869339, 0.0, -0.0698838, 0.170442, 0.982886, 0.0, + 0.687815, -0.484748, 0.540306, 0.0, 0.543703, -0.534446, -0.647112, 0.0, + 0.97186, 0.184391, -0.146588, 0.0, 0.707084, 0.485713, -0.513921, 0.0, + 0.942302, 0.331945, 0.043348, 0.0, 0.499084, 0.599922, 0.625307, 0.0, + -0.289203, 0.211107, 0.9337, 0.0, 0.412433, -0.71667, -0.56239, 0.0, + 0.87721, -0.082816, 0.47291, 0.0, -0.420685, -0.214278, 0.881538, 0.0, + 0.752558, -0.0391579, 0.657361, 0.0, 0.0765725, -0.996789, 0.0234082, 0.0, + -0.544312, -0.309435, -0.779727, 0.0, -0.455358, -0.415572, 0.787368, 0.0, + -0.874586, 0.483746, 0.0330131, 0.0, 0.245172, -0.0838623, 0.965846, 0.0, + 0.382293, -0.432813, 0.81641, 0.0, -0.287735, -0.905514, 0.311853, 0.0, + -0.667704, 0.704955, -0.239186, 0.0, 0.717885, -0.464002, -0.518983, 0.0, + 0.976342, -0.214895, 0.0240053, 0.0, -0.0733096, -0.921136, 0.382276, 0.0, + -0.986284, 0.151224, -0.0661379, 0.0, -0.899319, -0.429671, 0.0812908, 0.0, + 0.652102, -0.724625, 0.222893, 0.0, 0.203761, 0.458023, -0.865272, 0.0, + -0.030396, 0.698724, -0.714745, 0.0, -0.460232, 0.839138, 0.289887, 0.0, + -0.0898602, 0.837894, 0.538386, 0.0, -0.731595, 0.0793784, 0.677102, 0.0, + -0.447236, -0.788397, 0.422386, 0.0, 0.186481, 0.645855, -0.740335, 0.0, + -0.259006, 0.935463, 0.240467, 0.0, 0.445839, 0.819655, -0.359712, 0.0, + 0.349962, 0.755022, -0.554499, 0.0, -0.997078, -0.0359577, 0.0673977, 0.0, + -0.431163, -0.147516, -0.890133, 0.0, 0.299648, -0.63914, 0.708316, 0.0, + 0.397043, 0.566526, -0.722084, 0.0, -0.502489, 0.438308, -0.745246, 0.0, + 0.0687235, 0.354097, 0.93268, 0.0, -0.0476651, -0.462597, 0.885286, 0.0, + -0.221934, 0.900739, -0.373383, 0.0, -0.956107, -0.225676, 0.186893, 0.0, + -0.187627, 0.391487, -0.900852, 0.0, -0.224209, -0.315405, 0.92209, 0.0, + -0.730807, -0.537068, 0.421283, 0.0, -0.0353135, -0.816748, 0.575913, 0.0, + -0.941391, 0.176991, -0.287153, 0.0, -0.154174, 0.390458, 0.90762, 0.0, + -0.283847, 0.533842, 0.796519, 0.0, -0.482737, -0.850448, 0.209052, 0.0, + -0.649175, 0.477748, 0.591886, 0.0, 0.885373, -0.405387, -0.227543, 0.0, + -0.147261, 0.181623, -0.972279, 0.0, 0.0959236, -0.115847, -0.988624, 0.0, + -0.89724, -0.191348, 0.397928, 0.0, 0.903553, -0.428461, -0.00350461, 0.0, + 0.849072, -0.295807, -0.437693, 0.0, 0.65551, 0.741754, -0.141804, 0.0, + 0.61598, -0.178669, 0.767232, 0.0, 0.0112967, 0.932256, -0.361623, 0.0, + -0.793031, 0.258012, 0.551845, 0.0, 0.421933, 0.454311, 0.784585, 0.0, + -0.319993, 0.0401618, -0.946568, 0.0, -0.81571, 0.551307, -0.175151, 0.0, + -0.377644, 0.00322313, 0.925945, 0.0, 0.129759, -0.666581, -0.734052, 0.0, + 0.601901, -0.654237, -0.457919, 0.0, -0.927463, -0.0343576, -0.372334, 0.0, + -0.438663, -0.868301, -0.231578, 0.0, -0.648845, -0.749138, -0.133387, 0.0, + 0.507393, -0.588294, 0.629653, 0.0, 0.726958, 0.623665, 0.287358, 0.0, + 0.411159, 0.367614, -0.834151, 0.0, 0.806333, 0.585117, -0.0864016, 0.0, + 0.263935, -0.880876, 0.392932, 0.0, 0.421546, -0.201336, 0.884174, 0.0, + -0.683198, -0.569557, -0.456996, 0.0, -0.117116, -0.0406654, -0.992285, 0.0, + -0.643679, -0.109196, -0.757465, 0.0, -0.561559, -0.62989, 0.536554, 0.0, + 0.0628422, 0.104677, -0.992519, 0.0, 0.480759, -0.2867, -0.828658, 0.0, + -0.228559, -0.228965, -0.946222, 0.0, -0.10194, -0.65706, -0.746914, 0.0, + 0.0689193, -0.678236, 0.731605, 0.0, 0.401019, -0.754026, 0.52022, 0.0, + -0.742141, 0.547083, -0.387203, 0.0, -0.00210603, -0.796417, -0.604745, 0.0, + 0.296725, -0.409909, -0.862513, 0.0, -0.260932, -0.798201, 0.542945, 0.0, + -0.641628, 0.742379, 0.192838, 0.0, -0.186009, -0.101514, 0.97729, 0.0, + 0.106711, -0.962067, 0.251079, 0.0, -0.743499, 0.30988, -0.592607, 0.0, + -0.795853, -0.605066, -0.0226607, 0.0, -0.828661, -0.419471, -0.370628, 0.0, + 0.0847218, -0.489815, -0.8677, 0.0, -0.381405, 0.788019, -0.483276, 0.0, + 0.282042, -0.953394, 0.107205, 0.0, 0.530774, 0.847413, 0.0130696, 0.0, + 0.0515397, 0.922524, 0.382484, 0.0, -0.631467, -0.709046, 0.313852, 0.0, + 0.688248, 0.517273, 0.508668, 0.0, 0.646689, -0.333782, -0.685845, 0.0, + -0.932528, -0.247532, -0.262906, 0.0, 0.630609, 0.68757, -0.359973, 0.0, + 0.577805, -0.394189, 0.714673, 0.0, -0.887833, -0.437301, -0.14325, 0.0, + 0.690982, 0.174003, 0.701617, 0.0, -0.866701, 0.0118182, 0.498689, 0.0, + -0.482876, 0.727143, 0.487949, 0.0, -0.577567, 0.682593, -0.447752, 0.0, + 0.373768, 0.0982991, 0.922299, 0.0, 0.170744, 0.964243, -0.202687, 0.0, + 0.993654, -0.035791, -0.106632, 0.0, 0.587065, 0.4143, -0.695493, 0.0, + -0.396509, 0.26509, -0.878924, 0.0, -0.0866853, 0.83553, -0.542563, 0.0, + 0.923193, 0.133398, -0.360443, 0.0, 0.00379108, -0.258618, 0.965972, 0.0, + 0.239144, 0.245154, -0.939526, 0.0, 0.758731, -0.555871, 0.33961, 0.0, + 0.295355, 0.309513, 0.903862, 0.0, 0.0531222, -0.91003, -0.411124, 0.0, + 0.270452, 0.0229439, -0.96246, 0.0, 0.563634, 0.0324352, 0.825387, 0.0, + 0.156326, 0.147392, 0.976646, 0.0, -0.0410141, 0.981824, 0.185309, 0.0, + -0.385562, -0.576343, -0.720535, 0.0, 0.388281, 0.904441, 0.176702, 0.0, + 0.945561, -0.192859, -0.262146, 0.0, 0.844504, 0.520193, 0.127325, 0.0, + 0.0330893, 0.999121, -0.0257505, 0.0, -0.592616, -0.482475, -0.644999, 0.0, + 0.539471, 0.631024, -0.557476, 0.0, 0.655851, -0.027319, -0.754396, 0.0, + 0.274465, 0.887659, 0.369772, 0.0, -0.123419, 0.975177, -0.183842, 0.0, + -0.223429, 0.708045, 0.66989, 0.0, -0.908654, 0.196302, 0.368528, 0.0, + -0.95759, -0.00863708, 0.288005, 0.0, 0.960535, 0.030592, 0.276472, 0.0, + -0.413146, 0.907537, 0.0754161, 0.0, -0.847992, 0.350849, -0.397259, 0.0, + 0.614736, 0.395841, 0.68221, 0.0, -0.503504, -0.666128, -0.550234, 0.0, + -0.268833, -0.738524, -0.618314, 0.0, 0.792737, -0.60001, -0.107502, 0.0, + -0.637582, 0.508144, -0.579032, 0.0, 0.750105, 0.282165, -0.598101, 0.0, + -0.351199, -0.392294, -0.850155, 0.0, 0.250126, -0.960993, -0.118025, 0.0, + -0.732341, 0.680909, -0.0063274, 0.0, -0.760674, -0.141009, 0.633634, 0.0, + 0.222823, -0.304012, 0.926243, 0.0, 0.209178, 0.505671, 0.836984, 0.0, + 0.757914, -0.56629, -0.323857, 0.0, -0.782926, -0.339196, 0.52151, 0.0, + -0.462952, 0.585565, 0.665424, 0.0, 0.61879, 0.194119, -0.761194, 0.0, + 0.741388, -0.276743, 0.611357, 0.0, 0.707571, 0.702621, 0.0752872, 0.0, + 0.156562, 0.819977, 0.550569, 0.0, -0.793606, 0.440216, 0.42, 0.0, + 0.234547, 0.885309, -0.401517, 0.0, 0.132598, 0.80115, -0.58359, 0.0, + -0.377899, -0.639179, 0.669808, 0.0, -0.865993, -0.396465, 0.304748, 0.0, + -0.624815, -0.44283, 0.643046, 0.0, -0.485705, 0.825614, -0.287146, 0.0, + -0.971788, 0.175535, 0.157529, 0.0, -0.456027, 0.392629, 0.798675, 0.0, + -0.0104443, 0.521623, -0.853112, 0.0, -0.660575, -0.74519, 0.091282, 0.0, + -0.0157698, -0.307475, -0.951425, 0.0, -0.603467, -0.250192, 0.757121, 0.0, + 0.506876, 0.25006, 0.824952, 0.0, 0.255404, 0.966794, 0.00884498, 0.0, + 0.466764, -0.874228, -0.133625, 0.0, 0.475077, -0.0682351, -0.877295, 0.0, + -0.224967, -0.938972, -0.260233, 0.0, -0.377929, -0.814757, -0.439705, 0.0, + -0.305847, 0.542333, -0.782517, 0.0, 0.26658, -0.902905, -0.337191, 0.0, + 0.0275773, 0.322158, -0.946284, 0.0, 0.0185422, 0.716349, 0.697496, 0.0, + -0.20483, 0.978416, 0.0273371, 0.0, -0.898276, 0.373969, 0.230752, 0.0, + -0.00909378, 0.546594, 0.837349, 0.0, 0.6602, -0.751089, 0.000959236, 0.0, + 0.855301, -0.303056, 0.420259, 0.0, 0.797138, 0.0623013, -0.600574, 0.0, + 0.48947, -0.866813, 0.0951509, 0.0, 0.251142, 0.674531, 0.694216, 0.0, + -0.578422, -0.737373, -0.348867, 0.0, -0.254689, -0.514807, 0.818601, 0.0, + 0.374972, 0.761612, 0.528529, 0.0, 0.640303, -0.734271, -0.225517, 0.0, + -0.638076, 0.285527, 0.715075, 0.0, 0.772956, -0.15984, -0.613995, 0.0, + 0.798217, -0.590628, 0.118356, 0.0, -0.986276, -0.0578337, -0.154644, 0.0, + -0.312988, -0.94549, 0.0899272, 0.0, -0.497338, 0.178325, 0.849032, 0.0, + -0.101136, -0.981014, 0.165477, 0.0, -0.521688, 0.0553434, -0.851339, 0.0, + -0.786182, -0.583814, 0.202678, 0.0, -0.565191, 0.821858, -0.0714658, 0.0, + 0.437895, 0.152598, -0.885981, 0.0, -0.92394, 0.353436, -0.14635, 0.0, + 0.212189, -0.815162, -0.538969, 0.0, -0.859262, 0.143405, -0.491024, 0.0, + 0.991353, 0.112814, 0.0670273, 0.0, 0.0337884, -0.979891, -0.196654, 0.0 + }; + + #endregion + + #region Methods + + internal static double GradientCoherentNoise3D(double x, double y, double z, long seed, QualityMode quality) + { + var x0 = x > 0.0 ? (int) x : (int) x - 1; + var x1 = x0 + 1; + var y0 = y > 0.0 ? (int) y : (int) y - 1; + var y1 = y0 + 1; + var z0 = z > 0.0 ? (int) z : (int) z - 1; + var z1 = z0 + 1; + double xs = 0, ys = 0, zs = 0; + switch (quality) + { + case QualityMode.Low: + { + xs = (x - x0); + ys = (y - y0); + zs = (z - z0); + break; + } + case QualityMode.Medium: + { + xs = MapCubicSCurve(x - x0); + ys = MapCubicSCurve(y - y0); + zs = MapCubicSCurve(z - z0); + break; + } + case QualityMode.High: + { + xs = MapQuinticSCurve(x - x0); + ys = MapQuinticSCurve(y - y0); + zs = MapQuinticSCurve(z - z0); + break; + } + } + var n0 = GradientNoise3D(x, y, z, x0, y0, z0, seed); + var n1 = GradientNoise3D(x, y, z, x1, y0, z0, seed); + var ix0 = InterpolateLinear(n0, n1, xs); + n0 = GradientNoise3D(x, y, z, x0, y1, z0, seed); + n1 = GradientNoise3D(x, y, z, x1, y1, z0, seed); + var ix1 = InterpolateLinear(n0, n1, xs); + var iy0 = InterpolateLinear(ix0, ix1, ys); + n0 = GradientNoise3D(x, y, z, x0, y0, z1, seed); + n1 = GradientNoise3D(x, y, z, x1, y0, z1, seed); + ix0 = InterpolateLinear(n0, n1, xs); + n0 = GradientNoise3D(x, y, z, x0, y1, z1, seed); + n1 = GradientNoise3D(x, y, z, x1, y1, z1, seed); + ix1 = InterpolateLinear(n0, n1, xs); + var iy1 = InterpolateLinear(ix0, ix1, ys); + return InterpolateLinear(iy0, iy1, zs); + } + + internal static double GradientNoise3D(double fx, double fy, double fz, int ix, int iy, int iz, long seed) + { + var i = (GeneratorNoiseX * ix + GeneratorNoiseY * iy + GeneratorNoiseZ * iz + + GeneratorSeed * seed) & 0xffffffff; + i ^= (i >> GeneratorShift); + i &= 0xff; + var xvg = Randoms[(i << 2)]; + var yvg = Randoms[(i << 2) + 1]; + var zvg = Randoms[(i << 2) + 2]; + var xvp = (fx - ix); + var yvp = (fy - iy); + var zvp = (fz - iz); + return ((xvg * xvp) + (yvg * yvp) + (zvg * zvp)) * 2.12; + } + + internal static double InterpolateCubic(double a, double b, double c, double d, double position) + { + var p = (d - c) - (a - b); + var q = (a - b) - p; + var r = c - a; + var s = b; + return p * position * position * position + q * position * position + r * position + s; + } + + internal static double InterpolateLinear(double a, double b, double position) + { + return ((1.0 - position) * a) + (position * b); + } + + internal static double MakeInt32Range(double value) + { + if (value >= 1073741824.0) + { + return (2.0 * Math.IEEERemainder(value, 1073741824.0)) - 1073741824.0; + } + if (value <= -1073741824.0) + { + return (2.0 * Math.IEEERemainder(value, 1073741824.0)) + 1073741824.0; + } + return value; + } + + internal static double MapCubicSCurve(double value) + { + return (value * value * (3.0 - 2.0 * value)); + } + + internal static double MapQuinticSCurve(double value) + { + var a3 = value * value * value; + var a4 = a3 * value; + var a5 = a4 * value; + return (6.0 * a5) - (15.0 * a4) + (10.0 * a3); + } + + internal static double ValueNoise3D(int x, int y, int z, int seed) + { + return 1.0 - (ValueNoise3DInt(x, y, z, seed) / 1073741824.0); + } + + internal static long ValueNoise3DInt(int x, int y, int z, int seed) + { + long n = (GeneratorNoiseX * x + GeneratorNoiseY * y + GeneratorNoiseZ * z + + GeneratorSeed * seed) & 0x7fffffff; + n = (n >> 13) ^ n; + return (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs.meta b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs.meta new file mode 100644 index 00000000..111818ca --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Examples/LibNoiseEditor/Plugins/LibNoise/Utils.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 32fa019161d9a4cd3b1a9173943428f3 diff --git a/Other/NodeEditorExamples/Assets/Saved Graphs.meta b/Other/NodeEditorExamples/Assets/Saved Graphs.meta new file mode 100644 index 00000000..5d34e39a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Saved Graphs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 52668eaa38fb2e8458df961ecc3a6fd4 +folderAsset: yes +timeCreated: 1503087123 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset b/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset new file mode 100644 index 00000000..839dfeb2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset @@ -0,0 +1,253 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5472e37c6bced914daa030c486155845, type: 3} + m_Name: NewNodeGraph + m_EditorClassIdentifier: + nodes: + - {fileID: 114989025082612502} + - {fileID: 114959272269765002} +--- !u!114 &114182598067638676 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 264.60007 + y: 66.13495 + width: 12 + height: 12 + parentNode: {fileID: 114959272269765002} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114223556159314668 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1f2d0ea566c0d2e4799418dc4757938e, type: 3} + m_Name: Perlin Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -77.69599 + y: 269.22327 + width: 150 + height: 145.5 + _outputs: + - {fileID: 114926877723509484} + _inputs: + - {fileID: 114491197120052024} + - {fileID: 114960602491277402} +--- !u!114 &114459671486234346 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 124.60007 + y: 66.13495 + width: 12 + height: 12 + parentNode: {fileID: 114959272269765002} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114491197120052024 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -83.69599 + y: 288.22327 + width: 12 + height: 12 + parentNode: {fileID: 114223556159314668} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114623776233254424 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Mask + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -117.39993 + y: -14.865051 + width: 12 + height: 12 + parentNode: {fileID: 114989025082612502} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114926877723509484 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Output + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 66.30401 + y: 288.22327 + width: 12 + height: 12 + parentNode: {fileID: 114223556159314668} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114959272269765002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 130.60007 + y: 47.13495 + width: 140 + height: 54.5 + _outputs: + - {fileID: 114182598067638676} + _inputs: + - {fileID: 114459671486234346} +--- !u!114 &114960602491277402 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Mask + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -83.69599 + y: 304.22327 + width: 12 + height: 12 + parentNode: {fileID: 114223556159314668} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114973991537035638 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -117.39993 + y: -30.865051 + width: 12 + height: 12 + parentNode: {fileID: 114989025082612502} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114975506084510258 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Output + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 32.600067 + y: -30.865051 + width: 12 + height: 12 + parentNode: {fileID: 114989025082612502} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114989025082612502 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1f2d0ea566c0d2e4799418dc4757938e, type: 3} + m_Name: Perlin Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -111.39993 + y: -49.86505 + width: 150 + height: 145.5 + _outputs: + - {fileID: 114975506084510258} + _inputs: + - {fileID: 114973991537035638} + - {fileID: 114623776233254424} diff --git a/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset.meta b/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset.meta new file mode 100644 index 00000000..006de8c6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Saved Graphs/NewNodeGraph.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fa8d7a7b36c84fb4b9283b7574942e7c +timeCreated: 1503423149 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Scenes.meta b/Other/NodeEditorExamples/Assets/Scenes.meta new file mode 100644 index 00000000..abb8a879 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce2c5281ee52d4b40856a364fee05bfa +folderAsset: yes +timeCreated: 1503013264 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity b/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity new file mode 100644 index 00000000..114459f6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity @@ -0,0 +1,259 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 170076734} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 10 + m_AtlasSize: 512 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 256 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &170076733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 170076735} + - component: {fileID: 170076734} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &170076734 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &170076735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &534669902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 534669905} + - component: {fileID: 534669904} + - component: {fileID: 534669903} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &534669903 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 +--- !u!20 &534669904 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &534669905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity.meta b/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 00000000..e4d72ab3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 15d1dc6cc81584443ac539196ae0c313 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/Scenes/main.unity b/Other/NodeEditorExamples/Assets/Scenes/main.unity new file mode 100644 index 00000000..c2a88224 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Scenes/main.unity @@ -0,0 +1,214 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &205316173 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 205316178} + - component: {fileID: 205316177} + - component: {fileID: 205316176} + - component: {fileID: 205316175} + - component: {fileID: 205316174} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &205316174 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205316173} + m_Enabled: 1 +--- !u!124 &205316175 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205316173} + m_Enabled: 1 +--- !u!92 &205316176 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205316173} + m_Enabled: 1 +--- !u!20 &205316177 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205316173} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.2647059, g: 0.2647059, b: 0.2647059, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: -28.81 + far clip plane: 1001.93 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &205316178 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 205316173} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Other/NodeEditorExamples/Assets/Scenes/main.unity.meta b/Other/NodeEditorExamples/Assets/Scenes/main.unity.meta new file mode 100644 index 00000000..d9789679 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/Scenes/main.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7cc2f6de14023a1458a7f55714c456d6 +timeCreated: 1501963980 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB.meta b/Other/NodeEditorExamples/Assets/UNEB.meta new file mode 100644 index 00000000..c9723819 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54bb531f87863154fac254f701aaba8d +folderAsset: yes +timeCreated: 1503008678 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty.meta b/Other/NodeEditorExamples/Assets/UNEB/3rdParty.meta new file mode 100644 index 00000000..5a1ce4d5 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2324764fc9139ac44a4bcb1c29af8964 +folderAsset: yes +timeCreated: 1501783373 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework.meta b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework.meta new file mode 100644 index 00000000..66035e2c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: adab484ec4e6ab246be215991707122b +folderAsset: yes +timeCreated: 1491889781 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs new file mode 100644 index 00000000..a0e257b8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs @@ -0,0 +1,251 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; +using System.Reflection; + +namespace NodeEditorFramework.Utilities +{ + + public static class GUIScaleUtility + { + // General + private static bool compabilityMode; + private static bool initiated; + + // Delegates to the reflected methods + private static Func<Rect> GetTopRectDelegate; + private static Func<Rect> topmostRectDelegate; + + // Delegate accessors + public static Rect getTopRect { get { return (Rect)GetTopRectDelegate.Invoke(); } } + + // Rect stack for manipulating groups + public static List<Rect> currentRectStack { get; private set; } + private static List<List<Rect>> rectStackGroups; + + // Matrices stack + private static List<Matrix4x4> GUIMatrices; + private static List<bool> adjustedGUILayout; + + #region Init + + public static void CheckInit() + { + if (!initiated) + Init(); + } + + public static void Init() + { + // Fetch rect acessors using Reflection + Assembly UnityEngine = Assembly.GetAssembly(typeof(UnityEngine.GUI)); + Type GUIClipType = UnityEngine.GetType("UnityEngine.GUIClip", true); + + PropertyInfo topmostRect = GUIClipType.GetProperty("topmostRect", BindingFlags.Static | BindingFlags.Public); + MethodInfo GetTopRect = GUIClipType.GetMethod("GetTopRect", BindingFlags.Static | BindingFlags.NonPublic); + MethodInfo ClipRect = GUIClipType.GetMethod("Clip", BindingFlags.Static | BindingFlags.Public, Type.DefaultBinder, new Type[] { typeof(Rect) }, new ParameterModifier[] { }); + + if (GUIClipType == null || topmostRect == null || GetTopRect == null || ClipRect == null) { + Debug.LogWarning("GUIScaleUtility cannot run on this system! Compability mode enabled. For you that means you're not able to use the Node Editor inside more than one group:( Please PM me (Seneral @UnityForums) so I can figure out what causes this! Thanks!"); + Debug.LogWarning((GUIClipType == null ? "GUIClipType is Null, " : "") + (topmostRect == null ? "topmostRect is Null, " : "") + (GetTopRect == null ? "GetTopRect is Null, " : "") + (ClipRect == null ? "ClipRect is Null, " : "")); + compabilityMode = true; + initiated = true; + return; + } + + // Create simple acessor delegates + GetTopRectDelegate = (Func<Rect>)Delegate.CreateDelegate(typeof(Func<Rect>), GetTopRect); + topmostRectDelegate = (Func<Rect>)Delegate.CreateDelegate(typeof(Func<Rect>), topmostRect.GetGetMethod()); + + if (GetTopRectDelegate == null || topmostRectDelegate == null) { + Debug.LogWarning("GUIScaleUtility cannot run on this system! Compability mode enabled. For you that means you're not able to use the Node Editor inside more than one group:( Please PM me (Seneral @UnityForums) so I can figure out what causes this! Thanks!"); + Debug.LogWarning((GUIClipType == null ? "GUIClipType is Null, " : "") + (topmostRect == null ? "topmostRect is Null, " : "") + (GetTopRect == null ? "GetTopRect is Null, " : "") + (ClipRect == null ? "ClipRect is Null, " : "")); + compabilityMode = true; + initiated = true; + return; + } + + // As we can call Begin/Ends inside another, we need to save their states hierarchial in Lists (not Stack, as we need to iterate over them!): + currentRectStack = new List<Rect>(); + rectStackGroups = new List<List<Rect>>(); + GUIMatrices = new List<Matrix4x4>(); + adjustedGUILayout = new List<bool>(); + + initiated = true; + } + + #endregion + + #region Scale Area + + /// <summary> + /// Begins a scaled local area. + /// Returns vector to offset GUI controls with to account for zooming to the pivot. + /// Using adjustGUILayout does that automatically for GUILayout rects. Theoretically can be nested! + /// </summary> + public static Vector2 BeginScale(ref Rect rect, Vector2 zoomPivot, float zoom, bool adjustGUILayout) + { + Rect screenRect; + if (compabilityMode) { + + // In compability mode, we will assume only one top group and do everything manually, not using reflected calls (-> practically blind) + GUI.EndGroup(); + screenRect = rect; + } + + else { + + // If it's supported, we take the completely generic way using reflected calls + GUIScaleUtility.BeginNoClip(); + screenRect = GUIScaleUtility.GUIToScaledSpace(rect); + } + + rect = Scale(screenRect, screenRect.position + zoomPivot, new Vector2(zoom, zoom)); + + // Now continue drawing using the new clipping group + GUI.BeginGroup(rect); + rect.position = Vector2.zero; // Adjust because we entered the new group + + // Because I currently found no way to actually scale to a custom pivot rather than (0, 0), + // we'll make use of a cheat and just offset it accordingly to let it appear as if it would scroll to the center + // Note, due to that, controls not adjusted are still scaled to (0, 0) + Vector2 zoomPosAdjust = rect.center - screenRect.size / 2 + zoomPivot; + + // For GUILayout, we can make this adjustment here if desired + adjustedGUILayout.Add(adjustGUILayout); + if (adjustGUILayout) { + GUILayout.BeginHorizontal(); + GUILayout.Space(rect.center.x - screenRect.size.x + zoomPivot.x); + GUILayout.BeginVertical(); + GUILayout.Space(rect.center.y - screenRect.size.y + zoomPivot.y); + } + + // Take a matrix backup to restore back later on + GUIMatrices.Add(GUI.matrix); + + // Scale GUI.matrix. After that we have the correct clipping group again. + GUIUtility.ScaleAroundPivot(new Vector2(1 / zoom, 1 / zoom), zoomPosAdjust); + + return zoomPosAdjust; + } + + /// <summary> + /// Ends a scale region previously opened with BeginScale + /// </summary> + public static void EndScale() + { + // Set last matrix and clipping group + if (GUIMatrices.Count == 0 || adjustedGUILayout.Count == 0) + throw new UnityException("GUIScaleUtility: You are ending more scale regions than you are beginning!"); + + GUI.matrix = GUIMatrices[GUIMatrices.Count - 1]; + GUIMatrices.RemoveAt(GUIMatrices.Count - 1); + + // End GUILayout zoomPosAdjustment + if (adjustedGUILayout[adjustedGUILayout.Count - 1]) { + + GUILayout.EndVertical(); + GUILayout.EndHorizontal(); + } + adjustedGUILayout.RemoveAt(adjustedGUILayout.Count - 1); + + // End the scaled group + GUI.EndGroup(); + + if (compabilityMode) { + + // In compability mode, we don't know the previous group rect, but as we cannot use top groups there either way, we restore the screen group + GUI.BeginClip(new Rect(0, 23, Screen.width, Screen.height - 23)); + } + + else { + + // Else, restore the clips (groups) + GUIScaleUtility.RestoreClips(); + } + } + + #endregion + + #region Clips Hierarchy + + /// <summary> + /// Begins a field without groups. They should be restored using RestoreClips. Can be nested! + /// </summary> + public static void BeginNoClip() + { + // Record and close all clips one by one, from bottom to top, until we hit the 'origin' + List<Rect> rectStackGroup = new List<Rect>(); + Rect topMostClip = getTopRect; + while (topMostClip != new Rect(-10000, -10000, 40000, 40000)) { + rectStackGroup.Add(topMostClip); + GUI.EndClip(); + topMostClip = getTopRect; + } + // Store the clips appropriately + rectStackGroup.Reverse(); + rectStackGroups.Add(rectStackGroup); + currentRectStack.AddRange(rectStackGroup); + } + + /// <summary> + /// Restores the clips removed in BeginNoClip or MoveClipsUp + /// </summary> + public static void RestoreClips() + { + if (rectStackGroups.Count == 0) { + Debug.LogError("GUIClipHierarchy: BeginNoClip/MoveClipsUp - RestoreClips count not balanced!"); + return; + } + + // Read and restore clips one by one, from top to bottom + List<Rect> rectStackGroup = rectStackGroups[rectStackGroups.Count - 1]; + for (int clipCnt = 0; clipCnt < rectStackGroup.Count; clipCnt++) { + GUI.BeginClip(rectStackGroup[clipCnt]); + currentRectStack.RemoveAt(currentRectStack.Count - 1); + } + rectStackGroups.RemoveAt(rectStackGroups.Count - 1); + } + + #endregion + + #region Space Transformations + + /// <summary> + /// Scales the rect around the pivot with scale + /// </summary> + public static Rect Scale(Rect rect, Vector2 pivot, Vector2 scale) + { + rect.position = Vector2.Scale(rect.position - pivot, scale) + pivot; + rect.size = Vector2.Scale(rect.size, scale); + return rect; + } + + public static Vector2 GUIToScaledSpace(Vector2 guiPosition) + { + if (rectStackGroups == null || rectStackGroups.Count == 0) + return guiPosition; + // Iterate through the clips and add positions ontop + List<Rect> rectStackGroup = rectStackGroups[rectStackGroups.Count - 1]; + for (int clipCnt = 0; clipCnt < rectStackGroup.Count; clipCnt++) + guiPosition += rectStackGroup[clipCnt].position; + return guiPosition; + } + + /// <summary> + /// Transforms the rect to the new space aquired with BeginNoClip or MoveClipsUp. + /// DOES NOT scale the rect, only offsets it! + /// It's way faster to call GUIToScreenSpace before modifying the space though! + /// </summary> + public static Rect GUIToScaledSpace(Rect guiRect) + { + if (rectStackGroups == null || rectStackGroups.Count == 0) + return guiRect; + guiRect.position = GUIToScaledSpace(guiRect.position); + return guiRect; + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs.meta new file mode 100644 index 00000000..239f91dd --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/GUIScaleUtility.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1531560365f0bfb45881cc297952a854 +timeCreated: 1491887635 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt new file mode 100644 index 00000000..6a3073a6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt @@ -0,0 +1,23 @@ +# Software license + +The MIT License (MIT) + +Copyright (c) 2015 Baste Nesse Buanes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt.meta b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt.meta new file mode 100644 index 00000000..1379c6aa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/3rdParty/NodeEditorFramework/License.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3b89e570c0baf842b5ea1792547f91d +timeCreated: 1491887832 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor.meta new file mode 100644 index 00000000..191b5f5a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8b9fa01c72d37c245b1a2eb96937972a +folderAsset: yes +timeCreated: 1501781446 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions.meta new file mode 100644 index 00000000..f7f8ff4e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5357f731dedd7cc468c40f66bcd4487f +folderAsset: yes +timeCreated: 1501781574 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs new file mode 100644 index 00000000..426c8a50 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs @@ -0,0 +1,23 @@ + +namespace UNEB +{ + public abstract class ActionBase + { + + public ActionManager manager; + + /// <summary> + /// Can be used to check if the action is a valid state for furthur execution. + /// For example, we only want to run delete node if a node is selected for deletion. + /// </summary> + /// <returns></returns> + public virtual bool Init() { return true; } + + public abstract void Do(); + + /// <summary> + /// Called when the action is removed from the undo/redo buffers. + /// </summary> + public virtual void OnDestroy() { } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs.meta new file mode 100644 index 00000000..eb9d005c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5dfa0b77744c2bc4eb973c5114f5de79 +timeCreated: 1501781587 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs new file mode 100644 index 00000000..b0450b46 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs @@ -0,0 +1,169 @@ + +using System; +using System.Collections.Generic; +using UnityEngine; +using UNEB.Utility; + +namespace UNEB +{ + /// <summary> + /// Handles execution of actions, undo, and redo. + /// </summary> + public class ActionManager + { + private NodeEditorWindow _window; + + private FiniteStack<UndoableAction> _undoStack; + private Stack<UndoableAction> _redoStack; + + // Caches the current multi-stage action that is currently executing. + private MultiStageAction _activeMultiAction = null; + + public event Action OnUndo; + public event Action OnRedo; + + public ActionManager(NodeEditorWindow w) + { + _undoStack = new FiniteStack<UndoableAction>(100); + _redoStack = new Stack<UndoableAction>(); + + _window = w; + + // Makes sure that the action cleans up after itself + // when it is removed from the undo buffer. + _undoStack.OnRemoveBottomItem += (action) => + { + action.OnDestroy(); + }; + } + + public void Update() + { + if (IsRunningAction) { + _activeMultiAction.Do(); + } + } + + public bool IsRunningAction + { + get { return _activeMultiAction != null; } + } + + /// <summary> + /// Runs an action and stores it in the undo stack. + /// </summary> + /// <typeparam name="T"></typeparam> + public void RunUndoableAction<T>() where T : UndoableAction, new() + { + T action = new T(); + action.manager = this; + + if (action.Init()) { + + clearRedoStack(); + _undoStack.Push(action); + action.Do(); + } + } + + /// <summary> + /// Starts a multi stage action but does not record it in the undo stack. + /// </summary> + /// <typeparam name="T"></typeparam> + public void StartMultiStageAction<T>() where T : MultiStageAction, new() + { + // Only run 1 multi-action at a time. + if (_activeMultiAction != null) { + return; + } + + T action = new T(); + action.manager = this; + + if (action.Init()) { + _activeMultiAction = action; + _activeMultiAction.OnActionStart(); + } + } + + /// <summary> + /// Records the multi-stage action in the undo stack. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="action"></param> + public void FinishMultiStageAction() + { + if (_activeMultiAction == null) { + return; + } + + // We check if the action ended properly so it can be stored in undo. + if (_activeMultiAction.OnActionEnd()) { + + clearRedoStack(); + _undoStack.Push(_activeMultiAction); + } + + // There is no longer an active multi-stage action. + _activeMultiAction = null; + } + + public void UndoAction() + { + if (_undoStack.Count != 0) { + + var action = _undoStack.Pop(); + _redoStack.Push(action); + + action.Undo(); + + if (OnUndo != null) + OnUndo(); + } + } + + public void RedoAction() + { + if (_redoStack.Count != 0) { + + var action = _redoStack.Pop(); + _undoStack.Push(action); + + action.Redo(); + + if (OnRedo != null) + OnRedo(); + } + } + + public void Reset() + { + _activeMultiAction = null; + clearUndoStack(); + clearRedoStack(); + } + + private void clearRedoStack() + { + foreach (var action in _redoStack) { + action.OnDestroy(); + } + + _redoStack.Clear(); + } + + private void clearUndoStack() + { + foreach (var action in _undoStack) { + action.OnDestroy(); + } + + _undoStack.Clear(); + } + + public NodeEditorWindow window + { + get { return _window; } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs.meta new file mode 100644 index 00000000..3cc64c36 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 62fe01f31afcc5a4ab446003a7360cb3 +timeCreated: 1501892528 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs new file mode 100644 index 00000000..d5089754 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs @@ -0,0 +1,456 @@ + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using UNEB.Utility; +using System.Reflection; +using System.Linq; + +namespace UNEB +{ + public class ActionTriggerSystem + { + public List<TriggerMapping> triggers; + + /// <summary> + /// Passive triggers do not interrupt the next possible trigger. + /// </summary> + public List<TriggerMapping> passiveTriggers; + + private ActionManager _manager; + private TriggerMapping _focus; + + public ActionTriggerSystem(ActionManager m) + { + _manager = m; + + triggers = new List<TriggerMapping>(); + passiveTriggers = new List<TriggerMapping>(); + + setupStandardTriggers(); + } + + public void Update() + { + foreach (TriggerMapping tm in triggers) { + if (tm.AllTriggersSatisfied()) { + tm.action(); + return; + } + } + + foreach (TriggerMapping tm in passiveTriggers) { + if (tm.AllTriggersSatisfied()) { + tm.action(); + } + } + + // Block all key inputs from passing through the Unity Editor + if (Event.current.isKey) + Event.current.Use(); + } + + private void setupStandardTriggers() + { + setupImmediateTriggers(); + setupContextTriggers(); + setupMultiStageTriggers(); + } + + private void setupImmediateTriggers() + { + var panInput = Create<InputTrigger>().Mouse(EventType.MouseDrag, InputTrigger.Button.Wheel); + panInput.action = () => + { + window.editor.Pan(Event.current.delta); + window.Repaint(); + }; + + var zoomInput = Create<InputTrigger>().Key(EventType.ScrollWheel, KeyCode.None, false, false); + zoomInput.action = () => + { + window.editor.Zoom(Event.current.delta.y); + window.Repaint(); + }; + + var selectSingle = Create<InputTrigger>().Mouse(EventType.MouseDown, InputTrigger.Button.Left); + selectSingle.action = () => + { + bool bResult = window.editor.OnMouseOverNode(onSingleSelected); + + // If the canvas is clicked then remove focus of GUI elements. + if (!bResult) { + GUI.FocusControl(null); + window.Repaint(); + } + }; + + var undoInput = Create<InputTrigger>().Key(EventType.KeyDown, KeyCode.Z, true, false); + undoInput.action = _manager.UndoAction; + + var redoInput = Create<InputTrigger>().Key(EventType.KeyDown, KeyCode.Y, true, false); + redoInput.action = _manager.RedoAction; + + var recordClick = Create<InputTrigger>().EventOnly(EventType.MouseDown); + recordClick.action = () => { window.state.lastClickedPosition = window.editor.MousePosition(); }; + + var homeView = Create<InputTrigger>().Key(EventType.KeyDown, KeyCode.F, false, false); + homeView.action = window.editor.HomeView; + } + + private void setupContextTriggers() + { + setupNodeCreateMenu(); + + Pair<string, Action>[] nodeContext = + { + ContextItem("Copy Node", () => { Debug.Log("Not Implemented"); }), + ContextItem("Delete Node", _manager.RunUndoableAction<DeleteNodeAction>) + }; + + var nodeTrigger = Create<ContextTrigger>().Build(nodeContext).EventOnly(EventType.ContextClick); + nodeTrigger.triggers.Add(isMouseOverNode); + nodeTrigger.triggers.Add(isGraphValid); + } + + private void setupNodeCreateMenu() + { + //Get all classes deriving from Node via reflection + Type derivedType = typeof(Node); + Assembly assembly = Assembly.GetAssembly(derivedType); + + List<Type> nodeTypes = assembly + .GetTypes() + .Where(t => + t != derivedType && + derivedType.IsAssignableFrom(t) + ).ToList(); + + //Populate canvasContext with entries for all node types + var canvasContext = new Pair<string, Action>[nodeTypes.Count]; + + for (int i = 0; i < nodeTypes.Count; i++) { + + Type nodeType = nodeTypes[i]; + Action createNode = () => + { + _manager.window.state.typeToCreate = nodeType; + _manager.RunUndoableAction<CreateNodeAction>(); + }; + + string name = ObjectNames.NicifyVariableName(nodeType.Name); + canvasContext[i] = ContextItem(name, createNode); + } + + var canvasTrigger = Create<ContextTrigger>().Build(canvasContext).EventOnly(EventType.ContextClick); + canvasTrigger.triggers.Add(isMouseOverCanvas); + canvasTrigger.triggers.Add(isGraphValid); + } + + private void setupMultiStageTriggers() + { + setupNodeDrag(); + setupNodeConnection(); + } + + private void setupNodeDrag() + { + var endDragInput = Create<InputTrigger>(false, true).Mouse(EventType.MouseUp, InputTrigger.Button.Left); + var runningDragInput = Create<InputTrigger>(false, true).EventOnly(EventType.MouseDrag); + var startDragInput = Create<InputTrigger>(false, true).Mouse(EventType.MouseDown, InputTrigger.Button.Left); + + startDragInput.triggers.Add(isMouseOverNode); + startDragInput.action = _manager.StartMultiStageAction<DragNode>; + + endDragInput.action = _manager.FinishMultiStageAction; + + runningDragInput.action = _manager.Update; + runningDragInput.action += window.Repaint; + + new MultiStageInputTrigger(startDragInput, endDragInput, runningDragInput); + } + + private void setupNodeConnection() + { + var endConnInput = Create<InputTrigger>(false, true).Mouse(EventType.MouseUp, InputTrigger.Button.Left); + var runningConnInput = Create<InputTrigger>(false, true).EventOnly(EventType.MouseDrag); + var startConnInput = Create<InputTrigger>(false, true).Mouse(EventType.MouseDown, InputTrigger.Button.Left); + + Func<bool> knobCondition = () => { return isMouseOverOutput() || isMouseOverInputStartConn(); }; + + startConnInput.triggers.Add(knobCondition); + startConnInput.triggers.Add(isOutputSelected); + + startConnInput.action = _manager.StartMultiStageAction<CreateConnection>; + + endConnInput.action = _manager.FinishMultiStageAction; + endConnInput.action += window.Repaint; + + runningConnInput.action = _manager.Update; + runningConnInput.action += window.Repaint; + + new MultiStageInputTrigger(startConnInput, endConnInput, runningConnInput); + } + + /// <summary> + /// Create a trigger mapping and store it in the triggers list. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public T Create<T>(bool isPassive = false, bool pushToFront = false) where T : TriggerMapping, new() + { + T mapping = new T(); + + if (isPassive) { + + if (pushToFront && passiveTriggers.Count > 0) passiveTriggers.Insert(0, mapping); + else passiveTriggers.Add(mapping); + } + + else { + + if (pushToFront && triggers.Count > 0) triggers.Insert(0, mapping); + else triggers.Add(mapping); + } + + return mapping; + } + + private void onSingleSelected(Node node) + { + _manager.window.state.selectedNode = node; + _manager.window.graph.PushToEnd(node); + + Selection.activeObject = node; + } + + private void onOutputKnobSelected(NodeOutput output) + { + _manager.window.state.selectedOutput = output; + } + + private bool isMouseOverNode() + { + return window.editor.OnMouseOverNode(onSingleSelected); + } + + private bool isMouseOverCanvas() + { + return !isMouseOverNode(); + } + + private bool isMouseOverOutput() + { + return window.editor.OnMouseOverOutput(onOutputKnobSelected); + } + + private bool isMouseOverInputStartConn() + { + Action<NodeInput> startConnFromInput = (NodeInput input) => + { + window.state.selectedOutput = input.Outputs[0]; + + // Detach this input if we are starting a connection action from the input. + if (window.state.selectedOutput != null) { + + window.state.selectedInput = input; + _manager.RunUndoableAction<RemoveConnection>(); + } + }; + + return window.editor.OnMouseOverInput(startConnFromInput); + } + + private bool isOutputSelected() + { + return window.state.selectedOutput != null; + } + + private NodeEditorWindow window + { + get { return _manager.window; } + } + + private bool isGraphValid() + { + return window.graph != null; + } + + public Pair<string, Action> ContextItem(string label, Action a) + { + return new Pair<string, Action>(label, a); + } + + /// <summary> + /// Maps a conditional trigger with an action. + /// </summary> + public class TriggerMapping + { + public List<Func<bool>> triggers = new List<Func<bool>>(); + public Action action; + + protected TriggerMapping() { } + + public TriggerMapping(Func<bool> trigger, Action action) + { + ; + triggers.Add(trigger); + this.action = action; + } + + public bool AllTriggersSatisfied() + { + foreach (var t in triggers) { + if (!t()) { + return false; + } + } + + return true; + } + } + + /// <summary> + /// Special trigger that uses input as a conditional. + /// </summary> + public class InputTrigger : TriggerMapping + { + public enum Button + { + Left = 0, + Right = 1, + Wheel = 2 + } + + private EventType t; + private KeyCode k; + private int button; + private bool bIsShift, bIsCtrl; + + /// <summary> + /// Initialize the input mapping with a key trigger. + /// </summary> + /// <param name="type"></param> + /// <param name="key"></param> + /// <param name="bShift"></param> + /// <param name="bCtrl"></param> + /// <returns></returns> + public InputTrigger Key(EventType type, KeyCode key, bool bShift, bool bCtrl) + { + t = type; + k = key; + + bIsShift = bShift; + bIsCtrl = bCtrl; + + Func<bool> trigger = () => + { + var e = Event.current; + + return + e.type == t && + e.keyCode == k && + e.shift == bIsShift && + e.control == bIsCtrl; + }; + + triggers.Add(trigger); + return this; + } + + /// <summary> + /// Initialize the input mapping with a mouse button tirgger. + /// </summary> + /// <param name="type"></param> + /// <param name="mButton"></param> + /// <returns></returns> + public InputTrigger Mouse(EventType type, Button mButton) + { + t = type; + button = (int)mButton; + + Func<bool> trigger = () => + { + var e = Event.current; + + return + e.type == t && + e.button == button; + }; + + triggers.Add(trigger); + return this; + } + + /// <summary> + /// Initializes the input mapping with the event. + /// </summary> + /// <param name="type"></param> + /// <returns></returns> + public InputTrigger EventOnly(EventType type) + { + t = type; + Func<bool> trigger = () => { return Event.current.type == t; }; + + triggers.Add(trigger); + return this; + } + } + + /// <summary> + /// Special trigger that uses context menus to execute other actions. + /// </summary> + public class ContextTrigger : InputTrigger + { + private GenericMenu menu; + + public ContextTrigger() + { + menu = new GenericMenu(); + action = menu.ShowAsContext; + } + + public ContextTrigger Build(params Pair<string, Action>[] contents) + { + foreach (var content in contents) { + + string label = content.item1; + Action action = content.item2; + + menu.AddItem(new GUIContent(label), false, () => { action(); }); + } + + return this; + } + } + + public class MultiStageInputTrigger + { + private InputTrigger _startTrigger, _endTrigger, _runningTrigger; + + private bool _bStarted = false; + + public MultiStageInputTrigger(InputTrigger start, InputTrigger end, InputTrigger running) + { + start.action += () => { _bStarted = true; }; + start.triggers.Add(hasNotStarted); + + end.triggers.Add(HasStarted); + end.action += () => { _bStarted = false; }; + + running.triggers.Add(HasStarted); + } + + public bool HasStarted() + { + return _bStarted; + } + + private bool hasNotStarted() + { + return !_bStarted; + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs.meta new file mode 100644 index 00000000..6d66a0d4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/ActionTriggerSystem.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2b8fd837eb8876e4fa8c9b94d8b977f0 +timeCreated: 1501897267 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs new file mode 100644 index 00000000..09d3e521 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs @@ -0,0 +1,106 @@ + +using System.Linq; +using System.Collections.Generic; + +using UnityEngine; +using UnityEditor; + +namespace UNEB +{ + public class CreateConnection : MultiStageAction + { + private NodeInput _input; + private NodeOutput _output; + + // The output of the old node it was connected to. + private NodeOutput _oldConnectedOutput; + + // Old inputs of the node. + private List<NodeInput> _oldConnectedInputs; + + public override void Do() + { + manager.window.state.selectedOutput = _output; + } + + public override void Undo() + { + _output.Remove(_input); + reconnectOldConnections(); + } + + public override void Redo() + { + disconnectOldConnections(); + _output.Add(_input); + } + + private void reconnectOldConnections() + { + // Re-connect old connections + if (_oldConnectedOutput != null) { + _oldConnectedOutput.Add(_input); + } + + if (_oldConnectedInputs != null) { + foreach (var input in _oldConnectedInputs) { + _output.Add(input); + } + } + } + + private void disconnectOldConnections() + { + // Remove old connections + if (_oldConnectedOutput != null) { + _oldConnectedOutput.Remove(_input); + } + + if (_oldConnectedInputs != null) { + _output.RemoveAll(); + } + } + + public override void OnActionStart() + { + _output = manager.window.state.selectedOutput; + } + + public override bool OnActionEnd() + { + manager.window.state.selectedOutput = null; + manager.window.editor.OnMouseOverInput((input) => { _input = input; }); + + // Make the connection. + if (_input != null && _output.CanConnectInput(_input)) { + + if (!_output.bCanHaveMultipleConnections) + { + _output.RemoveAll(); + } + + if (!_input.bCanHaveMultipleConnections) { + cacheOldConnections(); + disconnectOldConnections(); + } + + return _output.Add(_input); + } + + return false; + } + + private void cacheOldConnections() + { + // Check if the receiving node was already connected. + if (_input != null && _input.HasOutputConnected()) { + _oldConnectedOutput = _input.Outputs[0]; + } + + // Check if the origin node already had inputs + if (!_output.bCanHaveMultipleConnections && _output.InputCount > 0) { + _oldConnectedInputs = _output.Inputs.ToList(); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs.meta new file mode 100644 index 00000000..5f6468b1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateConnection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 89cf0324fa09d7d4b82a3308a2172117 +timeCreated: 1501807840 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs new file mode 100644 index 00000000..522fa0cb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs @@ -0,0 +1,55 @@ + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public class CreateNodeAction : UndoableAction + { + private NodeGraph _graph; + private Node _nodeCreated; + + // The node referenced can only be destroyed if the + // create action has been undone. + private bool _bCanDeleteNode = false; + + public override bool Init() + { + System.Type t = manager.window.state.typeToCreate; + return t != null && typeof(Node).IsAssignableFrom(t); + } + + public override void Do() + { + _graph = manager.window.graph; + + var state = manager.window.state; + + _nodeCreated = SaveManager.CreateNode(state.typeToCreate, _graph); + _nodeCreated.bodyRect.position = manager.window.state.lastClickedPosition; + + // Done with this type creation. + state.typeToCreate = null; + } + + public override void Undo() + { + _graph.Remove(_nodeCreated); + _bCanDeleteNode = true; + } + + public override void Redo() + { + _graph.Add(_nodeCreated); + _bCanDeleteNode = false; + } + + public override void OnDestroy() + { + if (_bCanDeleteNode && _nodeCreated) { + ScriptableObject.DestroyImmediate(_nodeCreated, true); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs.meta new file mode 100644 index 00000000..06f04a85 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/CreateNodeAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f1c2e7f15404be3468c08ac729975c13 +timeCreated: 1501781600 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs new file mode 100644 index 00000000..2e2e6672 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs @@ -0,0 +1,128 @@ + +using System; +using System.Linq; +using System.Collections.Generic; +using UnityEngine; +using UNEB.Utility; + +namespace UNEB +{ + // Each input can have many outputs + using InputToOutputPair = Pair<NodeInput, List<NodeOutput>>; + + // Each output can have many inputs + using OutputToInputsPair = Pair<NodeOutput, List<NodeInput>>; + + public class DeleteNodeAction : UndoableAction + { + private NodeGraph _graph; + private Node _nodeRemoved = null; + + private List<InputToOutputPair> _oldConnectedOutputs; + private List<OutputToInputsPair> _oldConnectedInputs; + + // The node referenced can only be destroyed if the + // delete action has been done or redone. + private bool _bCanDeleteNode = false; + + public DeleteNodeAction() + { + + _oldConnectedOutputs = new List<InputToOutputPair>(); + _oldConnectedInputs = new List<OutputToInputsPair>(); + } + + public override bool Init() + { + return manager.window.state.selectedNode != null; + } + + public override void Do() + { + _graph = manager.window.graph; + _nodeRemoved = manager.window.state.selectedNode; + _graph.Remove(_nodeRemoved); + + // Remember all the old outputs the inputs were connected to. + foreach (var input in _nodeRemoved.Inputs) { + + if (input.HasOutputConnected()) { + _oldConnectedOutputs.Add(new InputToOutputPair(input, input.Outputs.ToList())); + } + } + + // Remember all the old input connections that the outputs were connected to. + foreach (var output in _nodeRemoved.Outputs) { + + if (output.InputCount != 0) { + _oldConnectedInputs.Add(new OutputToInputsPair(output, output.Inputs.ToList())); + } + } + + disconnectOldConnections(); + + _bCanDeleteNode = true; + } + + public override void Undo() + { + _graph.Add(_nodeRemoved); + reconnectOldConnections(); + + _bCanDeleteNode = false; + } + + public override void Redo() + { + _graph.Remove(_nodeRemoved); + disconnectOldConnections(); + + _bCanDeleteNode = true; + } + + private void disconnectOldConnections() + { + // For all the outputs for this node, remove all the connected inputs. + foreach (var output in _nodeRemoved.Outputs) { + output.RemoveAll(); + } + + // For all the inputs for this node, remove all the connected outputs. + foreach (var input in _nodeRemoved.Inputs) { + input.RemoveAll(); + } + } + + private void reconnectOldConnections() + { + // For all the remembered inputs (of this node) to output pairs, reconnect. + foreach (InputToOutputPair inOutPair in _oldConnectedOutputs) { + + NodeInput input = inOutPair.item1; + List<NodeOutput> outputs = inOutPair.item2; + + foreach (var output in outputs) { + output.Add(input); + } + } + + // For all the remembered outputs (of this node) to inputs, reconnect. + foreach (OutputToInputsPair outInsPair in _oldConnectedInputs) { + + NodeOutput output = outInsPair.item1; + List<NodeInput> inputs = outInsPair.item2; + + foreach (var input in inputs) { + output.Add(input); + } + } + } + + public override void OnDestroy() + { + if (_bCanDeleteNode && _nodeRemoved) { + ScriptableObject.DestroyImmediate(_nodeRemoved, true); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs.meta new file mode 100644 index 00000000..4a62ff87 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DeleteNodeAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5653c134c34e88b4a971e196d0f42586 +timeCreated: 1501781608 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs new file mode 100644 index 00000000..9e4d89d0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs @@ -0,0 +1,42 @@ + +using UnityEngine; + +namespace UNEB +{ + public class DragNode : MultiStageAction + { + private Node _draggingNode; + + private Vector2 _startDragPos, _endDragPos; + + public const float dragSpeed = 1f; + + public override void Undo() + { + _draggingNode.bodyRect.position = _startDragPos; + } + + public override void Redo() + { + _draggingNode.bodyRect.position = _endDragPos; + } + + public override void Do() + { + NodeEditor editor = manager.window.editor; + _draggingNode.bodyRect.position += Event.current.delta * editor.ZoomScale * dragSpeed; + } + + public override void OnActionStart() + { + _draggingNode = manager.window.state.selectedNode; + _startDragPos = _draggingNode.bodyRect.position; + } + + public override bool OnActionEnd() + { + _endDragPos = _draggingNode.bodyRect.position; + return true; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs.meta new file mode 100644 index 00000000..efbc5101 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/DragNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2075b47cce2d17147a02ec2483f38698 +timeCreated: 1501792802 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs new file mode 100644 index 00000000..b7fd41fb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs @@ -0,0 +1,18 @@ + +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public abstract class MultiStageAction : UndoableAction + { + + public abstract void OnActionStart(); + + /// <summary> + /// Returns true if the action completed succesfully. + /// </summary> + /// <returns></returns> + public abstract bool OnActionEnd(); + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs.meta new file mode 100644 index 00000000..bc4a1081 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/MultiStageAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 211fa78df12a1d440a6aa57ca343d5ab +timeCreated: 1501892778 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs new file mode 100644 index 00000000..341e9f63 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs @@ -0,0 +1,32 @@ + +using UnityEngine; + +namespace UNEB +{ + public class RemoveConnection : UndoableAction + { + + private NodeOutput _output; + private NodeInput _input; + + public override void Do() + { + _input = manager.window.state.selectedInput; + _output = _input.Outputs[0]; + + _output.Remove(_input); + + manager.window.state.selectedInput = null; + } + + public override void Undo() + { + _output.Add(_input); + } + + public override void Redo() + { + _output.Remove(_input); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs.meta new file mode 100644 index 00000000..fec8868b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/RemoveConnection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d1b449f51ea4820498a2b38021e549d7 +timeCreated: 1501913312 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs new file mode 100644 index 00000000..53857a9f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs @@ -0,0 +1,12 @@ + +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public abstract class UndoableAction : ActionBase + { + public abstract void Undo(); + public abstract void Redo(); + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs.meta new file mode 100644 index 00000000..b6e7512b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/Actions/UndoableAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 72c02675816f81d4c9d15134303127b4 +timeCreated: 1501892769 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs new file mode 100644 index 00000000..a7b8db1d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs @@ -0,0 +1,665 @@ + +using System; +using System.Collections.Generic; + +using UnityEngine; +using UnityEditor; + +using NodeEditorFramework.Utilities; +using UNEB.Utility; + +namespace UNEB +{ + public class NodeEditor + { + /// <summary> + /// Callback for when a node is modified within the editor + /// </summary> + public static Action<NodeGraph, Node> onNodeGuiChange; + + /// <summary> + /// The rect bounds defining the recticle at the grid center. + /// </summary> + public static readonly Rect kReticleRect = new Rect(0, 0, 8, 8); + + public static float zoomDelta = 0.1f; + public static float minZoom = 1f; + public static float maxZoom = 4f; + public static float panSpeed = 1.2f; + + /// <summary> + /// The associated graph to visualize and edit. + /// </summary> + public NodeGraph graph; + private NodeEditorWindow _window; + + private Texture2D _gridTex; + private Texture2D _backTex; + private Texture2D _circleTex; + private Texture2D _knobTex; + private Texture2D _headerTex; + + public Color backColor; + public Color knobColor; + public Color guideColor; + + // To keep track of zooming. + private Vector2 _zoomAdjustment; + private Vector2 _zoom = Vector2.one; + public Vector2 panOffset = Vector2.zero; + + /// <summary> + /// Enables and disables drawing the guide to the grid center. + /// </summary> + public bool bDrawGuide = false; + + public NodeEditor(NodeEditorWindow w) + { + backColor = ColorExtensions.From255(59, 62, 74); + knobColor = ColorExtensions.From255(126, 186, 255); + + guideColor = Color.gray; + guideColor.a = 0.3f; + + _gridTex = TextureLib.GetTexture("Grid"); + _backTex = TextureLib.GetTexture("Square"); + _circleTex = TextureLib.GetTexture("Circle"); + + _window = w; + } + + #region Drawing + + public void Draw() + { + if (Event.current.type == EventType.Repaint) { + drawGrid(); + updateTextures(); + } + + if (graph) + drawGraphContents(); + + drawMode(); + } + + private void drawGraphContents() + { + Rect graphRect = _window.Size; + var center = graphRect.size / 2f; + + _zoomAdjustment = GUIScaleUtility.BeginScale(ref graphRect, center, ZoomScale, false); + + drawGridOverlay(); + drawConnectionPreview(); + drawConnections(); + drawNodes(); + + GUIScaleUtility.EndScale(); + } + + private void drawGrid() + { + var size = _window.Size.size; + var center = size / 2f; + + float zoom = ZoomScale; + + // Offset from origin in tile units + float xOffset = -(center.x * zoom + panOffset.x) / _gridTex.width; + float yOffset = ((center.y - size.y) * zoom + panOffset.y) / _gridTex.height; + + Vector2 tileOffset = new Vector2(xOffset, yOffset); + + // Amount of tiles + float tileAmountX = Mathf.Round(size.x * zoom) / _gridTex.width; + float tileAmountY = Mathf.Round(size.y * zoom) / _gridTex.height; + + Vector2 tileAmount = new Vector2(tileAmountX, tileAmountY); + + // Draw tiled background + GUI.DrawTextureWithTexCoords(_window.Size, _gridTex, new Rect(tileOffset, tileAmount)); + } + + // Handles drawing things over the grid such as axes. + private void drawGridOverlay() + { + drawAxes(); + drawGridCenter(); + + if (bDrawGuide) { + drawGuide(); + _window.Repaint(); + } + } + + private void drawGridCenter() + { + var rect = kReticleRect; + + rect.size *= ZoomScale; + rect.center = Vector2.zero; + rect.position = GraphToScreenSpace(rect.position); + + DrawTintTexture(rect, _circleTex, Color.gray); + } + + private void drawAxes() + { + // Draw axes. Make sure to scale based on zoom. + Vector2 up = Vector2.up * _window.Size.height * ZoomScale; + Vector2 right = Vector2.right * _window.Size.width * ZoomScale; + Vector2 down = -up; + Vector2 left = -right; + + // Make sure the axes follow the pan. + up.y -= panOffset.y; + down.y -= panOffset.y; + right.x -= panOffset.x; + left.x -= panOffset.x; + + up = GraphToScreenSpace(up); + down = GraphToScreenSpace(down); + right = GraphToScreenSpace(right); + left = GraphToScreenSpace(left); + + DrawLine(right, left, Color.gray); + DrawLine(up, down, Color.gray); + } + + /// <summary> + /// Shows where the center of the grid is. + /// </summary> + private void drawGuide() + { + Vector2 gridCenter = GraphToScreenSpace(Vector2.zero); + DrawLine(gridCenter, Event.current.mousePosition, guideColor); + } + + private void drawNodes() + { + // Calculate the viewing rect in graph space. + var view = _window.Size; + view.size *= ZoomScale; + view.center = -panOffset; + + // Render nodes within the view space for performance. + foreach (Node node in graph.nodes) { + + if (view.Overlaps(node.bodyRect)) { + drawNode(node); + drawKnobs(node); + } + } + } + + private void drawKnobs(Node node) + { + foreach (var input in node.Inputs) { + drawKnob(input); + } + + foreach (var output in node.Outputs) { + drawKnob(output); + } + } + + private void drawKnob(NodeConnection knob) + { + // Convert the body rect from graph to screen space. + var screenRect = knob.bodyRect; + screenRect.position = GraphToScreenSpace(screenRect.position); + + GUI.DrawTexture(screenRect, _knobTex); + } + + private void drawConnections() + { + foreach (var node in graph.nodes) { + foreach (var output in node.Outputs) { + foreach (var input in output.Inputs) { + + Vector2 start = GraphToScreenSpace(output.bodyRect.center); + Vector2 end = GraphToScreenSpace(input.bodyRect.center); + + DrawBezier(start, end, knobColor); + } + } + } + } + + private void drawConnectionPreview() + { + var output = _window.state.selectedOutput; + + if (output != null) { + Vector2 start = GraphToScreenSpace(output.bodyRect.center); + DrawBezier(start, Event.current.mousePosition, Color.gray); + } + } + + private void drawNode(Node node) + { + // Convert the node rect from graph to screen space. + Rect screenRect = node.bodyRect; + screenRect.position = GraphToScreenSpace(screenRect.position); + + // The node contents are grouped together within the node body. + BeginGroup(screenRect, backgroundStyle, backColor); + + // Make the body of node local to the group coordinate space. + Rect localRect = node.bodyRect; + localRect.position = Vector2.zero; + + // Draw the contents inside the node body, automatically laidout. + GUILayout.BeginArea(localRect, GUIStyle.none); + + node.HeaderStyle.normal.background = _headerTex; + + EditorGUI.BeginChangeCheck(); + node.OnNodeGUI(); + if (EditorGUI.EndChangeCheck()) + if (onNodeGuiChange != null) onNodeGuiChange(graph, node); + + GUILayout.EndArea(); + GUI.EndGroup(); + } + + /// <summary> + /// Draw the window mode in the background. + /// </summary> + public void drawMode() + { + if (!graph) { + GUI.Label(_modeStatusRect, new GUIContent("No Graph Set"), ModeStatusStyle); + } + + else if (_window.GetMode() == NodeEditorWindow.Mode.Edit) { + GUI.Label(_modeStatusRect, new GUIContent("Edit"), ModeStatusStyle); + } + + else { + GUI.Label(_modeStatusRect, new GUIContent("View"), ModeStatusStyle); + } + } + + /// <summary> + /// Draws a bezier between the two end points in screen space. + /// </summary> + public static void DrawBezier(Vector2 start, Vector2 end, Color color) + { + Vector2 endToStart = (end - start); + float dirFactor = Mathf.Clamp(endToStart.magnitude, 20f, 80f); + + endToStart.Normalize(); + Vector2 project = Vector3.Project(endToStart, Vector3.right); + + Vector2 startTan = start + project * dirFactor; + Vector2 endTan = end - project * dirFactor; + + UnityEditor.Handles.DrawBezier(start, end, startTan, endTan, color, null, 3f); + } + + /// <summary> + /// Draws a line between the two end points. + /// </summary> + /// <param name="start"></param> + /// <param name="end"></param> + public static void DrawLine(Vector2 start, Vector2 end, Color color) + { + var handleColor = Handles.color; + Handles.color = color; + + Handles.DrawLine(start, end); + Handles.color = handleColor; + } + + /// <summary> + /// Draws a GUI texture with a tint. + /// </summary> + /// <param name="r"></param> + /// <param name="t"></param> + /// <param name="c"></param> + public static void DrawTintTexture(Rect r, Texture t, Color c) + { + var guiColor = GUI.color; + GUI.color = c; + + GUI.DrawTexture(r, t); + GUI.color = guiColor; + } + + public static void BeginGroup(Rect r, GUIStyle style, Color color) + { + var old = GUI.color; + + GUI.color = color; + GUI.BeginGroup(r, style); + + GUI.color = old; + } + + // TODO: Call after exiting playmode. + private void updateTextures() + { + _knobTex = TextureLib.GetTintTex("Circle", knobColor); + _headerTex = TextureLib.GetTintTex("Square", ColorExtensions.From255(79, 82, 94)); + } + + #endregion + + #region View Operations + + public void ToggleDrawGuide() + { + bDrawGuide = !bDrawGuide; + } + + public void HomeView() + { + if (!graph || graph.nodes.Count == 0) { + panOffset = Vector2.zero; + return; + } + + float xMin = float.MaxValue; + float xMax = float.MinValue; + float yMin = float.MaxValue; + float yMax = float.MinValue; + + foreach (var node in graph.nodes) { + + Rect r = node.bodyRect; + + if (r.xMin < xMin) { + xMin = r.xMin; + } + + if (r.xMax > xMax) { + xMax = r.xMax; + } + + if (r.yMin < yMin) { + yMin = r.yMin; + } + + if (r.yMax > yMax) { + yMax = r.yMax; + } + } + + // Add some padding so nodes do not appear on the edge of the view. + xMin -= Node.kDefaultSize.x; + xMax += Node.kDefaultSize.x; + yMin -= Node.kDefaultSize.y; + yMax += Node.kDefaultSize.y; + var nodesArea = Rect.MinMaxRect(xMin, yMin, xMax, yMax); + + // Center the pan in the bounding view. + panOffset = -nodesArea.center; + + // Calculate the required zoom based on the ratio between the window view and node area rect. + var winSize = _window.Size; + float zoom = 1f; + + // Use the view width to determine zoom to fit the entire node area width. + if (nodesArea.width > nodesArea.height) { + + float widthRatio = nodesArea.width / winSize.width; + zoom = widthRatio; + + if (widthRatio < 1f) { + zoom = 1 / widthRatio; + } + } + + // Use the height to determine zoom. + else { + + float heightRatio = nodesArea.height / winSize.height; + zoom = heightRatio; + + if (heightRatio < 1f) { + zoom = 1 / heightRatio; + } + } + + ZoomScale = zoom; + } + + #endregion + + #region Space Transformations and Mouse Utilities + + public void Pan(Vector2 delta) + { + panOffset += delta * ZoomScale * panSpeed; + } + + public void Zoom(float zoomDirection) + { + float scale = (zoomDirection < 0f) ? (1f - zoomDelta) : (1f + zoomDelta); + + _zoom *= scale; + + float cap = Mathf.Clamp(_zoom.x, minZoom, maxZoom); + _zoom.Set(cap, cap); + } + + public float ZoomScale + { + get { return _zoom.x; } + set + { + float z = Mathf.Clamp(value, minZoom, maxZoom); + _zoom.Set(z, z); + } + } + + /// <summary> + /// Convertes the screen position to graph space. + /// </summary> + public Vector2 ScreenToGraphSpace(Vector2 screenPos) + { + var graphRect = _window.Size; + var center = graphRect.size / 2f; + return (screenPos - center) * ZoomScale - panOffset; + } + + /// <summary> + /// Returns the mouse position in graph space. + /// </summary> + /// <returns></returns> + public Vector2 MousePosition() + { + return ScreenToGraphSpace(Event.current.mousePosition); + } + + /// <summary> + /// Tests if the rect is under the mouse. + /// </summary> + /// <param name="r"></param> + /// <returns></returns> + public bool IsUnderMouse(Rect r) + { + return r.Contains(MousePosition()); + } + + /// <summary> + /// Converts the graph position to screen space. + /// This only works for geometry inside the GUIScaleUtility.BeginScale() + /// </summary> + /// <param name="graphPos"></param> + /// <returns></returns> + public Vector2 GraphToScreenSpace(Vector2 graphPos) + { + return graphPos + _zoomAdjustment + panOffset; + } + + /// <summary> + /// Converts the graph position to screen space. + /// This only works for geometry inside the GUIScaleUtility.BeginScale(). + /// </summary> + /// <param name="graphPos"></param> + public void graphToScreenSpace(ref Vector2 graphPos) + { + graphPos += _zoomAdjustment + panOffset; + } + + /// <summary> + /// Converts the graph position to screen space. + /// This works for geometry NOT inside the GUIScaleUtility.BeginScale(). + /// </summary> + /// <param name="graphPos"></param> + public void graphToScreenSpaceZoomAdj(ref Vector2 graphPos) + { + graphPos = GraphToScreenSpace(graphPos) / ZoomScale; + } + + /// <summary> + /// Executes the callback on the first node that is detected under the mouse. + /// </summary> + /// <param name="callback"></param> + public bool OnMouseOverNode(Action<Node> callback) + { + if (!graph) { + return false; + } + + for (int i = graph.nodes.Count - 1; i >= 0; --i) { + + Node node = graph.nodes[i]; + + if (IsUnderMouse(node.bodyRect)) { + callback(node); + return true; + } + } + + // No node under mouse. + return false; + } + + /// <summary> + /// Tests if the mouse is over an output. + /// </summary> + /// <param name="callback"></param> + /// <returns></returns> + public bool OnMouseOverOutput(Action<NodeOutput> callback) + { + if (!graph) { + return false; + } + + foreach (var node in graph.nodes) { + + foreach (var output in node.Outputs) { + + if (IsUnderMouse(output.bodyRect)) { + callback(output); + return true; + } + } + } + + return false; + } + + /// <summary> + /// Tests if the mouse is over an input. + /// </summary> + /// <param name="callback"></param> + /// <returns></returns> + public bool OnMouseOverInput(Action<NodeInput> callback) + { + if (!graph) { + return false; + } + + foreach (var node in graph.nodes) { + + foreach (var input in node.Inputs) { + + if (IsUnderMouse(input.bodyRect)) { + callback(input); + return true; + } + } + } + + return false; + } + + /// <summary> + /// Tests if the mouse is over the node or the input. + /// </summary> + /// <param name="callback"></param> + /// <returns></returns> + public bool OnMouseOverNode_OrInput(Action<Node> callback) + { + if (!graph) { + return false; + } + + foreach (var node in graph.nodes) { + + if (IsUnderMouse(node.bodyRect)) { + callback(node); + return true; + } + + // Check inputs + else { + + foreach (var input in node.Inputs) { + if (IsUnderMouse(input.bodyRect)) { + callback(node); + return true; + } + } + } + } + + // No node under mouse. + return false; + } + + #endregion + + #region Styles + + private GUIStyle _backgroundStyle; + private GUIStyle backgroundStyle + { + get + { + if (_backgroundStyle == null) { + _backgroundStyle = new GUIStyle(GUI.skin.box); + _backgroundStyle.normal.background = _backTex; + } + + return _backgroundStyle; + } + } + + + private static Rect _modeStatusRect = new Rect(20f, 20f, 250f, 150f); + private static GUIStyle _modeStatusStyle; + private static GUIStyle ModeStatusStyle + { + get + { + if (_modeStatusStyle == null) { + _modeStatusStyle = new GUIStyle(); + _modeStatusStyle.fontSize = 36; + _modeStatusStyle.fontStyle = FontStyle.Bold; + _modeStatusStyle.normal.textColor = new Color(1f, 1f, 1f, 0.2f); + } + + return _modeStatusStyle; + } + } + + #endregion + } +} diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs.meta new file mode 100644 index 00000000..15c06c0c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a13b690ab7a11cb4cb37718591f0f20a +timeCreated: 1501781542 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs new file mode 100644 index 00000000..e6407f19 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs @@ -0,0 +1,320 @@ + +using System.IO; +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; + +using NodeEditorFramework.Utilities; +using UNEB.Utility; + +namespace UNEB +{ + public class NodeEditorWindow : EditorWindow + { + [MenuItem("Window/Node Editor")] + static void Init() + { + var w = EditorWindow.CreateInstance<NodeEditorWindow>(); + w.titleContent = new GUIContent("Node Editor"); + w.Show(); + } + + public const float kToolbarHeight = 20f; + public const float kToolbarButtonWidth = 50f; + + [SerializeField] + public NodeGraph graph; + + public NodeEditor editor; + public ActionManager actions; + public ActionTriggerSystem triggers; + public NodeEditorState state; + private SaveManager _saveManager; + + public enum Mode { Edit, View }; + private Mode _mode = Mode.Edit; + + void OnEnable() + { + GUIScaleUtility.CheckInit(); + TextureLib.LoadStandardTextures(); + + actions = new ActionManager(this); + editor = new NodeEditor(this); + triggers = new ActionTriggerSystem(actions); + state = new NodeEditorState(); + + _saveManager = new SaveManager(this); + + editor.graph = graph; + + // Make sure that changes from the undo system are immediately + // updated in the window. If not, the undo changes will be + // visually delayed. + actions.OnUndo += Repaint; + actions.OnRedo += Repaint; + + // Always start in edit mode. + // The only way it can be in view mode is if the window is + // already opened and the user selects a some graph. + _mode = Mode.Edit; + + editor.HomeView(); + } + + void OnDisable() + { + _saveManager.Cleanup(); + } + + void OnDestroy() + { + cleanup(); + } + + void OnGUI() + { + // Asset removed. + if (!graph && !_saveManager.IsInNographState()) { + _saveManager.InitState(); + } + + editor.Draw(); + drawToolbar(); + + // This must go after draw calls or there can be + // GUI layout errors. + triggers.Update(); + } + + public void SetGraph(NodeGraph g, Mode mode = Mode.Edit) + { + graph = g; + editor.graph = g; + + // Reset Undo and Redo buffers. + actions.Reset(); + + _mode = mode; + } + + private void cleanup() + { + if (actions != null) { + actions.OnUndo -= Repaint; + actions.OnRedo -= Repaint; + } + + actions.Reset(); + _saveManager.Cleanup(); + } + + private void drawToolbar() + { + EditorGUILayout.BeginHorizontal("Toolbar"); + + if (DropdownButton("File", kToolbarButtonWidth)) { + createFileMenu(); + } + + if (DropdownButton("Edit", kToolbarButtonWidth)) { + createEditMenu(); + } + + if (DropdownButton("View", kToolbarButtonWidth)) { + createViewMenu(); + } + + if (DropdownButton("Settings", kToolbarButtonWidth + 10f)) { + createSettingsMenu(); + } + + if (DropdownButton("Tools", kToolbarButtonWidth)) { + createToolsMenu(); + } + + // Make the toolbar extend all throughout the window extension. + GUILayout.FlexibleSpace(); + drawGraphName(); + + EditorGUILayout.EndHorizontal(); + } + + private void drawGraphName() + { + string graphName = "None"; + if (graph != null) { + graphName = graph.name; + } + + GUILayout.Label(graphName); + } + + private void createFileMenu() + { + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Create New"), false, _saveManager.RequestNew); + menu.AddItem(new GUIContent("Load"), false, _saveManager.RequestLoad); + + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Save"), false, _saveManager.RequestSave); + menu.AddItem(new GUIContent("Save As"), false, _saveManager.RequestSaveAs); + + menu.DropDown(new Rect(5f, kToolbarHeight, 0f, 0f)); + } + + private void createEditMenu() + { + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Undo"), false, actions.UndoAction); + menu.AddItem(new GUIContent("Redo"), false, actions.RedoAction); + + menu.DropDown(new Rect(55f, kToolbarHeight, 0f, 0f)); + } + + private void createViewMenu() + { + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Home"), false, editor.HomeView); + menu.AddItem(new GUIContent("Zoom In"), false, () => { editor.Zoom(-1); }); + menu.AddItem(new GUIContent("Zoom Out"), false, () => { editor.Zoom(1); }); + + menu.DropDown(new Rect(105f, kToolbarHeight, 0f, 0f)); + } + + private void createSettingsMenu() + { + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Show Guide"), editor.bDrawGuide, editor.ToggleDrawGuide); + + menu.DropDown(new Rect(155f, kToolbarHeight, 0f, 0f)); + } + + private void createToolsMenu() + { + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Add Test Nodes"), false, addTestNodes); + menu.AddItem(new GUIContent("Clear Nodes"), false, clearNodes); + + menu.DropDown(new Rect(215f, kToolbarHeight, 0f, 0f)); + } + + public bool DropdownButton(string name, float width) + { + return GUILayout.Button(name, EditorStyles.toolbarDropDown, GUILayout.Width(width)); + } + + private void addTestNodes() + { + if (graph) { + + for (int x = 0; x < 10; x++) { + for (int y = 0; y < 10; y++) { + + var node = SaveManager.CreateNode<BasicNode>(graph); + + float xpos = x * Node.kDefaultSize.x * 1.5f; + float ypos = y * Node.kDefaultSize.y * 1.5f; + node.bodyRect.position = new Vector2(xpos, ypos); + } + } + } + } + + private void clearNodes() + { + if (graph) { + + foreach (var node in graph.nodes) { + ScriptableObject.DestroyImmediate(node, true); + } + + actions.Reset(); + graph.nodes.Clear(); + } + } + + /// <summary> + /// The size of the window. + /// </summary> + public Rect Size + { + get { return new Rect(Vector2.zero, position.size); } + } + + /// <summary> + /// The rect used to filter input. + /// This is so the toolbar is not ignored by editor inputs. + /// </summary> + public Rect InputRect + { + get + { + var rect = Size; + + rect.y += kToolbarHeight; + rect.height -= kToolbarHeight; + + return rect; + } + } + + public Mode GetMode() + { + return _mode; + } + + /// <summary> + /// Opens up the node editor window from asset selection. + /// </summary> + /// <param name="instanceID"></param> + /// <param name="line"></param> + /// <returns></returns> + [OnOpenAsset(1)] + private static bool OpenGraphAsset(int instanceID, int line) + { + var graphSelected = EditorUtility.InstanceIDToObject(instanceID) as NodeGraph; + + if (graphSelected != null) { + + NodeEditorWindow windowToUse = null; + + // Try to find an editor window without a graph... + var windows = Resources.FindObjectsOfTypeAll<NodeEditorWindow>(); + foreach (var w in windows) { + + // The canvas is already opened + if (w.graph == graphSelected) { + return false; + } + + // Found a window with no active canvas. + if (w.graph == null) { + windowToUse = w; + break; + } + } + + // No windows available...just make a new one. + if (!windowToUse) { + windowToUse = EditorWindow.CreateInstance<NodeEditorWindow>(); + windowToUse.titleContent = new GUIContent("Node Editor"); + windowToUse.Show(); + } + + windowToUse.SetGraph(graphSelected); + windowToUse._saveManager.InitState(); + windowToUse.Repaint(); + + return true; + } + + return false; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs.meta new file mode 100644 index 00000000..84abdc2e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/NodeEditorWindow.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e9e0c3fd288222b4ea49d6b9eb70ccaa +timeCreated: 1501781512 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs b/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs new file mode 100644 index 00000000..c9825ae0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs @@ -0,0 +1,473 @@ + +using System; +using System.IO; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; + +using Bonsai.Utility; + +namespace UNEB +{ + /// <summary> + /// Handles the saving and loading of tree assets. + /// </summary> + public class SaveManager + { + public enum SaveState { NoGraph, TempGraph, SavedGraph }; + + // The FSM used to structure the logic control of saving and loading. + private StateMachine<SaveState> _saveFSM; + + // The events that dictate the flow of the manager's FSM. + private enum SaveOp { None, New, Load, Save, SaveAs }; + private SaveOp _saveOp = SaveOp.None; + + private NodeEditorWindow _window; + + private const string kRootUNEB = "UNEB"; + + // Path that stores temporary graphs. + private const string kTempGraphDirectory = "TempGraphsUNEB"; + private const string kTempFileName = "TempNodeGraphUNEB"; + + public SaveManager(NodeEditorWindow w) + { + _window = w; + + _saveFSM = new StateMachine<SaveState>(); + + var noGraph = new StateMachine<SaveState>.State(SaveState.NoGraph); + var tempGraph = new StateMachine<SaveState>.State(SaveState.TempGraph); + var savedGraph = new StateMachine<SaveState>.State(SaveState.SavedGraph); + + _saveFSM.AddState(noGraph); + _saveFSM.AddState(tempGraph); + _saveFSM.AddState(savedGraph); + + // Actions to take when starting out on a window with no graph. + _saveFSM.AddTransition(noGraph, tempGraph, isNewRequested, createNewOnto_Window_WithTempOrEmpty); + _saveFSM.AddTransition(noGraph, savedGraph, isLoadRequested, loadOnto_EmptyWindow); + + // Actions to take when the window has a temp graph. + _saveFSM.AddTransition(tempGraph, tempGraph, isNewRequested, createNewOnto_Window_WithTempOrEmpty); + _saveFSM.AddTransition(tempGraph, savedGraph, isSaveOrSaveAsRequested, saveTempAs); + _saveFSM.AddTransition(tempGraph, savedGraph, isLoadRequested, loadOnto_Window_WithTempgraph); + + // Actions to take when the window has a valid graph (already saved). + _saveFSM.AddTransition(savedGraph, savedGraph, isSaveRequested, save); + _saveFSM.AddTransition(savedGraph, savedGraph, isSaveAsRequested, saveCloneAs); + _saveFSM.AddTransition(savedGraph, savedGraph, isLoadRequested, loadOnto_Window_WithSavedgraph); + _saveFSM.AddTransition(savedGraph, tempGraph, isNewRequested, createNewOnto_Window_WithSavedgraph); + + // Consume the save operation even after the transition is made. + _saveFSM.OnStateChangedEvent += () => { _saveOp = SaveOp.None; }; + + InitState(); + + NodeConnection.OnConnectionCreated -= saveConnection; + NodeConnection.OnConnectionCreated += saveConnection; + } + + /// <summary> + /// This hanldes setting up the proper state based on the window's graph. + /// </summary> + internal void InitState() + { + // If the window has a valid graph and editable. + if (_window.graph != null && _window.GetMode() == NodeEditorWindow.Mode.Edit) { + + string path = getCurrentGraphPath(); + + // If the graph is temp. + if (path.Contains(kTempGraphDirectory)) { + SetState(SaveState.TempGraph); + } + + // If the graph is saved (not a temp). + else { + SetState(SaveState.SavedGraph); + } + } + + // Window is fresh, no graph yet set. + else { + SetState(SaveState.NoGraph); + } + } + + /// <summary> + /// Get the path from open file dialog. + /// </summary> + /// <returns></returns> + private string getGraphFilePath() + { + string path = EditorUtility.OpenFilePanel("Open Node Graph", "Assets/", "asset"); + + // If the path is outside the project's asset folder. + if (!path.Contains(Application.dataPath)) { + + // If the selection was not cancelled... + if (!string.IsNullOrEmpty(path)) { + _window.ShowNotification(new GUIContent("Please select a Graph asset within the project's Asset folder.")); + return null; + } + } + + return path; + } + + /// <summary> + /// Assumes that the path is already valid. + /// </summary> + /// <param name="path"></param> + private void loadGraph(string path) + { + int assetIndex = path.IndexOf("/Assets/"); + path = path.Substring(assetIndex + 1); + + var graph = AssetDatabase.LoadAssetAtPath<NodeGraph>(path); + _window.SetGraph(graph); + } + + /// <summary> + /// Gets the file path to save the canavs at. + /// </summary> + /// <returns></returns> + private string getSaveFilePath() + { + string path = EditorUtility.SaveFilePanelInProject("Save Node Graph", "NewNodeGraph", "asset", "Select a destination to save the graph."); + + if (string.IsNullOrEmpty(path)) { + return ""; + } + + return path; + } + + #region Save Operations + + /// <summary> + /// Creates and adds a node to the graph. + /// </summary> + /// <param name="t"></param> + /// <param name="bt"></param> + /// <returns></returns> + public static Node CreateNode(Type t, NodeGraph g) + { + try { + + var node = ScriptableObject.CreateInstance(t) as Node; + AssetDatabase.AddObjectToAsset(node, g); + + // Optional, set reference to graph: node.graph = g + + node.Init(); + g.Add(node); + return node; + } + + catch (Exception e) { + throw new UnityException(e.Message); + } + } + + /// <summary> + /// Creates and adds a node to the graph. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="bt"></param> + /// <returns></returns> + public static Node CreateNode<T>(NodeGraph g) where T : Node + { + var node = ScriptableObject.CreateInstance<T>(); + AssetDatabase.AddObjectToAsset(node, g); + + // Optional, set reference to graph: node.graph = g + + node.Init(); + g.Add(node); + return node; + } + + /// <summary> + /// Creates a graph asset and saves it. + /// </summary> + /// <param name="path">The full path including name and extension.</param> + /// <returns></returns> + public static NodeGraph CreateNodeGraph(string path) + { + // We create a graph asset in the data base in order to add node assets + // under the graph. This way things are organized in the editor. + // + // The drawback is that we need to create a temp asset for the tree + // and make sure it does not linger if the temp asset is discarded. + // + // This means that we need to have a persistent directoy to store temp + // assets. + + var graph = ScriptableObject.CreateInstance<NodeGraph>(); + + AssetDatabase.CreateAsset(graph, path); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + return graph; + } + + /// <summary> + /// Creates a new temporary node graph. + /// </summary> + /// <returns></returns> + private NodeGraph createNew() + { + string tempPath = getTempFilePath(); + + if (!string.IsNullOrEmpty(tempPath)) { + + _window.ShowNotification(new GUIContent("New Graph Created")); + return CreateNodeGraph(tempPath); + } + + return null; + } + + // Create a new temp graph on an empty window or with a temp graph. + private bool createNewOnto_Window_WithTempOrEmpty() + { + _window.SetGraph(createNew()); + return true; + } + + // Saves the current active graph then loads a new graph. + private bool createNewOnto_Window_WithSavedgraph() + { + // Save the old graph to avoid loss. + AssetDatabase.SaveAssets(); + + _window.SetGraph(createNew()); + + return true; + } + + // Load a graph to a window that has no graph active. + private bool loadOnto_EmptyWindow() + { + loadGraph(getGraphFilePath()); + return true; + } + + // Load a graph to a window that has a temp graph active. + private bool loadOnto_Window_WithTempgraph() + { + string path = getGraphFilePath(); + + if (!string.IsNullOrEmpty(path)) { + + // Get rid of the temporary graph. + AssetDatabase.DeleteAsset(getCurrentGraphPath()); + loadGraph(path); + return true; + } + + return false; + } + + // Load a graph to a window that has a saved graph active. + private bool loadOnto_Window_WithSavedgraph() + { + string path = getGraphFilePath(); + + if (!string.IsNullOrEmpty(path)) { + + // Save the old graph. + save(); + loadGraph(path); + return true; + } + + return false; + } + + // Makes the temporary graph into a saved graph. + private bool saveTempAs() + { + string newPath = getSaveFilePath(); + string currentPath = getCurrentGraphPath(); + + //If asset exists on path, delete it first. + if (AssetDatabase.LoadAssetAtPath<ScriptableObject>(newPath) != null) { + AssetDatabase.DeleteAsset(newPath); + } + + string result = AssetDatabase.ValidateMoveAsset(currentPath, newPath); + + if (result.Length == 0) { + AssetDatabase.MoveAsset(currentPath, newPath); + save(); + return true; + } + + else { + Debug.LogError(result); + return false; + } + } + + // Copies the current active graph to a new location. + private bool saveCloneAs() + { + string newPath = getSaveFilePath(); + + if (!string.IsNullOrEmpty(newPath)) { + + string currentPath = getCurrentGraphPath(); + + AssetDatabase.CopyAsset(currentPath, newPath); + AssetDatabase.SetMainObject(_window.graph, currentPath); + + save(); + return true; + } + + return false; + } + + // Saves the current graph (not a temp graph). + private bool save() + { + _window.graph.OnSave(); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + _window.ShowNotification(new GUIContent("Graph Saved")); + return true; + } + + // Helper method for the NodeConnection.OnConnectionCreated callback. + private void saveConnection(NodeConnection conn) + { + if (!AssetDatabase.Contains(conn)) { + AssetDatabase.AddObjectToAsset(conn, _window.graph); + } + } + + #endregion + + /// <summary> + /// Handles deleting temporary graph or saving valid graph. + /// </summary> + internal void Cleanup() + { + // Only save/delete things if we are in edit mode. + if (_window.GetMode() != NodeEditorWindow.Mode.Edit) { + return; + } + + SaveState state = _saveFSM.CurrentState.Value; + + if (state == SaveState.TempGraph) { + AssetDatabase.DeleteAsset(getCurrentGraphPath()); + } + + else if (state == SaveState.SavedGraph) { + save(); + } + } + + /* + * These are conditions used the save FSM to know when to transition. + * */ + private bool isNewRequested() { return _saveOp == SaveOp.New; } + private bool isLoadRequested() { return _saveOp == SaveOp.Load; } + private bool isSaveRequested() { return _saveOp == SaveOp.Save; } + private bool isSaveAsRequested() { return _saveOp == SaveOp.SaveAs; } + private bool isSaveOrSaveAsRequested() { return isSaveAsRequested() || isSaveRequested(); } + + /* + * These are the events that drive the save manager. + * Whenever one of this is fired, the save operation is set + * and the save FSM updated. + * */ + internal void RequestNew() { _saveOp = SaveOp.New; _saveFSM.Update(); } + internal void RequestLoad() { _saveOp = SaveOp.Load; _saveFSM.Update(); } + internal void RequestSave() { _saveOp = SaveOp.Save; _saveFSM.Update(); } + internal void RequestSaveAs() { _saveOp = SaveOp.SaveAs; _saveFSM.Update(); } + + private string getTempFilePath() + { + string tempRoot = getTempDirPath(); + + if (string.IsNullOrEmpty(tempRoot)) { + return ""; + } + + string filename = kTempFileName + _window.GetInstanceID().ToString().Ext("asset"); + return tempRoot.Dir(filename); + } + + internal void SetState(SaveState state) + { + _saveFSM.SetCurrentState(state); + } + + internal bool IsInNographState() + { + return _saveFSM.CurrentState.Value == SaveState.NoGraph; + } + + internal SaveState CurrentState() + { + return _saveFSM.CurrentState.Value; + } + + private string getCurrentGraphPath() + { + return AssetDatabase.GetAssetPath(_window.graph); + } + + private string getTempDirPath() + { + string[] dirs = Directory.GetDirectories(Application.dataPath, kTempGraphDirectory, SearchOption.AllDirectories); + + // Return first occurance containing targetFolderName. + if (dirs.Length != 0) { + return getTempPathRelativeToAssets(dirs[0]); + } + + // Could not find anything. Make the folder + string rootPath = getPathToRootUNEB(); + + if (!string.IsNullOrEmpty(rootPath)) { + var dirInfo = Directory.CreateDirectory(rootPath.Dir(kTempGraphDirectory)); + return getTempPathRelativeToAssets(dirInfo.FullName); + } + + else { + return ""; + } + } + + private static string getPathToRootUNEB() + { + // Find the UNEB project root directory within the Unity project. + var dirs = Directory.GetDirectories(Application.dataPath, kRootUNEB, SearchOption.AllDirectories); + + if (dirs.Length != 0) { + return dirs[0]; + } + else { + Debug.LogError("Could not find project root: /" + kRootUNEB + '/'); + return ""; + } + } + + // Assumes that the fullTempPath is valid. + private static string getTempPathRelativeToAssets(string fullTempPath) + { + int index = fullTempPath.IndexOf("Assets"); + return fullTempPath.Substring(index); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs.meta new file mode 100644 index 00000000..48c5f044 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Editor/SaveManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2c1fb70b507fdef4e947a73357d0d811 +timeCreated: 1503072834 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs b/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs new file mode 100644 index 00000000..eb795dfc --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs @@ -0,0 +1,12 @@ + +namespace UNEB +{ + /// <summary> + /// Uni-directional graph traversal. + /// Does not support cycles. + /// </summary> + public class FlowTraversal + { + + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs.meta new file mode 100644 index 00000000..69e5ca25 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/FlowTraversal.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d88ae7fbcd48f58469e623dac843578b +timeCreated: 1503204799 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Node.cs b/Other/NodeEditorExamples/Assets/UNEB/Node.cs new file mode 100644 index 00000000..a00ac329 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Node.cs @@ -0,0 +1,305 @@ + +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using UNEB.Utility; + +namespace UNEB +{ + /// <summary> + /// The visual representation of a logic unit such as an object or function. + /// </summary> + public abstract class Node : ScriptableObject + { + public static readonly Vector2 kDefaultSize = new Vector2(140f, 110f); + + /// <summary> + /// The space reserved between knobs. + /// </summary> + public const float kKnobOffset = 4f; + + /// <summary> + /// The space reserved for the header (title) of the node. + /// </summary> + public const float kHeaderHeight = 15f; + + /// <summary> + /// The max label width for a field in the body. + /// </summary> + public const float kBodyLabelWidth = 100f; + + /// <summary> + /// The rect of the node in canvas space. + /// </summary> + [HideInInspector] + public Rect bodyRect; + + /// <summary> + /// How much additional offset to apply when resizing. + /// </summary> + public const float resizePaddingX = 20f; + + [SerializeField, HideInInspector] + private List<NodeOutput> _outputs = new List<NodeOutput>(); + + [SerializeField, HideInInspector] + private List<NodeInput> _inputs = new List<NodeInput>(); + + // Hides the node asset. + // Sets up the name via type information. + void OnEnable() + { + hideFlags = HideFlags.HideInHierarchy; + name = GetType().Name; + +#if UNITY_EDITOR + name = ObjectNames.NicifyVariableName(name); +#endif + + } + + /// <summary> + /// Always call the base OnDisable() to cleanup the connection objects. + /// </summary> + protected virtual void OnDestroy() + { + _inputs.RemoveAll( + (input) => + { + ScriptableObject.DestroyImmediate(input, true); + return true; + }); + + _outputs.RemoveAll( + (output) => + { + ScriptableObject.DestroyImmediate(output, true); + return true; + }); + } + + /// <summary> + /// Use this for initialization. + /// </summary> + public virtual void Init() { + bodyRect.size = kDefaultSize; + } + + public virtual void OnNodeGUI() + { + OnNodeHeaderGUI(); + OnConnectionsGUI(); + onBodyGuiInternal(); + } + + /// <summary> + /// Renders the node connections. By default, after the header. + /// </summary> + public virtual void OnConnectionsGUI() + { + int inputCount = _inputs.Count; + int outputCount = _outputs.Count; + + int maxCount = (int)Mathf.Max(inputCount, outputCount); + + // The entire knob section is stacked rows of inputs and outputs. + for (int i = 0; i < maxCount; ++i) { + + GUILayout.BeginHorizontal(); + + // Render the knob layout horizontally. + if (i < inputCount) _inputs[i].OnConnectionGUI(i); + if (i < outputCount) _outputs[i].OnConnectionGUI(i); + + GUILayout.EndHorizontal(); + } + } + + /// <summary> + /// Render the title/header of the node. By default, renders on top of the node. + /// </summary> + public virtual void OnNodeHeaderGUI() + { + // Draw header + GUILayout.Box(name, HeaderStyle); + } + + /// <summary> + /// Draws the body of the node. By default, after the connections. + /// </summary> + public virtual void OnBodyGUI() { } + + // Handles the coloring and layout of the body. + // This is for convenience so the user does not need to worry about this boiler plate code. + protected virtual void onBodyGuiInternal() + { + float oldLabelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = kBodyLabelWidth; + + // Cache the old label style. + // Do this first before changing the EditorStyles.label style. + // So the original values are kept. + var oldLabelStyle = UnityLabelStyle; + + // Setup new values for the label style. + EditorStyles.label.normal = DefaultStyle.normal; + EditorStyles.label.active = DefaultStyle.active; + EditorStyles.label.focused = DefaultStyle.focused; + + EditorGUILayout.BeginVertical(); + + GUILayout.Space(kKnobOffset); + OnBodyGUI(); + + // Revert back to old label style. + EditorStyles.label.normal = oldLabelStyle.normal; + EditorStyles.label.active = oldLabelStyle.active; + EditorStyles.label.focused = oldLabelStyle.focused; + + EditorGUIUtility.labelWidth = oldLabelWidth; + EditorGUILayout.EndVertical(); + } + + public NodeInput AddInput(string name = "input", bool multipleConnections = false) + { + var input = NodeInput.Create(this, multipleConnections); + input.name = name; + _inputs.Add(input); + + return input; + } + + public NodeOutput AddOutput(string name = "output", bool multipleConnections = false) + { + var output = NodeOutput.Create(this, multipleConnections); + output.name = name; + _outputs.Add(output); + + return output; + } + + /// <summary> + /// Called when the output knob had an input connection removed. + /// </summary> + /// <param name="removedInput"></param> + public virtual void OnInputConnectionRemoved(NodeInput removedInput) { } + + /// <summary> + /// Called when the output knob made a connection to an input knob. + /// </summary> + /// <param name="addedInput"></param> + public virtual void OnNewInputConnection(NodeInput addedInput) { } + + public IEnumerable<NodeOutput> Outputs + { + get { return _outputs; } + } + + public IEnumerable<NodeInput> Inputs + { + get { return _inputs; } + } + + public int InputCount + { + get { return _inputs.Count; } + } + + public int OutputCount + { + get { return _outputs.Count; } + } + + public NodeInput GetInput(int index) + { + return _inputs[index]; + } + + public NodeOutput GetOutput(int index) + { + return _outputs[index]; + } + + /// <summary> + /// Get the Y value of the top header. + /// </summary> + public float HeaderTop + { + get { return bodyRect.yMin + kHeaderHeight; } + } + + /// <summary> + /// Resize the node to fit the knobs. + /// </summary> + public void FitKnobs() + { + int maxCount = (int)Mathf.Max(_inputs.Count, _outputs.Count); + + float totalKnobsHeight = maxCount * NodeConnection.kMinSize.y; + float totalOffsetHeight = (maxCount - 1) * kKnobOffset; + + float heightRequired = totalKnobsHeight + totalOffsetHeight + kHeaderHeight; + + // Add some extra height at the end. + bodyRect.height = heightRequired + kHeaderHeight / 2f; + } + + #region Styles and Contents + + private static GUIStyle _unityLabelStyle; + + /// <summary> + /// Caches the default EditorStyle. + /// There is a strange bug with it being overriden when opening an Animation window. + /// </summary> + public static GUIStyle UnityLabelStyle + { + get + { + if (_unityLabelStyle == null) { + _unityLabelStyle = new GUIStyle(EditorStyles.label); + } + + return _unityLabelStyle; + } + } + + private static GUIStyle _defStyle; + public static GUIStyle DefaultStyle + { + get + { + if (_defStyle == null) { + _defStyle = new GUIStyle(EditorStyles.label); + _defStyle.normal.textColor = Color.white * 0.9f; + _defStyle.active.textColor = ColorExtensions.From255(126, 186, 255) * 0.9f; + _defStyle.focused.textColor = ColorExtensions.From255(126, 186, 255); + } + + return _defStyle; + } + } + + private static GUIStyle _headerStyle; + public GUIStyle HeaderStyle + { + get + { + if (_headerStyle == null) { + + _headerStyle = new GUIStyle(); + + _headerStyle.stretchWidth = true; + _headerStyle.alignment = TextAnchor.MiddleLeft; + _headerStyle.padding.left = 5; + _headerStyle.normal.textColor = Color.white * 0.9f; + _headerStyle.fixedHeight = kHeaderHeight; + } + + return _headerStyle; + } + } + + #endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Node.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Node.cs.meta new file mode 100644 index 00000000..19287a49 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Node.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7701d85b0845e514cbf1da5e92a37927 +timeCreated: 1501781551 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs b/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs new file mode 100644 index 00000000..40f4d6de --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs @@ -0,0 +1,91 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public abstract class NodeConnection : ScriptableObject + { + public static readonly Vector2 kMinSize = new Vector2(12f, 12f); + public static readonly Vector2 kMinHalfSize = kMinSize / 2f; + + [HideInInspector] + public Rect bodyRect = new Rect(Vector2.zero, kMinSize); + + public System.Func<object> getValue; + + public static System.Action<NodeConnection> OnConnectionCreated; + + [SerializeField, HideInInspector] + protected Node parentNode; + + void OnEnable() + { + hideFlags = HideFlags.HideInHierarchy; + } + + public virtual void Init(Node parent) + { + name = "connection"; + parentNode = parent; + } + + /// <summary> + /// The node associated with this knob. + /// </summary> + public Node ParentNode + { + get { return parentNode; } + } + + public abstract GUIStyle GetStyle(); + + public virtual void OnConnectionGUI(int order) + { + OnNameGUI(); + + // Position the knobs properly for the draw pass of the knobs in the editor. + float yPos = parentNode.HeaderTop + order * GetStyle().fixedHeight + Node.kKnobOffset; + bodyRect.center = new Vector2(GetNodeAnchor(), 0f); + bodyRect.y = yPos; + } + + public virtual void OnNameGUI() + { + GUILayout.Label(Content, GetStyle()); + } + + private GUIContent _content; + private GUIContent Content + { + get + { + if (_content == null) { + _content = new GUIContent(name); + } + + return _content; + } + } + + /// <summary> + /// What side of the node should the knob anchor to. + /// </summary> + /// <returns></returns> + public abstract float GetNodeAnchor(); + + /// <summary> + /// Attempts to get the value of the specified type. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public T GetValue<T>() + { + if (getValue != null) { + return (T)getValue(); + } + + return default(T); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs.meta new file mode 100644 index 00000000..1f8e4fa4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeConnection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4a46115d42daa3e438d70eca59efba6b +timeCreated: 1501804873 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs b/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs new file mode 100644 index 00000000..f11cddc2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs @@ -0,0 +1,18 @@ + +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public class NodeEditorState + { + + public Node selectedNode; + public Vector2 lastClickedPosition; + + public NodeOutput selectedOutput; + public NodeInput selectedInput; + + public System.Type typeToCreate; + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs.meta new file mode 100644 index 00000000..f13de28d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeEditorState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c4faacf28f5e1be4c9d441c74e2c9eda +timeCreated: 1501899343 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs b/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs new file mode 100644 index 00000000..e977e698 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs @@ -0,0 +1,57 @@ + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + /// <summary> + /// Represents a graph of nodes. + /// </summary> + public class NodeGraph : ScriptableObject + { + /// <summary> + /// The types of nodes accepted by the graph. + /// </summary> + public static HashSet<Type> nodeTypes = new HashSet<Type>(); + + [HideInInspector] + public List<Node> nodes = new List<Node>(); + + /// <summary> + /// Add a node to the graph. + /// It is recommended that the save manager adds the nodes. + /// </summary> + /// <param name="n"></param> + public void Add(Node n) + { + nodes.Add(n); + } + + /// <summary> + /// Removes a node from the graph but it is not destroyed. + /// </summary> + /// <param name="node"></param> + public void Remove(Node node) + { + nodes.Remove(node); + } + + /// <summary> + /// Put the node at the end of the node list. + /// </summary> + /// <param name="node"></param> + public void PushToEnd(Node node) + { + if (nodes.Remove(node)) { + nodes.Add(node); + } + } + + /// <summary> + /// Gets called right before the graph is saved. + /// Can be used to setup things before saving like sorting nodes. + /// </summary> + public virtual void OnSave() { } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs.meta new file mode 100644 index 00000000..c2ffc888 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeGraph.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5472e37c6bced914daa030c486155845 +timeCreated: 1501782614 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs b/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs new file mode 100644 index 00000000..fab62c10 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs @@ -0,0 +1,114 @@ + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UNEB +{ + public class NodeInput : NodeConnection + { + [SerializeField] + private bool _bCanHaveMultipleConnections; + + [SerializeField] + private List<NodeOutput> _outputs = new List<NodeOutput>(); + + private GUIStyle _style; + + public virtual void Init(Node parent, bool multipleConnections = true) + { + base.Init(parent); + name = "input"; + _bCanHaveMultipleConnections = multipleConnections; + } + + /// <summary> + /// Should only be called by NodeOutput + /// </summary> + /// <param name="output"></param> + internal void Connect(NodeOutput output) + { + if (!_outputs.Contains(output)) + _outputs.Add(output); + } + + /// <summary> + /// Should only be called by NodeOutput. + /// </summary> + internal void Disconnect(NodeOutput output) + { + if (_outputs.Contains(output)) + _outputs.Remove(output); + } + + public bool HasOutputConnected() + { + return _outputs.Count > 0; + } + + public void RemoveAll() { + // Cache the outputs since in order to disconnect them, + // they must be removed from _outputs List. + var outputs = new List<NodeOutput>(_outputs); + + _outputs.Clear(); + + foreach (NodeOutput output in outputs) { + output.Remove(this); + } + } + + public List<NodeOutput> Outputs + { + get { return _outputs; } + } + + public int OutputCount + { + get { return _outputs.Count; } + } + + public NodeOutput GetOutput(int index) + { + return _outputs[index]; + } + + public override GUIStyle GetStyle() + { + if (_style == null) { + + _style = new GUIStyle(); + + _style.fixedHeight = kMinSize.y + Node.kKnobOffset; + _style.alignment = TextAnchor.MiddleLeft; + _style.normal.textColor = Color.white * 0.9f; + _style.padding.left = (int)kMinHalfSize.x + 5; + } + + return _style; + } + + /// <summary> + /// The input is anchored at the left side of the node. + /// </summary> + /// <returns></returns> + public override float GetNodeAnchor() + { + return parentNode.bodyRect.xMin; + } + + public bool bCanHaveMultipleConnections + { + get { return _bCanHaveMultipleConnections; } + } + + public static NodeInput Create(Node parent, bool multipleConnections = false) + { + var input = ScriptableObject.CreateInstance<NodeInput>(); + input.Init(parent, multipleConnections); + + NodeConnection.OnConnectionCreated(input); + return input; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs.meta new file mode 100644 index 00000000..62740a8d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeInput.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0bace920f087ccf4595fad22948ac526 +timeCreated: 1501804790 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs b/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs new file mode 100644 index 00000000..4a64ec73 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs @@ -0,0 +1,157 @@ + +using System.Linq; +using System.Collections.Generic; +using UnityEngine; + +namespace UNEB +{ + public class NodeOutput : NodeConnection + { + [SerializeField] + private bool _bCanHaveMultipleConnections; + + [SerializeField] + private List<NodeInput> _inputs = new List<NodeInput>(); + + private GUIStyle _style; + + public virtual void Init(Node parent, bool multipleConnections = true) + { + base.Init(parent); + _bCanHaveMultipleConnections = multipleConnections; + } + + public List<NodeInput> Inputs + { + get { return _inputs; } + } + + public int InputCount + { + get { return _inputs.Count; } + } + + public NodeInput GetInput(int index) + { + return _inputs[index]; + } + + /// <summary> + /// Returns true if the connection was added successfully. + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public bool Add(NodeInput input) + { + if (!CanConnectInput(input)) { + return false; + } + + // The input cannot be connected to anything. + // This test is not inside the CanConnectInput() because + // an action can remove the old connections automatically to make it + // easier for the user to change connections between nodes. + if (input.HasOutputConnected() && !input.bCanHaveMultipleConnections) { + + // Changes to the inputs need to be properly handled by the Action system, + // so it works with undo. + Debug.LogWarning("Cannot add an input that is already connected"); + return false; + } + + input.Connect(this); + _inputs.Add(input); + + parentNode.OnNewInputConnection(input); + + return true; + } + + /// <summary> + /// Tests to see if the output can be connected to the input. + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public bool CanConnectInput(NodeInput input) + { + if (input == null) { + Debug.LogError("Attempted to add a null input."); + return false; + } + + // Avoid self-connecting + if (parentNode.Inputs.Contains(input)) { + Debug.LogWarning("Cannot self connect."); + return false; + } + + // Avoid connecting when it is already connected. + if (input.Outputs.Contains(this)) { + Debug.LogWarning("Already Connected"); + return false; + } + + return true; + } + + public void Remove(NodeInput input) + { + if (_inputs.Remove(input)) { + parentNode.OnInputConnectionRemoved(input); + input.Disconnect(this); + } + } + + public void RemoveAll() + { + // Cache the inputs since in order to disconnect them, + // they must be removed from _inputs List. + var inputs = new List<NodeInput>(_inputs); + + _inputs.Clear(); + + foreach (NodeInput input in inputs) { + parentNode.OnInputConnectionRemoved(input); + input.Disconnect(this); + } + } + + public override GUIStyle GetStyle() + { + if (_style == null) { + + _style = new GUIStyle(); + + _style.fixedHeight = kMinSize.y + Node.kKnobOffset; + _style.alignment = TextAnchor.MiddleRight; + _style.normal.textColor = Color.white * 0.9f; + _style.padding.right = (int)kMinHalfSize.x + 5; + } + + return _style; + } + + /// <summary> + /// The output is anchored at the right side of the node. + /// </summary> + /// <returns></returns> + public override float GetNodeAnchor() + { + return parentNode.bodyRect.xMax; + } + + public bool bCanHaveMultipleConnections + { + get { return _bCanHaveMultipleConnections; } + } + + public static NodeOutput Create(Node parent, bool multipleConnections = true) + { + var output = ScriptableObject.CreateInstance<NodeOutput>(); + output.Init(parent, multipleConnections); + + NodeConnection.OnConnectionCreated(output); + return output; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs.meta new file mode 100644 index 00000000..1178dc35 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/NodeOutput.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 505fc75df63b6cd4694c90b7f0428f99 +timeCreated: 1501804800 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Nodes.meta b/Other/NodeEditorExamples/Assets/UNEB/Nodes.meta new file mode 100644 index 00000000..8a294dde --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Nodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e0dd5d51fa34588489d6675851e9486e +folderAsset: yes +timeCreated: 1502911891 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs b/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs new file mode 100644 index 00000000..fd9ea801 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs @@ -0,0 +1,39 @@ + +using UnityEngine; +using UnityEditor; + +namespace UNEB +{ + public class BasicNode : Node + { + private int _someInt = 0; + + public override void Init() + { + base.Init(); + + AddInput("Input"); + AddOutput("Ouput"); + + FitKnobs(); + + // Fit the int field, need to automate this. + bodyRect.height += 20f; + } + + public override void OnBodyGUI() + { + _someInt = EditorGUILayout.IntField("Int Value", _someInt); + } + + public override void OnNewInputConnection(NodeInput addedInput) + { + Debug.Log("Added Input: " + addedInput.name); + } + + public override void OnInputConnectionRemoved(NodeInput removedInput) + { + Debug.Log("Removed Input: " + removedInput.name); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs.meta new file mode 100644 index 00000000..38d9d18c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Nodes/BasicNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b0d0b3390e407b34d9672707671fdf01 +timeCreated: 1502911896 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB.meta b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB.meta new file mode 100644 index 00000000..dd9d21c8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b885bb71b1d0fd34584e1392483dba6d +folderAsset: yes +timeCreated: 1503087061 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset new file mode 100644 index 00000000..f562815f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset @@ -0,0 +1,6515 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5472e37c6bced914daa030c486155845, type: 3} + m_Name: TempNodeGraphUNEB-18000 + m_EditorClassIdentifier: + nodes: + - {fileID: 114649820198714802} + - {fileID: 114318772694394034} + - {fileID: 114247328516611494} + - {fileID: 114188287407102516} + - {fileID: 114488006925090048} + - {fileID: 114668404074355798} + - {fileID: 114372441715335820} + - {fileID: 114544046452556548} + - {fileID: 114318072981352580} + - {fileID: 114995943598026618} + - {fileID: 114372460049263836} + - {fileID: 114595714967894500} + - {fileID: 114809703780796474} + - {fileID: 114924491257293590} + - {fileID: 114298590628864988} + - {fileID: 114214789622764380} + - {fileID: 114094250832233624} + - {fileID: 114484120233952240} + - {fileID: 114372608875964954} + - {fileID: 114549266524813346} + - {fileID: 114724721532079774} + - {fileID: 114258201408638206} + - {fileID: 114416965029609000} + - {fileID: 114279443101610996} + - {fileID: 114535851105013628} + - {fileID: 114331226178011978} + - {fileID: 114978496358228684} + - {fileID: 114157618514019984} + - {fileID: 114127330872578466} + - {fileID: 114537698157735394} + - {fileID: 114592582420987538} + - {fileID: 114826471941662460} + - {fileID: 114495392188715312} + - {fileID: 114779143377165324} + - {fileID: 114508363775481748} + - {fileID: 114748890917427988} + - {fileID: 114212919586348082} + - {fileID: 114060468691274060} + - {fileID: 114586171112551252} + - {fileID: 114123719148343364} + - {fileID: 114343114984546550} + - {fileID: 114104407920392924} + - {fileID: 114627603537053588} + - {fileID: 114102133613934306} + - {fileID: 114032647566845792} + - {fileID: 114558006963751182} + - {fileID: 114735742031852318} + - {fileID: 114791909558126260} + - {fileID: 114753436896775260} + - {fileID: 114185767057852742} + - {fileID: 114342869155660718} + - {fileID: 114463183136394232} + - {fileID: 114291501057425104} + - {fileID: 114794504564065380} + - {fileID: 114105289680323532} + - {fileID: 114235848786241888} + - {fileID: 114216783342308070} + - {fileID: 114385647069057010} + - {fileID: 114155030097666606} + - {fileID: 114906112867144964} + - {fileID: 114582611350948750} + - {fileID: 114195846631795460} + - {fileID: 114970029795268052} + - {fileID: 114816260020250312} + - {fileID: 114899868845616516} + - {fileID: 114461922176674752} + - {fileID: 114851792330118846} + - {fileID: 114867537130609524} + - {fileID: 114729652895838470} + - {fileID: 114903470640933088} + - {fileID: 114492910285958856} + - {fileID: 114587963243139904} + - {fileID: 114220700694228568} + - {fileID: 114730562526222724} + - {fileID: 114964089510329778} + - {fileID: 114407112841337898} + - {fileID: 114580975342486084} + - {fileID: 114844738074964444} + - {fileID: 114693143912305152} + - {fileID: 114286271705629688} + - {fileID: 114709234588755810} + - {fileID: 114601912298373078} + - {fileID: 114169632940801564} + - {fileID: 114576911103601276} + - {fileID: 114638634703980764} + - {fileID: 114426660520134716} + - {fileID: 114312773077251228} + - {fileID: 114503251171754162} + - {fileID: 114035303143955214} + - {fileID: 114719136315363464} + - {fileID: 114055381488272514} + - {fileID: 114519746998358522} + - {fileID: 114222944304035782} + - {fileID: 114578668458250286} + - {fileID: 114442000406844188} + - {fileID: 114952593327603842} + - {fileID: 114786548535745842} + - {fileID: 114595812434298278} + - {fileID: 114677833350987524} + - {fileID: 114754120066644676} +--- !u!114 &114001671155620418 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114729652895838470} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114011123281342946 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114407112841337898} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114021341993425826 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114649820198714802} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114021699380983960 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114222944304035782} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114022396875520970 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114668404074355798} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114026035281217696 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114035303143955214} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114030281820682114 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114576911103601276} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114032647566845792 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114046665484049786} + _inputs: + - {fileID: 114688430239101240} +--- !u!114 &114035303143955214 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114026035281217696} + _inputs: + - {fileID: 114228224168405964} +--- !u!114 &114036256417699856 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114463183136394232} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114045636928124764 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114318772694394034} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114046015062868526 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114638634703980764} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114046665484049786 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114032647566845792} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114049435994216540 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114576911103601276} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114054398101695222 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114216783342308070} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114055381488272514 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114354078374219062} + _inputs: + - {fileID: 114732689614608988} +--- !u!114 &114057440960578784 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114677833350987524} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114058908433932722 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114537698157735394} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114059270142671446 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114214789622764380} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114060468691274060 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114795600385364100} + _inputs: + - {fileID: 114692140502736702} +--- !u!114 &114064592695255072 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114342869155660718} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114067836920298000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114580975342486084} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114069368663378846 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114627603537053588} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114079228532555544 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114719136315363464} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114086803895435852 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114372460049263836} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114091354739448916 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114826471941662460} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114092724552326696 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114279443101610996} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114092793003749472 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114906112867144964} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114094250832233624 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114955182263277056} + _inputs: + - {fileID: 114949153467399768} +--- !u!114 &114102133613934306 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114150513525053244} + _inputs: + - {fileID: 114296000429823454} +--- !u!114 &114104407920392924 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114564631989367198} + _inputs: + - {fileID: 114176198538265880} +--- !u!114 &114105289680323532 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114464153349159156} + _inputs: + - {fileID: 114975688528033068} +--- !u!114 &114120408963611960 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114312773077251228} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114123719148343364 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114330711847355500} + _inputs: + - {fileID: 114303047529592570} +--- !u!114 &114127330872578466 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114615187719956714} + _inputs: + - {fileID: 114513622963664910} +--- !u!114 &114129556680958820 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114724721532079774} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114131937200386948 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114558006963751182} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114138540684449194 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114188287407102516} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114139763991355432 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114791909558126260} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114142066382874350 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114157618514019984} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114144399137022088 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114582611350948750} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114146543418525146 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114906112867144964} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114148187341695068 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114212919586348082} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114148521313434022 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114416965029609000} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114149206805687562 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114844738074964444} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114150513525053244 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114102133613934306} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114154234458328364 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114970029795268052} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114155030097666606 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114811656040908320} + _inputs: + - {fileID: 114694725891797130} +--- !u!114 &114157618514019984 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114142066382874350} + _inputs: + - {fileID: 114337812970617456} +--- !u!114 &114160035018724188 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114343114984546550} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114163812832239278 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114372441715335820} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114167251018549298 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114426660520134716} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114169632940801564 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114998529089306044} + _inputs: + - {fileID: 114686552855947096} +--- !u!114 &114171629767782314 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114582611350948750} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114176198538265880 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114104407920392924} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114176425944178666 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114195846631795460} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114182654162089432 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114952593327603842} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114185767057852742 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114224169038261350} + _inputs: + - {fileID: 114628534875840702} +--- !u!114 &114188287407102516 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114138540684449194} + _inputs: + - {fileID: 114533503901114068} +--- !u!114 &114192113363169920 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114312773077251228} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114195846631795460 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114176425944178666} + _inputs: + - {fileID: 114415755779835962} +--- !u!114 &114198595924211876 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114318072981352580} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114204136897111338 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114298590628864988} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114207513964066840 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114535851105013628} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114207799271921918 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114407112841337898} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114212919586348082 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114673998392407258} + _inputs: + - {fileID: 114148187341695068} +--- !u!114 &114213799034815696 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114503251171754162} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114214789622764380 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114344266174767670} + _inputs: + - {fileID: 114059270142671446} +--- !u!114 &114215758429549356 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114519746998358522} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114216783342308070 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114054398101695222} + _inputs: + - {fileID: 114947244980610300} +--- !u!114 &114217294926676420 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114426660520134716} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114220700694228568 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114866156505868784} + _inputs: + - {fileID: 114758093600472114} +--- !u!114 &114221303362999580 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114508363775481748} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114222944304035782 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114021699380983960} + _inputs: + - {fileID: 114768861245032676} +--- !u!114 &114223578349965356 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114794504564065380} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114224169038261350 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114185767057852742} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114228224168405964 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114035303143955214} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114233473679809758 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114924491257293590} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114233527380986214 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114286271705629688} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114235848786241888 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114766069295182146} + _inputs: + - {fileID: 114323000564522410} +--- !u!114 &114243640797432118 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114495392188715312} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114247328516611494 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114414525360453778} + _inputs: + - {fileID: 114460546136940212} +--- !u!114 &114250615166782950 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114258201408638206} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114255955519873922 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114601912298373078} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114258201408638206 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114681217675056844} + _inputs: + - {fileID: 114250615166782950} +--- !u!114 &114259854081428940 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114343114984546550} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114260543212820992 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114924491257293590} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114265837573135884 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114816260020250312} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114279443101610996 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114092724552326696} + _inputs: + - {fileID: 114806391775952548} +--- !u!114 &114286271705629688 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114413724917062214} + _inputs: + - {fileID: 114233527380986214} +--- !u!114 &114291501057425104 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114972869643474944} + _inputs: + - {fileID: 114642787968873662} +--- !u!114 &114296000429823454 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114102133613934306} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114298590628864988 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114783157596119098} + _inputs: + - {fileID: 114204136897111338} +--- !u!114 &114303047529592570 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114123719148343364} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114308445692205998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114794504564065380} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114312773077251228 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114192113363169920} + _inputs: + - {fileID: 114120408963611960} +--- !u!114 &114318072981352580 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114417450592935928} + _inputs: + - {fileID: 114198595924211876} +--- !u!114 &114318772694394034 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114333723834092882} + _inputs: + - {fileID: 114045636928124764} +--- !u!114 &114323000564522410 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114235848786241888} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114324074816370092 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114488006925090048} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114325389654104252 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114587963243139904} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114330711847355500 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114123719148343364} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114331226178011978 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114792452818695174} + _inputs: + - {fileID: 114623541315529784} +--- !u!114 &114333723834092882 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114318772694394034} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114337812970617456 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114157618514019984} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114342869155660718 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114377133730835656} + _inputs: + - {fileID: 114064592695255072} +--- !u!114 &114343114984546550 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114160035018724188} + _inputs: + - {fileID: 114259854081428940} +--- !u!114 &114344266174767670 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114214789622764380} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114346240878861572 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114786548535745842} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114354078374219062 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114055381488272514} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114363613899660596 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114709234588755810} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114372441715335820 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114417378196762410} + _inputs: + - {fileID: 114163812832239278} +--- !u!114 &114372460049263836 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114642663622843824} + _inputs: + - {fileID: 114086803895435852} +--- !u!114 &114372608875964954 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114874388098277048} + _inputs: + - {fileID: 114870878225041800} +--- !u!114 &114377133730835656 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114342869155660718} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114377759737611548 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114537698157735394} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114378066669872004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114730562526222724} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114378669117163648 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114495392188715312} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114380919628130816 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114592582420987538} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114385647069057010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114655561224605726} + _inputs: + - {fileID: 114732635930678278} +--- !u!114 &114397270286976436 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114719136315363464} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114407112841337898 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114011123281342946} + _inputs: + - {fileID: 114207799271921918} +--- !u!114 &114409187314540462 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114779143377165324} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114413724917062214 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114286271705629688} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114414525360453778 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114247328516611494} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114415755779835962 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114195846631795460} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114416965029609000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114148521313434022} + _inputs: + - {fileID: 114814935640544030} +--- !u!114 &114417378196762410 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114372441715335820} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114417450592935928 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114318072981352580} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114419868793824710 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114867537130609524} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114421761065742202 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114952593327603842} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114422984684629644 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114601912298373078} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114426660520134716 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114217294926676420} + _inputs: + - {fileID: 114167251018549298} +--- !u!114 &114428533554137858 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114592582420987538} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114435575373244152 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114964089510329778} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114442000406844188 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114733855804583510} + _inputs: + - {fileID: 114577975947466440} +--- !u!114 &114442915415878272 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114748890917427988} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114453339144657796 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114735742031852318} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114453818972680006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114724721532079774} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114455813581842644 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114816260020250312} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114460546136940212 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114247328516611494} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114461922176674752 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114844909480189294} + _inputs: + - {fileID: 114520090539263432} +--- !u!114 &114463183136394232 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114743798990957344} + _inputs: + - {fileID: 114036256417699856} +--- !u!114 &114464153349159156 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114105289680323532} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114472743358668682 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114580975342486084} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114481029219770476 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114693143912305152} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114484120233952240 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114493911685783342} + _inputs: + - {fileID: 114759216864638356} +--- !u!114 &114488006925090048 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114324074816370092} + _inputs: + - {fileID: 114734523107015782} +--- !u!114 &114492910285958856 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114541749899237478} + _inputs: + - {fileID: 114568567758687386} +--- !u!114 &114493911685783342 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114484120233952240} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114495392188715312 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114378669117163648} + _inputs: + - {fileID: 114243640797432118} +--- !u!114 &114503251171754162 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114744951861517220} + _inputs: + - {fileID: 114213799034815696} +--- !u!114 &114507278802011122 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114668404074355798} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114508363775481748 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114687940223319342} + _inputs: + - {fileID: 114221303362999580} +--- !u!114 &114513622963664910 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114127330872578466} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114518411516238768 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114595714967894500} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114519746998358522 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114215758429549356} + _inputs: + - {fileID: 114842706196820562} +--- !u!114 &114520090539263432 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114461922176674752} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114526347215813776 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114851792330118846} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114533503901114068 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114188287407102516} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114535851105013628 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114207513964066840} + _inputs: + - {fileID: 114766860237946060} +--- !u!114 &114537698157735394 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114058908433932722} + _inputs: + - {fileID: 114377759737611548} +--- !u!114 &114541749899237478 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114492910285958856} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114544046452556548 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114905837760230530} + _inputs: + - {fileID: 114545309586114844} +--- !u!114 &114545309586114844 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114544046452556548} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114549266524813346 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114580882340762694} + _inputs: + - {fileID: 114930515935297554} +--- !u!114 &114554886157775580 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114730562526222724} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114558006963751182 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114569332090812236} + _inputs: + - {fileID: 114131937200386948} +--- !u!114 &114561025448010958 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114978496358228684} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114562184610295042 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114693143912305152} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114563591049466754 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114899868845616516} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114564508886529610 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114753436896775260} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114564631989367198 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114104407920392924} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114568567758687386 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114492910285958856} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114569332090812236 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114558006963751182} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114576911103601276 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114030281820682114} + _inputs: + - {fileID: 114049435994216540} +--- !u!114 &114577975947466440 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114442000406844188} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114578668458250286 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114741999339535908} + _inputs: + - {fileID: 114889190475240398} +--- !u!114 &114580829955589776 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114595812434298278} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114580882340762694 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114549266524813346} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114580975342486084 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114472743358668682} + _inputs: + - {fileID: 114067836920298000} +--- !u!114 &114582611350948750 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114144399137022088} + _inputs: + - {fileID: 114171629767782314} +--- !u!114 &114586171112551252 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114889917528243060} + _inputs: + - {fileID: 114907626386969702} +--- !u!114 &114587963243139904 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114325389654104252} + _inputs: + - {fileID: 114740462656451092} +--- !u!114 &114589334417388670 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114903470640933088} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114592582420987538 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114380919628130816} + _inputs: + - {fileID: 114428533554137858} +--- !u!114 &114595714967894500 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114656271419409666} + _inputs: + - {fileID: 114518411516238768} +--- !u!114 &114595812434298278 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114580829955589776} + _inputs: + - {fileID: 114812010943235154} +--- !u!114 &114601912298373078 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114422984684629644} + _inputs: + - {fileID: 114255955519873922} +--- !u!114 &114615187719956714 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114127330872578466} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114623541315529784 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114331226178011978} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114627603537053588 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114877567627212650} + _inputs: + - {fileID: 114069368663378846} +--- !u!114 &114628534875840702 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114185767057852742} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114638164312271686 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114754120066644676} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114638634703980764 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114046015062868526} + _inputs: + - {fileID: 114706606264321634} +--- !u!114 &114642663622843824 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114372460049263836} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114642787968873662 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114291501057425104} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114649820198714802 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114021341993425826} + _inputs: + - {fileID: 114784539778093238} +--- !u!114 &114655561224605726 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114385647069057010} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114656271419409666 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114595714967894500} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114668404074355798 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114022396875520970} + _inputs: + - {fileID: 114507278802011122} +--- !u!114 &114672329845936832 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114899868845616516} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114673998392407258 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114212919586348082} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114677833350987524 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114057440960578784} + _inputs: + - {fileID: 114980907721042644} +--- !u!114 &114681217675056844 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114258201408638206} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114686552855947096 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114169632940801564} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114687940223319342 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114508363775481748} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114688430239101240 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114032647566845792} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114692140502736702 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114060468691274060} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114693143912305152 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114562184610295042} + _inputs: + - {fileID: 114481029219770476} +--- !u!114 &114694725891797130 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114155030097666606} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114704744442492192 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114786548535745842} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114706606264321634 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1672.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114638634703980764} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114709234588755810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114806912815789804} + _inputs: + - {fileID: 114363613899660596} +--- !u!114 &114719136315363464 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1680 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114079228532555544} + _inputs: + - {fileID: 114397270286976436} +--- !u!114 &114724721532079774 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 0 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114129556680958820} + _inputs: + - {fileID: 114453818972680006} +--- !u!114 &114729652895838470 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114796118759526962} + _inputs: + - {fileID: 114001671155620418} +--- !u!114 &114730562526222724 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114554886157775580} + _inputs: + - {fileID: 114378066669872004} +--- !u!114 &114732635930678278 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114385647069057010} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114732689614608988 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114055381488272514} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114733855804583510 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114442000406844188} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114734523107015782 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114488006925090048} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114735742031852318 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114976950462444310} + _inputs: + - {fileID: 114453339144657796} +--- !u!114 &114740462656451092 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114587963243139904} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114741351006934176 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114995943598026618} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114741999339535908 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114578668458250286} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114743798990957344 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114463183136394232} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114744710742415316 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114809703780796474} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114744951861517220 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114503251171754162} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114748890917427988 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114819209065616624} + _inputs: + - {fileID: 114442915415878272} +--- !u!114 &114753436896775260 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 1320 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114564508886529610} + _inputs: + - {fileID: 114995440111697984} +--- !u!114 &114754120066644676 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114754951159244130} + _inputs: + - {fileID: 114638164312271686} +--- !u!114 &114754951159244130 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 2022.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114754120066644676} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114758093600472114 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114220700694228568} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114759216864638356 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114484120233952240} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114766069295182146 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114235848786241888} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114766860237946060 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114535851105013628} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114768861245032676 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114222944304035782} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114779143377165324 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114409187314540462} + _inputs: + - {fileID: 114816594903349010} +--- !u!114 &114780825815363388 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114978496358228684} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114783157596119098 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114298590628864988} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114784539778093238 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: -7.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114649820198714802} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114786548535745842 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114704744442492192} + _inputs: + - {fileID: 114346240878861572} +--- !u!114 &114786563481142584 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114964089510329778} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114791909558126260 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 840 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114139763991355432} + _inputs: + - {fileID: 114890517229404200} +--- !u!114 &114792452818695174 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 552.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114331226178011978} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114794504564065380 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114308445692205998} + _inputs: + - {fileID: 114223578349965356} +--- !u!114 &114795600385364100 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114060468691274060} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114796118759526962 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114729652895838470} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114806391775952548 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114279443101610996} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114806912815789804 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 19 + width: 15 + height: 15 + parentNode: {fileID: 114709234588755810} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114809067390081412 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114851792330118846} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114809703780796474 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114979262586425312} + _inputs: + - {fileID: 114744710742415316} +--- !u!114 &114811656040908320 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114155030097666606} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114812010943235154 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114595812434298278} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114814935640544030 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 412.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114416965029609000} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114815031477891846 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1252.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114903470640933088} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114816260020250312 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114455813581842644} + _inputs: + - {fileID: 114265837573135884} +--- !u!114 &114816594903349010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114779143377165324} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114819209065616624 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114748890917427988} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114826471941662460 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 630 + y: 165 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114832943604600684} + _inputs: + - {fileID: 114091354739448916} +--- !u!114 &114832943604600684 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114826471941662460} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114842706196820562 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 184 + width: 15 + height: 15 + parentNode: {fileID: 114519746998358522} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114844738074964444 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114149206805687562} + _inputs: + - {fileID: 114872688452594094} +--- !u!114 &114844909480189294 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 844 + width: 15 + height: 15 + parentNode: {fileID: 114461922176674752} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114851792330118846 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114809067390081412} + _inputs: + - {fileID: 114526347215813776} +--- !u!114 &114866156505868784 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1602.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114220700694228568} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114867537130609524 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 1155 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114937807352434108} + _inputs: + - {fileID: 114419868793824710} +--- !u!114 &114870878225041800 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114372608875964954} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114872688452594094 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1462.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114844738074964444} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114874388098277048 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114372608875964954} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114877567627212650 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114627603537053588} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114889190475240398 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 514 + width: 15 + height: 15 + parentNode: {fileID: 114578668458250286} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114889917528243060 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 762.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114586171112551252} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114890517229404200 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114791909558126260} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114893495342764084 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114970029795268052} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114896499536795920 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114995943598026618} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114899868845616516 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114672329845936832} + _inputs: + - {fileID: 114563591049466754} +--- !u!114 &114903470640933088 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114589334417388670} + _inputs: + - {fileID: 114815031477891846} +--- !u!114 &114905837760230530 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 132.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114544046452556548} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114906112867144964 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1050 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114092793003749472} + _inputs: + - {fileID: 114146543418525146} +--- !u!114 &114907626386969702 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 622.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114586171112551252} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114924491257293590 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 210 + y: 495 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114260543212820992} + _inputs: + - {fileID: 114233473679809758} +--- !u!114 &114930515935297554 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 1504 + width: 15 + height: 15 + parentNode: {fileID: 114549266524813346} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114937807352434108 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1392.5 + y: 1174 + width: 15 + height: 15 + parentNode: {fileID: 114867537130609524} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114947244980610300 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114216783342308070} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114949153467399768 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 202.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114094250832233624} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114952593327603842 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1890 + y: 825 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114421761065742202} + _inputs: + - {fileID: 114182654162089432} +--- !u!114 &114955182263277056 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114094250832233624} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114964089510329778 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1470 + y: 660 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114435575373244152} + _inputs: + - {fileID: 114786563481142584} +--- !u!114 &114970029795268052 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1260 + y: 330 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114893495342764084} + _inputs: + - {fileID: 114154234458328364} +--- !u!114 &114972869643474944 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1182.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114291501057425104} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114975688528033068 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1042.5 + y: 679 + width: 15 + height: 15 + parentNode: {fileID: 114105289680323532} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114976950462444310 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 972.5 + y: 1009 + width: 15 + height: 15 + parentNode: {fileID: 114735742031852318} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114978496358228684 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 420 + y: 990 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114561025448010958} + _inputs: + - {fileID: 114780825815363388} +--- !u!114 &114979262586425312 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 342.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114809703780796474} + _bCanHaveMultipleConnections: 1 + _inputs: [] +--- !u!114 &114980907721042644 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1882.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114677833350987524} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114995440111697984 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0bace920f087ccf4595fad22948ac526, type: 3} + m_Name: Input + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 832.5 + y: 1339 + width: 15 + height: 15 + parentNode: {fileID: 114753436896775260} + _bCanHaveMultipleConnections: 0 + _outputs: [] +--- !u!114 &114995943598026618 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0d0b3390e407b34d9672707671fdf01, type: 3} + m_Name: Basic Node + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 0 + y: 1485 + width: 140 + height: 57.5 + _outputs: + - {fileID: 114896499536795920} + _inputs: + - {fileID: 114741351006934176} +--- !u!114 &114998529089306044 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505fc75df63b6cd4694c90b7f0428f99, type: 3} + m_Name: Ouput + m_EditorClassIdentifier: + bodyRect: + serializedVersion: 2 + x: 1812.5 + y: 349 + width: 15 + height: 15 + parentNode: {fileID: 114169632940801564} + _bCanHaveMultipleConnections: 1 + _inputs: [] diff --git a/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset.meta b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset.meta new file mode 100644 index 00000000..1ca2cfb8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/TempGraphsUNEB/TempNodeGraphUNEB-18000.asset.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7b48b278d2bc03d4ebb7e9554d7baeb5 +timeCreated: 1503266707 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures.meta b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures.meta new file mode 100644 index 00000000..1e5598c8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5761ae761e67fe64fa22031bd69b0dca +folderAsset: yes +timeCreated: 1501786124 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png Binary files differnew file mode 100644 index 00000000..d91689af --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png.meta b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png.meta new file mode 100644 index 00000000..fd909015 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Circle.png.meta @@ -0,0 +1,204 @@ +fileFormatVersion: 2 +guid: 7351ad259fd2ebb4e92d45d99d89ca33 +timeCreated: 1502521939 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: 0 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 3 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 4 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + textureFormat: 4 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 32 + textureFormat: 4 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: + - - {x: 0, y: 2} + - {x: -0.09813535, y: 1.9975909} + - {x: -0.19603428, y: 1.9903694} + - {x: -0.29346094, y: 1.978353} + - {x: -0.39018065, y: 1.9615705} + - {x: -0.4859604, y: 1.9400625} + - {x: -0.5805693, y: 1.9138807} + - {x: -0.67377967, y: 1.8830881} + - {x: -0.76536685, y: 1.8477591} + - {x: -0.8551101, y: 1.8079786} + - {x: -0.9427934, y: 1.7638426} + - {x: -1.0282055, y: 1.7154572} + - {x: -1.1111405, y: 1.6629392} + - {x: -1.1913986, y: 1.606415} + - {x: -1.2687867, y: 1.5460209} + - {x: -1.343118, y: 1.4819021} + - {x: -1.4142137, y: 1.4142134} + - {x: -1.4819024, y: 1.3431177} + - {x: -1.5460211, y: 1.2687864} + - {x: -1.6064153, y: 1.1913984} + - {x: -1.6629394, y: 1.1111403} + - {x: -1.7154574, y: 1.0282052} + - {x: -1.7638427, y: 0.94279313} + - {x: -1.8079787, y: 0.8551098} + - {x: -1.8477592, y: 0.76536644} + - {x: -1.8830884, y: 0.6737792} + - {x: -1.9138808, y: 0.5805688} + - {x: -1.9400626, y: 0.48595977} + - {x: -1.9615707, y: 0.39018002} + - {x: -1.9783531, y: 0.29346028} + - {x: -1.9903696, y: 0.19603357} + - {x: -1.9975909, y: 0.098134585} + - {x: -2, y: -0.0000008026785} + - {x: -1.9975909, y: -0.09813619} + - {x: -1.9903693, y: -0.19603516} + - {x: -1.9783529, y: -0.29346186} + - {x: -1.9615704, y: -0.3901816} + - {x: -1.9400623, y: -0.48596132} + - {x: -1.9138803, y: -0.58057034} + - {x: -1.8830878, y: -0.67378074} + - {x: -1.8477587, y: -0.7653679} + - {x: -1.8079782, y: -0.855111} + - {x: -1.7638422, y: -0.9427941} + - {x: -1.715457, y: -1.028206} + - {x: -1.6629391, y: -1.1111407} + - {x: -1.606415, y: -1.1913987} + - {x: -1.546021, y: -1.2687865} + - {x: -1.4819025, y: -1.3431177} + - {x: -1.4142139, y: -1.4142132} + - {x: -1.3431184, y: -1.4819018} + - {x: -1.2687873, y: -1.5460204} + - {x: -1.1913995, y: -1.6064144} + - {x: -1.1111416, y: -1.6629385} + - {x: -1.0282067, y: -1.7154565} + - {x: -0.9427949, y: -1.7638417} + - {x: -0.85511184, y: -1.8079778} + - {x: -0.76536876, y: -1.8477583} + - {x: -0.6737818, y: -1.8830874} + - {x: -0.5805717, y: -1.91388} + - {x: -0.48596293, y: -1.9400618} + - {x: -0.39018345, y: -1.96157} + - {x: -0.29346398, y: -1.9783525} + - {x: -0.1960375, y: -1.9903691} + - {x: -0.09813879, y: -1.9975908} + - {x: -0.0000036398517, y: -2} + - {x: 0.098131515, y: -1.9975911} + - {x: 0.19603026, y: -1.9903698} + - {x: 0.29345676, y: -1.9783536} + - {x: 0.3901763, y: -1.9615715} + - {x: 0.48595586, y: -1.9400636} + - {x: 0.58056474, y: -1.913882} + - {x: 0.67377496, y: -1.8830898} + - {x: 0.765362, y: -1.847761} + - {x: 0.8551053, y: -1.8079809} + - {x: 0.94278854, y: -1.7638452} + - {x: 1.0282005, y: -1.7154602} + - {x: 1.1111355, y: -1.6629425} + - {x: 1.1913936, y: -1.6064187} + - {x: 1.2687817, y: -1.5460249} + - {x: 1.3431131, y: -1.4819067} + - {x: 1.4142088, y: -1.4142184} + - {x: 1.4818976, y: -1.3431231} + - {x: 1.5460167, y: -1.2687918} + - {x: 1.6064112, y: -1.1914037} + - {x: 1.6629357, y: -1.1111456} + - {x: 1.7154542, y: -1.0282105} + - {x: 1.7638398, y: -0.94279844} + - {x: 1.8079762, y: -0.855115} + - {x: 1.8477571, y: -0.76537156} + - {x: 1.8830866, y: -0.6737842} + - {x: 1.9138794, y: -0.5805737} + - {x: 1.9400615, y: -0.48596448} + - {x: 1.9615698, y: -0.39018452} + - {x: 1.9783524, y: -0.29346457} + - {x: 1.9903691, y: -0.19603767} + - {x: 1.9975908, y: -0.09813846} + - {x: 2, y: -0.0000028371733} + - {x: 1.997591, y: 0.0981328} + - {x: 1.9903697, y: 0.19603202} + - {x: 1.9783533, y: 0.29345897} + - {x: 1.9615709, y: 0.39017895} + - {x: 1.9400629, y: 0.48595896} + - {x: 1.9138811, y: 0.58056825} + - {x: 1.8830885, y: 0.6737789} + - {x: 1.8477592, y: 0.7653663} + - {x: 1.8079787, y: 0.8551099} + - {x: 1.7638426, y: 0.9427934} + - {x: 1.7154571, y: 1.0282056} + - {x: 1.662939, y: 1.1111408} + - {x: 1.6064146, y: 1.1913992} + - {x: 1.5460203, y: 1.2687874} + - {x: 1.4819014, y: 1.3431189} + - {x: 1.4142125, y: 1.4142147} + - {x: 1.3431165, y: 1.4819036} + - {x: 1.2687849, y: 1.5460223} + - {x: 1.1913966, y: 1.6064166} + - {x: 1.1111382, y: 1.6629407} + - {x: 1.0282029, y: 1.7154588} + - {x: 0.94279057, y: 1.7638441} + - {x: 0.85510695, y: 1.8079801} + - {x: 0.76536334, y: 1.8477606} + - {x: 0.67377585, y: 1.8830895} + - {x: 0.58056515, y: 1.9138819} + - {x: 0.48595583, y: 1.9400636} + - {x: 0.3901758, y: 1.9615716} + - {x: 0.29345578, y: 1.9783537} + - {x: 0.1960288, y: 1.99037} + - {x: 0.09812956, y: 1.9975911} + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png Binary files differnew file mode 100644 index 00000000..1c4457e0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png.meta b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png.meta new file mode 100644 index 00000000..7affb106 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Grid.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 4ab4e605fe422164da65569c46a161d2 +timeCreated: 1493143660 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 1 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: 2 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 64 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png Binary files differnew file mode 100644 index 00000000..c8bbb357 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png diff --git a/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png.meta b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png.meta new file mode 100644 index 00000000..9f830579 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/UNEB Textures/Square.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 2753fd6aa74e4ae48b498cb00649f41c +timeCreated: 1502670092 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 32 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility.meta new file mode 100644 index 00000000..c637d44d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b4a95752fe3e454da78c3bfbf465f51 +folderAsset: yes +timeCreated: 1502670670 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs new file mode 100644 index 00000000..5a2de0b0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs @@ -0,0 +1,13 @@ + +using UnityEngine; + +namespace UNEB.Utility +{ + public static class ColorExtensions + { + public static Color From255(byte r, byte g, byte b) + { + return new Color(r / 255f, g / 255f, b / 255f); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs.meta new file mode 100644 index 00000000..9aa744fb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/ColorExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fe88d4f484d88f541adb9ee3c76532e9 +timeCreated: 1502671454 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs new file mode 100644 index 00000000..2faac0f1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs @@ -0,0 +1,78 @@ + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace UNEB.Utility +{ + /// <summary> + /// A simple stack with a limited capacity. + /// In order to make more room, the first element (not the top) in the stack is removed. + /// </summary> + /// <typeparam name="T"></typeparam> + public class FiniteStack<T> : IEnumerable<T> + { + private LinkedList<T> _container; + private int _capacity; + + /// <summary> + /// Called when the stack runs out of space and removes + /// the first item (bottom of stack) to make room. + /// </summary> + public event Action<T> OnRemoveBottomItem; + + public FiniteStack(int capacity) + { + _container = new LinkedList<T>(); + _capacity = capacity; + } + + public void Push(T value) + { + _container.AddLast(value); + + // Out of room, remove the first element in the stack. + if (_container.Count == _capacity) { + + T first = _container.First.Value; + _container.RemoveFirst(); + + if (OnRemoveBottomItem != null) + OnRemoveBottomItem(first); + } + } + + public T Peek() + { + return _container.Last.Value; + } + + public T Pop() + { + var lastVal = _container.Last.Value; + _container.RemoveLast(); + + return lastVal; + } + + public void Clear() + { + _container.Clear(); + } + + public int Count + { + get { return _container.Count; } + } + + public IEnumerator<T> GetEnumerator() + { + return _container.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return _container.GetEnumerator(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs.meta new file mode 100644 index 00000000..33af9b97 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/FiniteStack.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b4b8b87bda6573489817470ee03e595 +timeCreated: 1503072950 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs new file mode 100644 index 00000000..dfff1249 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs @@ -0,0 +1,20 @@ + +namespace UNEB.Utility +{ + /// <summary> + /// Simple pair tuple. + /// </summary> + /// <typeparam name="T1"></typeparam> + /// <typeparam name="T2"></typeparam> + public class Pair<T1, T2> + { + public readonly T1 item1; + public readonly T2 item2; + + public Pair(T1 item1, T2 item2) + { + this.item1 = item1; + this.item2 = item2; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs.meta new file mode 100644 index 00000000..ac58e80c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/Pair.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4c74f38f4b664f749bd0e508ea0ccc2d +timeCreated: 1502603700 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs new file mode 100644 index 00000000..9c3a8992 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs @@ -0,0 +1,300 @@ +using UnityEngine; +using System; +using System.Collections.Generic; + +namespace Bonsai.Utility +{ + /// <summary> + /// A finite state machine. + /// </summary> + /// <typeparam name="T">The date type to be stored by the machine states.</typeparam> + public class StateMachine<T> + { + /// <summary> + /// An event that fires when the machine finishes transitioning to another state. + /// </summary> + public event Action OnStateChangedEvent = delegate { }; + + protected Dictionary<T, State> _states = new Dictionary<T, State>(); + + /// <summary> + /// Get all the state data. + /// </summary> + /// <returns></returns> + public IEnumerable<T> Data() + { + return _states.Keys; + } + + protected State _currentState; + + public State CurrentState + { + get { return _currentState; } + } + + /// <summary> + /// Adds a state to the machine. + /// </summary> + /// <param name="data"></param> + public void AddState(T data) + { + var s = new State(data); + _states.Add(data, s); ; + } + + public void AddState(State s) + { + _states.Add(s.Value, s); + } + + public void AddTransition(State start, State end, Func<bool> condition, Func<bool> onMakingTransition) + { + var t = new Transition(condition); + t.onMakingTransition = onMakingTransition; + + AddTransition(start, end, t); + } + + public void AddTransition(State start, State end, Transition t) + { + start.Add(t); + t.SetNextState(end); + } + + /// <summary> + /// Add a transition that goes from start to end state. + /// </summary> + /// <param name="start"></param> + /// <param name="end"></param> + /// <param name="t"></param> + public void AddTransition(T start, T end, Transition t) + { + var startST = GetState(start); + var endST = GetState(end); + + if (startST == null || endST == null) { + Debug.LogError("State(s) are not in the state machine"); + return; + } + + AddTransition(startST, endST, t); + } + + /// <summary> + /// Add two transitions. + /// One from start to end. + /// Another from end to start. + /// </summary> + /// <param name="start"></param> + /// <param name="end"></param> + /// <param name="startToEnd"></param> + /// <param name="endToStart"></param> + public void AddBiTransition(T start, T end, Transition startToEnd, Transition endToStart) + { + var startST = GetState(start); + var endST = GetState(end); + + if (startST == null || endST == null) { + Debug.LogError("State(s) are not in the state machine"); + return; + } + + AddTransition(startST, endST, startToEnd); + AddTransition(endST, startST, endToStart); + } + + /// <summary> + /// Gets the state associated with the data. + /// </summary> + /// <param name="data"></param> + /// <returns></returns> + public State GetState(T data) + { + if (_states.ContainsKey(data)) { + return _states[data]; + } + + return null; + } + + /// <summary> + /// Sets the current active state of the machine. + /// </summary> + /// <param name="data"></param> + public void SetCurrentState(T data) + { + + var state = GetState(data); + + if (state == null) { + Debug.LogError(data + " is not in the state machine."); + } + + else { + _currentState = state; + } + } + + /// <summary> + /// Handles moving to next state when conditions are met. + /// </summary> + public void Update() + { + if (_currentState == null) { + return; + } + + Transition validTrans = null; + + // Pick the next state if the transition conditions are met. + for (int i = 0; i < _currentState.Transitions.Count; i++) { + + if (_currentState.Transitions[i].AllConditionsMet()) { + validTrans = _currentState.Transitions[i]; + break; + } + } + + if (validTrans != null) { + + // Call on making transition. + if (validTrans.onMakingTransition()) { + + // Call on state exit. + if (_currentState.onStateExit != null) + _currentState.onStateExit(); + + // Change the state to the next one. + _currentState = validTrans.NextState; + + // Call on state enter. + if (_currentState.onStateEnter != null) + _currentState.onStateEnter(); + + OnStateChangedEvent(); + } + } + } + + /// <summary> + /// A transition between two states than only occurs if all + /// its conditions are satisfied. + /// </summary> + public class Transition + { + private State _nextState = null; + private List<Func<bool>> _conditions = new List<Func<bool>>(); + + /// <summary> + /// Called after the 'from' state exits and before the 'to' state enters. + /// If this fails, then it goes back to the starting state. + /// </summary> + public Func<bool> onMakingTransition = () => { return true; }; + + public Transition() + { + + } + + /// <summary> + /// Pass in initial conditions + /// </summary> + /// <param name="?"></param> + public Transition(params Func<bool>[] conditions) + { + foreach (var c in conditions) { + AddCondition(c); + } + } + + /// <summary> + /// Adds a condition that must be satisfied in order to do the transition. + /// </summary> + /// <param name="cond"></param> + public void AddCondition(Func<bool> cond) + { + _conditions.Add(cond); + } + + /// <summary> + /// Tests if all the conditions of the transition are satisfied. + /// </summary> + /// <returns></returns> + public bool AllConditionsMet() + { + for (int i = 0; i < _conditions.Count; i++) { + + if (!_conditions[i]()) return false; + } + + // All conditions returned true. + return true; + } + + /// <summary> + /// Set the state that transition goes to. + /// </summary> + /// <param name="next"></param> + public void SetNextState(State next) + { + _nextState = next; + } + + /// <summary> + /// The state that transition goes to. + /// </summary> + public State NextState + { + get { return _nextState; } + } + } + + /// <summary> + /// A state of the machine. + /// </summary> + public class State + { + private T _data; + private List<Transition> _transitions = new List<Transition>(); + + /// <summary> + /// Executes when the machine transitions into this state. + /// </summary> + public Action onStateEnter; + + /// <summary> + /// Executes when the machine transitions out of this state. + /// </summary> + public Action onStateExit; + + /// <summary> + /// Construct a state with its data. + /// </summary> + /// <param name="data"></param> + public State(T data) + { + _data = data; + } + + /// <summary> + /// Adds a transition to the state. + /// </summary> + /// <param name="t"></param> + public void Add(Transition t) + { + _transitions.Add(t); + } + + /// <summary> + /// The data held by the state. + /// </summary> + public T Value { get { return _data; } } + + /// <summary> + /// The transitions connected to the state. + /// </summary> + public List<Transition> Transitions { get { return _transitions; } } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs.meta new file mode 100644 index 00000000..e84d2aad --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/StateMachine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5431af42bc33d804eb9504ebe195cc41 +timeCreated: 1503072950 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs new file mode 100644 index 00000000..33c0d960 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs @@ -0,0 +1,29 @@ + +namespace UNEB +{ + public static class StringExtensions + { + + /// <summary> + /// Merges the parent and child paths with the '/' character. + /// </summary> + /// <param name="parentDir"></param> + /// <param name="childDir"></param> + /// <returns></returns> + public static string Dir(this string parentDir, string childDir) + { + return parentDir + '/' + childDir; + } + + /// <summary> + /// Appends the extension to the file name with '.' + /// </summary> + /// <param name="file"></param> + /// <param name="extension"></param> + /// <returns></returns> + public static string Ext(this string file, string extension) + { + return file + '.' + extension; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs.meta new file mode 100644 index 00000000..2d33c4b7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ae4ec85959c405246890eb2d46b5c0e5 +timeCreated: 1503086644 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs new file mode 100644 index 00000000..3849326a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs @@ -0,0 +1,191 @@ + +using System.Collections.Generic; +using System.IO; +using System.Linq; + +using UnityEngine; +using UnityEditor; + +namespace UNEB.Utility +{ + /// <summary> + /// A static library that loads and stores references to textures via name. + /// </summary> + public class TextureLib + { + public const string kStandardTexturesFolder = "UNEB Textures"; + public enum TexType { PNG, JPEG, BMP }; + + private static Dictionary<string, Texture2D> _textures = new Dictionary<string, Texture2D>(); + private static Dictionary<TintedTextureKey, Texture2D> _tintedTextures = new Dictionary<TintedTextureKey, Texture2D>(); + + public static void LoadStandardTextures() + { + _textures.Clear(); + _tintedTextures.Clear(); + + LoadTexture("Grid"); + LoadTexture("Circle"); + LoadTexture("Square"); + } + + public static void LoadTexture(string name, TexType type = TexType.PNG) + { + string ext = GetTexTypeExtension(type); + string filename = name.Ext(ext); + string path = GetTextureFolderPath().Dir(filename); + + var tex = AssetDatabase.LoadAssetAtPath<Texture2D>(path); + + if (tex != null) { + _textures.Add(name, tex); + } + + else { + Debug.LogError("The texture: " + path + " could not be found."); + } + } + + public static string GetTexTypeExtension(TexType type) + { + switch (type) { + case TexType.PNG: return "png"; + case TexType.JPEG: return "jpg"; + case TexType.BMP: return "bmp"; + } + + return ""; + } + + public static Texture2D GetTexture(string name) + { + if (_textures.ContainsKey(name)) { + return _textures[name]; + } + + Debug.LogError(name + " is not loaded in the texture library."); + return null; + } + + /// <summary> + /// Gets the texture with a tint. + /// It must be already loaded in the library. + /// </summary> + /// <param name="name"></param> + /// <param name="color"></param> + /// <returns></returns> + public static Texture2D GetTintTex(string name, Color color) + { + var key = new TintedTextureKey(color, name); + + // Check if it already exsists in the tint dictionary. + if (_tintedTextures.ContainsKey(key)) { + + if (_tintedTextures[key]) { + return _tintedTextures[key]; + } + + // Rebuild texture. + else { + _tintedTextures[key] = tintCopy(GetTexture(name), color); + return _tintedTextures[key]; + } + } + + // Make a new tint from the pre-loaded texture. + Texture2D tex = GetTexture(name); + + // Tint the tex and add to tinted tex dictionary. + if (tex) { + + var tintedTex = tintCopy(tex, color); + _tintedTextures.Add(key, tintedTex); + + return tintedTex; + } + + return null; + } + + private static Texture2D tintCopy(Texture2D tex, Color color) + { + int pixCount = tex.width * tex.height; + + var tintedTex = new Texture2D(tex.width, tex.height); + tintedTex.alphaIsTransparency = true; + + var newPixels = new Color[pixCount]; + var pixels = tex.GetPixels(); + + for (int i = 0; i < pixCount; ++i) { + newPixels[i] = color; + newPixels[i].a = pixels[i].a; + } + + tintedTex.SetPixels(newPixels); + tintedTex.Apply(); + + return tintedTex; + } + + public static string GetTextureFolderPath() + { + string fullpath = getFullPath(Application.dataPath, kStandardTexturesFolder); + + if (!string.IsNullOrEmpty(fullpath)) { + + // Return the texture folder path relative to Unity's Asset folder. + int index = fullpath.IndexOf("Assets"); + string localPath = fullpath.Substring(index); + + return localPath; + } + + Debug.LogError("Could not find folder: " + kStandardTexturesFolder); + return ""; + } + + private static string getFullPath(string root, string targetFolderName) + { + string[] dirs = Directory.GetDirectories(root, targetFolderName, SearchOption.AllDirectories); + + // Return first occurance containing targetFolderName. + if (dirs.Length != 0) { + return dirs[0]; + } + + // Could not find anything. + return ""; + } + + private struct TintedTextureKey + { + public readonly Color color; + public readonly string texName; + + public TintedTextureKey(Color c, string name) + { + color = c; + texName = name; + } + + public override int GetHashCode() + { + return color.GetHashCode() * texName.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj is TintedTextureKey) { + + var key = (TintedTextureKey)obj; + return key.color == color && key.texName == texName; + } + + else { + return false; + } + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs.meta b/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs.meta new file mode 100644 index 00000000..180ea446 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/TextureLib.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 620aee55f886f914e825c6b891b8bd9b +timeCreated: 1501784046 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples.meta b/Other/NodeEditorExamples/Assets/xNode-examples.meta new file mode 100644 index 00000000..946b944b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 353d76ca3b8837a449b736fbf09f819f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/.editorconfig b/Other/NodeEditorExamples/Assets/xNode-examples/.editorconfig new file mode 100644 index 00000000..03c2cb57 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*.cs] +indent_style = space +indent_size = 4 +end_of_line = crlf +insert_final_newline = false +trim_trailing_whitespace = true diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/.github/FUNDING.yml b/Other/NodeEditorExamples/Assets/xNode-examples/.github/FUNDING.yml new file mode 100644 index 00000000..2cd331a9 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: thorbrigsted +open_collective: # Replace with a single Open Collective username +ko_fi: thorbrigsted +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/.gitignore b/Other/NodeEditorExamples/Assets/xNode-examples/.gitignore new file mode 100644 index 00000000..13d45ba0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/.gitignore @@ -0,0 +1,28 @@ +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ + +# Autogenerated VS/MD solution and project files +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj + +# Unity3D generated meta files +*.pidb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +.git.meta +.gitignore.meta +.gitattributes.meta + +# OS X only: +.DS_Store
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md b/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md new file mode 100644 index 00000000..10d780aa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md @@ -0,0 +1,40 @@ +## Contributing to xNode +💙Thank you for taking the time to contribute💙 + +If you haven't already, join our [Discord channel](https://discord.gg/qgPrHv4)! + +## Pull Requests +Try to keep your pull requests relevant, neat, and manageable. If you are adding multiple features, split them into separate PRs. +These are the main points to follow: + +1) Use formatting which is consistent with the rest of xNode base (see below) +2) Keep _one feature_ per PR (see below) +3) xNode aims to be compatible with C# 4.x, do not use new language features +4) Avoid including irellevant whitespace or formatting changes +5) Comment your code +6) Spell check your code / comments +7) Use concrete types, not *var* +8) Use english language + +## New features +xNode aims to be simple and extendible, not trying to fix all of Unity's shortcomings. + +Approved changes might be rejected if bundled with rejected changes, so keep PRs as separate as possible. + +If your feature aims to cover something not related to editing nodes, it generally won't be accepted. If in doubt, ask on the Discord channel. + +## Coding conventions +Using consistent formatting is key to having a clean git history. Skim through the code and you'll get the hang of it quickly. +* Methods, Types and properties PascalCase +* Variables camelCase +* Public methods XML commented. Params described if not obvious +* Explicit usage of brackets when doing multiple math operations on the same line + +## Formatting +I use VSCode with the C# FixFormat extension and the following setting overrides: +```json +"csharpfixformat.style.spaces.beforeParenthesis": false, +"csharpfixformat.style.indent.regionIgnored": true +``` +* Open braces on same line as condition +* 4 spaces for indentation. diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md.meta b/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md.meta new file mode 100644 index 00000000..5d7c1287 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/CONTRIBUTING.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc1db8b29c76d44648c9c86c2dfade6d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples.meta new file mode 100644 index 00000000..a6b543bc --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3cfe6eabeed0aa44e8d9d54b308a461f +folderAsset: yes +timeCreated: 1505418316 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy.meta new file mode 100644 index 00000000..c8781c84 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ac562a0423fff74ea984a2d355e4df9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor.meta new file mode 100644 index 00000000..d198e91f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5de235328e16fc4dbc4dcdd3794863e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs new file mode 100644 index 00000000..1ba88780 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs @@ -0,0 +1,111 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using XNode; +using XNode.Examples.LogicToy; + +namespace XNodeEditor.Examples.LogicToy { + [CustomNodeGraphEditor(typeof(LogicGraph))] + public class LogicGraphEditor : NodeGraphEditor { + readonly Color boolColor = new Color(0.1f, 0.6f, 0.6f); + private List<ObjectLastOnTimer> lastOnTimers = new List<ObjectLastOnTimer>(); + private double lastFrame; + + /// <summary> Used for tracking when an arbitrary object was last 'on' for fading effects </summary> + private class ObjectLastOnTimer { + public object obj; + public double lastOnTime; + + public ObjectLastOnTimer(object obj, bool on) { + this.obj = obj; + } + } + + /// <summary> + /// Overriding GetNodeMenuName lets you control if and how nodes are categorized. + /// In this example we are sorting out all node types that are not in the XNode.Examples namespace. + /// </summary> + public override string GetNodeMenuName(System.Type type) { + if (type.Namespace == "XNode.Examples.LogicToy") { + return base.GetNodeMenuName(type).Replace("X Node/Examples/Logic Toy/", ""); + } else return null; + } + + public override void OnGUI() { + // Repaint each frame + window.Repaint(); + + // Timer + if (Event.current.type == EventType.Repaint) { + for (int i = 0; i < target.nodes.Count; i++) { + ITimerTick timerTick = target.nodes[i] as ITimerTick; + if (timerTick != null) { + float deltaTime = (float) (EditorApplication.timeSinceStartup - lastFrame); + timerTick.Tick(deltaTime); + } + } + } + lastFrame = EditorApplication.timeSinceStartup; + } + + /// <summary> Controls graph noodle colors </summary> + public override Gradient GetNoodleGradient(NodePort output, NodePort input) { + LogicNode node = output.node as LogicNode; + Gradient baseGradient = base.GetNoodleGradient(output, input); + HighlightGradient(baseGradient, Color.yellow, output, (bool) node.GetValue(output)); + return baseGradient; + } + + /// <summary> Controls graph type colors </summary> + public override Color GetTypeColor(System.Type type) { + if (type == typeof(bool)) return boolColor; + else return base.GetTypeColor(type); + } + + /// <summary> Returns the time at which an arbitrary object was last 'on' </summary> + public double GetLastOnTime(object obj, bool high) { + ObjectLastOnTimer timer = lastOnTimers.FirstOrDefault(x => x.obj == obj); + if (timer == null) { + timer = new ObjectLastOnTimer(obj, high); + lastOnTimers.Add(timer); + } + if (high) timer.lastOnTime = EditorApplication.timeSinceStartup; + return timer.lastOnTime; + } + + /// <summary> Returns a color based on if or when an arbitrary object was last 'on' </summary> + public Color GetLerpColor(Color off, Color on, object obj, bool high) { + double lastOnTime = GetLastOnTime(obj, high); + + if (high) return on; + else { + float t = (float) (lastOnTime - EditorApplication.timeSinceStartup); + t *= 8f; + if (t > 0) return Color.Lerp(off, on, t); + else return off; + } + } + + /// <summary> Returns a color based on if or when an arbitrary object was last 'on' </summary> + public void HighlightGradient(Gradient gradient, Color highlightColor, object obj, bool high) { + double lastOnTime = GetLastOnTime(obj, high); + float t; + + if (high) t = 1f; + else { + t = (float) (lastOnTime - EditorApplication.timeSinceStartup); + t *= 8f; + t += 1; + } + t = Mathf.Clamp01(t); + GradientColorKey[] colorKeys = gradient.colorKeys; + for (int i = 0; i < colorKeys.Length; i++) { + GradientColorKey colorKey = colorKeys[i]; + colorKey.color = Color.Lerp(colorKeys[i].color, highlightColor, t); + colorKeys[i] = colorKey; + } + gradient.SetKeys(colorKeys, gradient.alphaKeys); + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs.meta new file mode 100644 index 00000000..662c8e67 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicGraphEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c9bb5ae9dee9af43a89fa0db3ed8de0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs new file mode 100644 index 00000000..24a8d603 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs @@ -0,0 +1,45 @@ +using UnityEditor; +using UnityEngine; +using XNode; +using XNode.Examples.LogicToy; + +namespace XNodeEditor.Examples.LogicToy { + [CustomNodeEditor(typeof(LogicNode))] + public class LogicNodeEditor : NodeEditor { + private LogicNode node; + private LogicGraphEditor graphEditor; + + public override void OnHeaderGUI() { + // Initialization + if (node == null) { + node = target as LogicNode; + graphEditor = NodeGraphEditor.GetEditor(target.graph, window) as LogicGraphEditor; + } + + base.OnHeaderGUI(); + Rect dotRect = GUILayoutUtility.GetLastRect(); + dotRect.size = new Vector2(16, 16); + dotRect.y += 6; + + GUI.color = graphEditor.GetLerpColor(Color.red, Color.green, node, node.led); + GUI.DrawTexture(dotRect, NodeEditorResources.dot); + GUI.color = Color.white; + } + + public override void OnBodyGUI() { + if (target == null) { + Debug.LogWarning("Null target node for node editor!"); + return; + } + NodePort input = target.GetPort("input"); + NodePort output = target.GetPort("output"); + + GUILayout.BeginHorizontal(); + if (input != null) NodeEditorGUILayout.PortField(GUIContent.none, input, GUILayout.MinWidth(0)); + if (output != null) NodeEditorGUILayout.PortField(GUIContent.none, output, GUILayout.MinWidth(0)); + GUILayout.EndHorizontal(); + EditorGUIUtility.labelWidth = 60; + base.OnBodyGUI(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs.meta new file mode 100644 index 00000000..24a3edfa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Editor/LogicNodeEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f1280a9d3431638429b64ea41000b794 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset new file mode 100644 index 00000000..44386d23 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset @@ -0,0 +1,347 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1577ad53614c9e0498c962eaa9ba304f, type: 3} + m_Name: Example + m_EditorClassIdentifier: + nodes: + - {fileID: 114046633862954194} + - {fileID: 114880916489599218} + - {fileID: 114945579453429622} + - {fileID: 114944478030018250} + - {fileID: 114194736576219100} + - {fileID: 114558631167130670} + - {fileID: 114481634605117190} + - {fileID: 114463302483022418} +--- !u!114 &114046633862954194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54822dcd4ea0525409ad71a5fa416755, type: 3} + m_Name: Pulse + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -264, y: -248} + ports: + keys: + - output + values: + - _fieldName: output + _node: {fileID: 114046633862954194} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114880916489599218} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + interval: 1 + output: 0 +--- !u!114 &114194736576219100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7d4066122e5859498bbf1f1db2593cf, type: 3} + m_Name: Toggle + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -72, y: -8} + ports: + keys: + - input + - output + values: + - _fieldName: input + _node: {fileID: 114194736576219100} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: output + node: {fileID: 114944478030018250} + reroutePoints: [] + - fieldName: output + node: {fileID: 114481634605117190} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: output + _node: {fileID: 114194736576219100} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114945579453429622} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + input: 0 + output: 1 +--- !u!114 &114463302483022418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4bb0f0e96df60a4690ca03082a93b44, type: 3} + m_Name: Not + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 88, y: -248} + ports: + keys: + - input + - output + values: + - _fieldName: input + _node: {fileID: 114463302483022418} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: output + node: {fileID: 114880916489599218} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: output + _node: {fileID: 114463302483022418} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + input: 1 + output: 0 +--- !u!114 &114481634605117190 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54822dcd4ea0525409ad71a5fa416755, type: 3} + m_Name: Pulse + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -264, y: 72} + ports: + keys: + - output + values: + - _fieldName: output + _node: {fileID: 114481634605117190} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114194736576219100} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + interval: 1 + output: 0 +--- !u!114 &114558631167130670 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7d4066122e5859498bbf1f1db2593cf, type: 3} + m_Name: Toggle + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 360, y: -72} + ports: + keys: + - input + - output + values: + - _fieldName: input + _node: {fileID: 114558631167130670} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: output + node: {fileID: 114945579453429622} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: output + _node: {fileID: 114558631167130670} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + input: 1 + output: 1 +--- !u!114 &114880916489599218 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7d4066122e5859498bbf1f1db2593cf, type: 3} + m_Name: Toggle + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -72, y: -168} + ports: + keys: + - input + - output + values: + - _fieldName: input + _node: {fileID: 114880916489599218} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: output + node: {fileID: 114046633862954194} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: output + _node: {fileID: 114880916489599218} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114945579453429622} + reroutePoints: [] + - fieldName: input + node: {fileID: 114463302483022418} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + input: 0 + output: 1 +--- !u!114 &114944478030018250 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54822dcd4ea0525409ad71a5fa416755, type: 3} + m_Name: Pulse + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -264, y: -88} + ports: + keys: + - output + values: + - _fieldName: output + _node: {fileID: 114944478030018250} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114194736576219100} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + interval: 1.06 + output: 0 +--- !u!114 &114945579453429622 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c88b3b7abe7eb324baec5d03dfa998ab, type: 3} + m_Name: And + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 152, y: -72} + ports: + keys: + - input + - output + values: + - _fieldName: input + _node: {fileID: 114945579453429622} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: output + node: {fileID: 114194736576219100} + reroutePoints: [] + - fieldName: output + node: {fileID: 114880916489599218} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: output + _node: {fileID: 114945579453429622} + _typeQualifiedName: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: input + node: {fileID: 114558631167130670} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + input: 1 + output: 1 diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset.meta new file mode 100644 index 00000000..188868d7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Example.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: df29bbd59126610439c3391f59eac02a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs new file mode 100644 index 00000000..4507b180 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs @@ -0,0 +1,5 @@ +namespace XNode.Examples.LogicToy { + public interface ITimerTick { + void Tick(float timeDelta); + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs.meta new file mode 100644 index 00000000..511a5b19 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/ITimerTick.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46533d584cdbed04db785406b8361397 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs new file mode 100644 index 00000000..873d277d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs @@ -0,0 +1,6 @@ +using UnityEngine; + +namespace XNode.Examples.LogicToy { + [CreateAssetMenu(fileName = "New LogicToy Graph", menuName = "xNode Examples/LogicToy Graph")] + public class LogicGraph : NodeGraph { } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs.meta new file mode 100644 index 00000000..c0f0d7ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/LogicGraph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1577ad53614c9e0498c962eaa9ba304f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes.meta new file mode 100644 index 00000000..3cc6de98 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8852475771ad63a45a0854e9419d4e19 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs new file mode 100644 index 00000000..04fcbe6f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs @@ -0,0 +1,25 @@ +using System.Linq; +using UnityEngine; + +namespace XNode.Examples.LogicToy { + [NodeWidth(140), NodeTint(100, 70, 70)] + public class AndNode : LogicNode { + [Input, HideInInspector] public bool input; + [Output, HideInInspector] public bool output; + public override bool led { get { return output; } } + + protected override void OnInputChanged() { + bool newInput = GetPort("input").GetInputValues<bool>().All(x => x); + + if (input != newInput) { + input = newInput; + output = newInput; + SendSignal(GetPort("output")); + } + } + + public override object GetValue(NodePort port) { + return output; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs.meta new file mode 100644 index 00000000..2b60e986 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/AndNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c88b3b7abe7eb324baec5d03dfa998ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs new file mode 100644 index 00000000..df34f94f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs @@ -0,0 +1,31 @@ +using System; +using UnityEngine; + +namespace XNode.Examples.LogicToy { + /// <summary> Base node for the LogicToy system </summary> + public abstract class LogicNode : Node { + public Action onStateChange; + public abstract bool led { get; } + + public void SendSignal(NodePort output) { + // Loop through port connections + int connectionCount = output.ConnectionCount; + for (int i = 0; i < connectionCount; i++) { + NodePort connectedPort = output.GetConnection(i); + + // Get connected ports logic node + LogicNode connectedNode = connectedPort.node as LogicNode; + + // Trigger it + if (connectedNode != null) connectedNode.OnInputChanged(); + } + if (onStateChange != null) onStateChange(); + } + + protected abstract void OnInputChanged(); + + public override void OnCreateConnection(NodePort from, NodePort to) { + OnInputChanged(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs.meta new file mode 100644 index 00000000..435ffe0e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/LogicNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1731c3983afdaa4e824178fcd76d66e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs new file mode 100644 index 00000000..1170757d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs @@ -0,0 +1,25 @@ +using System.Linq; +using UnityEngine; + +namespace XNode.Examples.LogicToy { + [NodeWidth(140), NodeTint(100, 100, 50)] + public class NotNode : LogicNode { + [Input, HideInInspector] public bool input; + [Output, HideInInspector] public bool output = true; + public override bool led { get { return output; } } + + protected override void OnInputChanged() { + bool newInput = GetPort("input").GetInputValues<bool>().Any(x => x); + + if (input != newInput) { + input = newInput; + output = !newInput; + SendSignal(GetPort("output")); + } + } + + public override object GetValue(NodePort port) { + return output; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs.meta new file mode 100644 index 00000000..75461b4f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/NotNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4bb0f0e96df60a4690ca03082a93b44 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs new file mode 100644 index 00000000..44c0dcb8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs @@ -0,0 +1,32 @@ +using UnityEngine; + +namespace XNode.Examples.LogicToy { + [NodeWidth(140), NodeTint(70,100,70)] + public class PulseNode : LogicNode, ITimerTick { + [Space(-18)] + public float interval = 1f; + [Output, HideInInspector] public bool output; + public override bool led { get { return output; } } + + private float timer; + + public void Tick(float deltaTime) { + timer += deltaTime; + if (!output && timer > interval) { + timer -= interval; + output = true; + SendSignal(GetPort("output")); + } else if (output) { + output = false; + SendSignal(GetPort("output")); + } + } + + /// <summary> This node can not receive signals, so this is not used </summary> + protected override void OnInputChanged() { } + + public override object GetValue(NodePort port) { + return output; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs.meta new file mode 100644 index 00000000..268ec7d0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/PulseNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54822dcd4ea0525409ad71a5fa416755 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs new file mode 100644 index 00000000..ba71fa0d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs @@ -0,0 +1,27 @@ +using System.Linq; +using UnityEngine; + +namespace XNode.Examples.LogicToy { + [NodeWidth(140), NodeTint(70,70,100)] + public class ToggleNode : LogicNode { + [Input, HideInInspector] public bool input; + [Output, HideInInspector] public bool output; + public override bool led { get { return output; } } + + protected override void OnInputChanged() { + bool newInput = GetPort("input").GetInputValues<bool>().Any(x => x); + + if (!input && newInput) { + input = newInput; + output = !output; + SendSignal(GetPort("output")); + } else if (input && !newInput) { + input = newInput; + } + } + + public override object GetValue(NodePort port) { + return output; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs.meta new file mode 100644 index 00000000..4b19b679 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/LogicToy/Nodes/ToggleNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c7d4066122e5859498bbf1f1db2593cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph.meta new file mode 100644 index 00000000..1910f12b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 852631db1e0f047478da88918f49e4a3 +folderAsset: yes +timeCreated: 1516177447 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor.meta new file mode 100644 index 00000000..be3526da --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 642e362943557314392fc62290a8e242 +folderAsset: yes +timeCreated: 1516180279 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs new file mode 100644 index 00000000..7a580bfe --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode.Examples; + +namespace XNodeEditor.Examples { + [CustomNodeGraphEditor(typeof(MathGraph))] + public class MathGraphEditor : NodeGraphEditor { + + /// <summary> + /// Overriding GetNodeMenuName lets you control if and how nodes are categorized. + /// In this example we are sorting out all node types that are not in the XNode.Examples namespace. + /// </summary> + public override string GetNodeMenuName(System.Type type) { + if (type.Namespace == "XNode.Examples.MathNodes") { + return base.GetNodeMenuName(type).Replace("X Node/Examples/Math Nodes/", ""); + } else return null; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs.meta new file mode 100644 index 00000000..89bd3df7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Editor/MathGraphEditor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 3f6ed0407f1f4ad45bf697d7798ddf0d +timeCreated: 1516180270 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs new file mode 100644 index 00000000..420ce64e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs @@ -0,0 +1,8 @@ +using System; +using UnityEngine; + +namespace XNode.Examples { + /// <summary> Defines an example nodegraph that can be created as an asset in the Project window. </summary> + [Serializable, CreateAssetMenu(fileName = "New Math Graph", menuName = "xNode Examples/Math Graph")] + public class MathGraph : XNode.NodeGraph { } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs.meta new file mode 100644 index 00000000..43c9d35d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/MathGraph.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a6399826e2c44b447b32a3ed06646162 +timeCreated: 1506460823 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset new file mode 100644 index 00000000..45efea59 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset @@ -0,0 +1,233 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6399826e2c44b447b32a3ed06646162, type: 3} + m_Name: New Math Graph + m_EditorClassIdentifier: + nodes: + - {fileID: 114652361136345764} + - {fileID: 114067149339165002} + - {fileID: 114441428018438906} + - {fileID: 114775482956350040} +--- !u!114 &114067149339165002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 05559f4106850df4ab41776666216480, type: 3} + m_Name: Vector + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -24, y: -280} + ports: + keys: + - x + - y + - z + - vector + values: + - _fieldName: x + _node: {fileID: 114067149339165002} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: result + node: {fileID: 114652361136345764} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: y + _node: {fileID: 114067149339165002} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: result + node: {fileID: 114775482956350040} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: z + _node: {fileID: 114067149339165002} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: result + node: {fileID: 114775482956350040} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: vector + _node: {fileID: 114067149339165002} + _typeQualifiedName: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + connections: + - fieldName: input + node: {fileID: 114441428018438906} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + x: 0 + y: 0 + z: 0 + vector: {x: -0.22000003, y: 2.14, z: 2.14} +--- !u!114 &114441428018438906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98f6f901f0da53142b79277ea3f42518, type: 3} + m_Name: DisplayValue + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 232, y: -312} + ports: + keys: + - input + values: + - _fieldName: input + _node: {fileID: 114441428018438906} + _typeQualifiedName: XNode.Examples.MathNodes.DisplayValue+Anything, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: vector + node: {fileID: 114067149339165002} + reroutePoints: [] + _direction: 0 + _connectionType: 1 + _typeConstraint: 0 + _dynamic: 0 +--- !u!114 &114652361136345764 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 19e541bba2a188f4a84c6f3718ee6d55, type: 3} + m_Name: MathNode + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -344, y: -376} + ports: + keys: + - a + - b + - result + values: + - _fieldName: a + _node: {fileID: 114652361136345764} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: b + _node: {fileID: 114652361136345764} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: result + _node: {fileID: 114652361136345764} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: x + node: {fileID: 114067149339165002} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + a: 0.32 + b: 0.54 + result: -0.22000003 + mathType: 1 +--- !u!114 &114775482956350040 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 19e541bba2a188f4a84c6f3718ee6d55, type: 3} + m_Name: Math Node + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -344, y: -216} + ports: + keys: + - a + - b + - result + values: + - _fieldName: a + _node: {fileID: 114775482956350040} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: b + _node: {fileID: 114775482956350040} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: result + _node: {fileID: 114775482956350040} + _typeQualifiedName: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + connections: + - fieldName: z + node: {fileID: 114067149339165002} + reroutePoints: [] + - fieldName: y + node: {fileID: 114067149339165002} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + a: 0.81 + b: 1.33 + result: 2.14 + mathType: 0 diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset.meta new file mode 100644 index 00000000..61fd97ef --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/New Math Graph.asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97b11561dfa2a2646a1217518e90411b +timeCreated: 1516179614 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes.meta new file mode 100644 index 00000000..0d29f0a0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 31c1681f5df4f764ab4ca7f09cd3be7d +folderAsset: yes +timeCreated: 1505462700 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs new file mode 100644 index 00000000..422c4c4d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs @@ -0,0 +1,20 @@ +namespace XNode.Examples.MathNodes { + + public class DisplayValue : XNode.Node { + + /// <summary> + /// Create an input port that only allows a single connection. + /// The backing value is not important, as we are only interested in the input value. + /// We are also acceptable of all input types, so any type will do, as long as it is serializable. + /// </summary> + [Input(ShowBackingValue.Never, ConnectionType.Override)] public Anything input; + + /// <summary> Get the value currently plugged in to this node </summary> + public object GetValue() { + return GetInputValue<object>("input"); + } + + /// <summary> This class is defined for the sole purpose of being serializable </summary> + [System.Serializable] public class Anything {} + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs.meta new file mode 100644 index 00000000..aa380ead --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/DisplayValue.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 98f6f901f0da53142b79277ea3f42518 +timeCreated: 1507499149 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor.meta new file mode 100644 index 00000000..10088178 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0d2300267781fed46a6d964565309cbf +folderAsset: yes +timeCreated: 1509307735 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs new file mode 100644 index 00000000..706c5dc2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs @@ -0,0 +1,27 @@ +using UnityEditor; +using XNode.Examples.MathNodes; + +namespace XNodeEditor.Examples { + + /// <summary> + /// NodeEditor functions similarly to the Editor class, only it is xNode specific. + /// Custom node editors should have the CustomNodeEditor attribute that defines which node type it is an editor for. + /// </summary> + [CustomNodeEditor(typeof(DisplayValue))] + public class DisplayValueEditor : NodeEditor { + + /// <summary> Called whenever the xNode editor window is updated </summary> + public override void OnBodyGUI() { + + // Draw the default GUI first, so we don't have to do all of that manually. + base.OnBodyGUI(); + + // `target` points to the node, but it is of type `Node`, so cast it. + DisplayValue displayValueNode = target as DisplayValue; + + // Get the value from the node, and display it + object obj = displayValueNode.GetValue(); + if (obj != null) EditorGUILayout.LabelField(obj.ToString()); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs.meta new file mode 100644 index 00000000..971da18a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Editor/DisplayValueEditor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7d7298690665789498dc42a285eb2c28 +timeCreated: 1509305659 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs new file mode 100644 index 00000000..606e038f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs @@ -0,0 +1,33 @@ +namespace XNode.Examples.MathNodes { + [System.Serializable] + public class MathNode : XNode.Node { + // Adding [Input] or [Output] is all you need to do to register a field as a valid port on your node + [Input] public float a; + [Input] public float b; + // The value of an output node field is not used for anything, but could be used for caching output results + [Output] public float result; + + // Will be displayed as an editable field - just like the normal inspector + public MathType mathType = MathType.Add; + public enum MathType { Add, Subtract, Multiply, Divide } + + // GetValue should be overridden to return a value for any specified output port + public override object GetValue(XNode.NodePort port) { + + // Get new a and b values from input connections. Fallback to field values if input is not connected + float a = GetInputValue<float>("a", this.a); + float b = GetInputValue<float>("b", this.b); + + // After you've gotten your input values, you can perform your calculations and return a value + result = 0f; + if (port.fieldName == "result") + switch (mathType) { + case MathType.Add: default: result = a+b; break; + case MathType.Subtract: result = a - b; break; + case MathType.Multiply: result = a * b; break; + case MathType.Divide: result = a / b; break; + } + return result; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs.meta new file mode 100644 index 00000000..bd2894cb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/MathNode.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 19e541bba2a188f4a84c6f3718ee6d55 +timeCreated: 1509307779 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs new file mode 100644 index 00000000..1f43e6ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace XNode.Examples.MathNodes { + public class Vector : XNode.Node { + [Input] public float x, y, z; + [Output] public Vector3 vector; + + public override object GetValue(XNode.NodePort port) { + vector.x = GetInputValue<float>("x", this.x); + vector.y = GetInputValue<float>("y", this.y); + vector.z = GetInputValue<float>("z", this.z); + return vector; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs.meta new file mode 100644 index 00000000..968b1f6c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 05559f4106850df4ab41776666216480 +timeCreated: 1509303406 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph.meta new file mode 100644 index 00000000..7caafdc3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 303cd8b799b4aac4ab113e25ceb788c2 +folderAsset: yes +timeCreated: 1525910619 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics.meta new file mode 100644 index 00000000..ebd1eb42 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ece0a00127d585c40a5c32fc4ce996c8 +folderAsset: yes +timeCreated: 1525603698 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png Binary files differnew file mode 100644 index 00000000..4af2423c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png.meta new file mode 100644 index 00000000..e3731736 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/half.png.meta @@ -0,0 +1,99 @@ +fileFormatVersion: 2 +guid: a909818a5b50b764fb886e6d8c700ab4 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 50 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 2 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: a70ae542a75f481489949020e054878e + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png Binary files differnew file mode 100644 index 00000000..36c0ce93 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png.meta new file mode 100644 index 00000000..d2c5172e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: e8cf87ddc81cfee4b8417b635e25177b +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: a88371aeed2f24042a6b467eae1a16e9 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png Binary files differnew file mode 100644 index 00000000..538cc9fa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png.meta new file mode 100644 index 00000000..a7cf71d1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_dot_outer.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 935eabc21488fa749abf5308640a4ba1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 60652d4dba452bc4da042e704de34007 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png Binary files differnew file mode 100644 index 00000000..a8aa5342 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png.meta new file mode 100644 index 00000000..1f5ee9a2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 105d5a0e2ead77c428847ed8572bb93b +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 27, y: 24, z: 27, w: 32} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 2db0849f84c13c242a963fb19271f432 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png Binary files differnew file mode 100644 index 00000000..f1bb27f7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png.meta new file mode 100644 index 00000000..86def74f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Graphics/xnode_node_highlight.png.meta @@ -0,0 +1,99 @@ +fileFormatVersion: 2 +guid: 4e02831629a863541a8da989a43791b3 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 77a42f63e1f314c438d44e95950e55aa + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs.meta new file mode 100644 index 00000000..60b6aca3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3adf4ad59a1c98743bf53bd605f481b1 +folderAsset: yes +timeCreated: 1525604249 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab new file mode 100644 index 00000000..510240c3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1049285975221736 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224366972801646910} + - component: {fileID: 222725990197690100} + - component: {fileID: 114481810053895680} + - component: {fileID: 114418866008226302} + m_Layer: 5 + m_Name: Connection + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224366972801646910 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049285975221736} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 190.83, y: 2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222725990197690100 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049285975221736} + m_CullTransparentMesh: 0 +--- !u!114 &114481810053895680 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049285975221736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.93103456, b: 0, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: a909818a5b50b764fb886e6d8c700ab4, type: 3} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114418866008226302 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049285975221736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 656e34b375c2eb64991ee74b5f01bd13, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab.meta new file mode 100644 index 00000000..e2f78adf --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Connection.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c02acb8ebd6bcd42805aea1dfa350f5 +timeCreated: 1525820302 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab new file mode 100644 index 00000000..f50aef4b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab @@ -0,0 +1,1819 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1080736877965718 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224521757493125408} + - component: {fileID: 222240967862973054} + - component: {fileID: 114445448497952096} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224521757493125408 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080736877965718} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224551638448215900} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222240967862973054 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080736877965718} + m_CullTransparentMesh: 0 +--- !u!114 &114445448497952096 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080736877965718} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Vector +--- !u!1 &1133001659518604 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224256572033804734} + - component: {fileID: 114611502738141122} + m_Layer: 5 + m_Name: NodeGraph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224256572033804734 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1133001659518604} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224537265222795724} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114611502738141122 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1133001659518604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f58f5c7a27d48e34fb5180e77697e866, type: 3} + m_Name: + m_EditorClassIdentifier: + graph: {fileID: 11400000, guid: 97b11561dfa2a2646a1217518e90411b, type: 2} + runtimeMathNodePrefab: {fileID: 114056545184363226, guid: 4feddbc48021f37449adc6b750f91afa, + type: 3} + runtimeVectorPrefab: {fileID: 114898082577364016, guid: 85f77ac8ea4840c4a982e2197715bf6f, + type: 3} + runtimeDisplayValuePrefab: {fileID: 114300031540392060, guid: 9e82b168e67f1384d82799733341d6f8, + type: 3} + runtimeConnectionPrefab: {fileID: 114418866008226302, guid: 7c02acb8ebd6bcd42805aea1dfa350f5, + type: 3} + graphContextMenu: {fileID: 114333704717712772} + nodeContextMenu: {fileID: 114526446786066532} + tooltip: {fileID: 114246487511786068} +--- !u!1 &1187023566883474 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224327074136078934} + - component: {fileID: 222585313648711244} + - component: {fileID: 114707379614477472} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224327074136078934 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1187023566883474} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224707157113485814} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222585313648711244 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1187023566883474} + m_CullTransparentMesh: 0 +--- !u!114 &114707379614477472 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1187023566883474} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Display Value +--- !u!1 &1251199095071396 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224115189799977692} + - component: {fileID: 114336755115422928} + - component: {fileID: 222657103066308166} + - component: {fileID: 114280653279521072} + m_Layer: 5 + m_Name: Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224115189799977692 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251199095071396} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224771777543867704} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 40, y: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114336755115422928 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251199095071396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!222 &222657103066308166 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251199095071396} + m_CullTransparentMesh: 0 +--- !u!114 &114280653279521072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251199095071396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1271247577088800 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224455174510274828} + - component: {fileID: 114689896621273488} + - component: {fileID: 222571827532431236} + - component: {fileID: 114566275570925696} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224455174510274828 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1271247577088800} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224047001452284434} + m_Father: {fileID: 224537265222795724} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114689896621273488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1271247577088800} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!222 &222571827532431236 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1271247577088800} + m_CullTransparentMesh: 0 +--- !u!114 &114566275570925696 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1271247577088800} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1335576186209296 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224002617184882216} + - component: {fileID: 222660695636782326} + - component: {fileID: 114673034340687274} + - component: {fileID: 114161630170270936} + m_Layer: 5 + m_Name: Button (Math) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224002617184882216 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1335576186209296} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224916401943745568} + m_Father: {fileID: 224771777543867704} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -510.5, y: -252.5} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222660695636782326 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1335576186209296} + m_CullTransparentMesh: 0 +--- !u!114 &114673034340687274 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1335576186209296} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114161630170270936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1335576186209296} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114673034340687274} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 114333704717712772} + m_MethodName: SpawnMathNode + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &1518084479835462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224331467887983144} + - component: {fileID: 222868129039624086} + - component: {fileID: 114637816716331580} + - component: {fileID: 114220602262174048} + - component: {fileID: 114199784328809820} + - component: {fileID: 114526446786066532} + - component: {fileID: 225118934869130228} + m_Layer: 5 + m_Name: NodeContextMenu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224331467887983144 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224909489589417492} + - {fileID: 224554742420507178} + m_Father: {fileID: 224047001452284434} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -55} + m_SizeDelta: {x: 200, y: 102} + m_Pivot: {x: 0, y: 1} +--- !u!222 &222868129039624086 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_CullTransparentMesh: 0 +--- !u!114 &114637816716331580 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114220602262174048 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_ChildAlignment: 0 + m_Spacing: 2 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 +--- !u!114 &114199784328809820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!114 &114526446786066532 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 402b5de5d75c05445994c83bba07d273, type: 3} + m_Name: + m_EditorClassIdentifier: + group: {fileID: 225118934869130228} + selectedNode: {fileID: 0} +--- !u!225 &225118934869130228 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518084479835462} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &1520572954894968 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224916401943745568} + - component: {fileID: 222933014086292186} + - component: {fileID: 114343491888919632} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224916401943745568 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520572954894968} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224002617184882216} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222933014086292186 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520572954894968} + m_CullTransparentMesh: 0 +--- !u!114 &114343491888919632 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520572954894968} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Math Node +--- !u!1 &1526342814791454 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224909489589417492} + - component: {fileID: 114918064197538970} + - component: {fileID: 222766874843017956} + - component: {fileID: 114943724784013258} + m_Layer: 5 + m_Name: Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224909489589417492 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526342814791454} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224331467887983144} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 40, y: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114918064197538970 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526342814791454} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!222 &222766874843017956 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526342814791454} + m_CullTransparentMesh: 0 +--- !u!114 &114943724784013258 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526342814791454} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1634032914223184 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224551638448215900} + - component: {fileID: 222109039500370514} + - component: {fileID: 114497976612575538} + - component: {fileID: 114466777695118778} + m_Layer: 5 + m_Name: Button (Vector) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224551638448215900 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634032914223184} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224521757493125408} + m_Father: {fileID: 224771777543867704} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 192, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222109039500370514 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634032914223184} + m_CullTransparentMesh: 0 +--- !u!114 &114497976612575538 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634032914223184} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114466777695118778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634032914223184} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114497976612575538} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 114333704717712772} + m_MethodName: SpawnVectorNode + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &1672257177029766 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224537265222795724} + - component: {fileID: 114916774455203148} + - component: {fileID: 222087069511792354} + m_Layer: 5 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224537265222795724 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1672257177029766} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224455174510274828} + m_Father: {fileID: 224256572033804734} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114916774455203148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1672257177029766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 224047001452284434} + m_Horizontal: 1 + m_Vertical: 1 + m_MovementType: 0 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.0001 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 224455174510274828} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!222 &222087069511792354 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1672257177029766} + m_CullTransparentMesh: 0 +--- !u!1 &1674209927148012 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224707157113485814} + - component: {fileID: 222221718643348276} + - component: {fileID: 114802485273835158} + - component: {fileID: 114431911548101950} + m_Layer: 5 + m_Name: Button (Display) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224707157113485814 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674209927148012} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224327074136078934} + m_Father: {fileID: 224771777543867704} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -20} + m_SizeDelta: {x: 192, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222221718643348276 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674209927148012} + m_CullTransparentMesh: 0 +--- !u!114 &114802485273835158 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674209927148012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114431911548101950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674209927148012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114802485273835158} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 114333704717712772} + m_MethodName: SpawnDisplayNode + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &1710832145548778 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224047001452284434} + - component: {fileID: 222823838960803884} + - component: {fileID: 114122370601085708} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224047001452284434 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710832145548778} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224771777543867704} + - {fileID: 224331467887983144} + - {fileID: 224060157229491642} + m_Father: {fileID: 224455174510274828} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222823838960803884 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710832145548778} + m_CullTransparentMesh: 0 +--- !u!114 &114122370601085708 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710832145548778} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1718917740015568 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224051206736280880} + - component: {fileID: 222872317455911696} + - component: {fileID: 114395253476299300} + m_Layer: 5 + m_Name: Delete + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224051206736280880 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718917740015568} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224554742420507178} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222872317455911696 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718917740015568} + m_CullTransparentMesh: 0 +--- !u!114 &114395253476299300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718917740015568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Remove + +' +--- !u!1 &1730921489410518 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224554742420507178} + - component: {fileID: 222957444391252682} + - component: {fileID: 114547243162533708} + - component: {fileID: 114010392615286772} + m_Layer: 5 + m_Name: Button (Delete) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224554742420507178 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1730921489410518} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224051206736280880} + m_Father: {fileID: 224331467887983144} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -510.5, y: -252.5} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222957444391252682 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1730921489410518} + m_CullTransparentMesh: 0 +--- !u!114 &114547243162533708 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1730921489410518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114010392615286772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1730921489410518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114547243162533708} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 114526446786066532} + m_MethodName: RemoveNode + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &1734579310063838 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224399615908657694} + - component: {fileID: 222511385192987170} + - component: {fileID: 114017080922181870} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224399615908657694 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734579310063838} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224060157229491642} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: 160, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &222511385192987170 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734579310063838} + m_CullTransparentMesh: 0 +--- !u!114 &114017080922181870 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734579310063838} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Tooltip +--- !u!1 &1797766839847222 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224060157229491642} + - component: {fileID: 222858117550184156} + - component: {fileID: 114980715278893770} + - component: {fileID: 114787439328663822} + - component: {fileID: 225675148032111818} + - component: {fileID: 114563690800516418} + - component: {fileID: 114822799736561310} + - component: {fileID: 114246487511786068} + m_Layer: 5 + m_Name: Tooltip + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224060157229491642 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224399615908657694} + m_Father: {fileID: 224047001452284434} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 516.43, y: -210.20001} + m_SizeDelta: {x: 200, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!222 &222858117550184156 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_CullTransparentMesh: 0 +--- !u!114 &114980715278893770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 0.597, a: 0.528} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114787439328663822 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 0 +--- !u!225 &225675148032111818 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 +--- !u!114 &114563690800516418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114822799736561310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 100 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &114246487511786068 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797766839847222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6ea6060c58096cd4d8c959a427a9b059, type: 3} + m_Name: + m_EditorClassIdentifier: + group: {fileID: 225675148032111818} + label: {fileID: 114017080922181870} +--- !u!1 &1938490410154190 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224771777543867704} + - component: {fileID: 222497677115494560} + - component: {fileID: 114191773214048956} + - component: {fileID: 114435775103397422} + - component: {fileID: 114794564072650832} + - component: {fileID: 114333704717712772} + - component: {fileID: 225097459571521398} + m_Layer: 5 + m_Name: GraphContextMenu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224771777543867704 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224115189799977692} + - {fileID: 224002617184882216} + - {fileID: 224551638448215900} + - {fileID: 224707157113485814} + m_Father: {fileID: 224047001452284434} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 516.43, y: -235.20001} + m_SizeDelta: {x: 200, y: 100} + m_Pivot: {x: 0, y: 1} +--- !u!222 &222497677115494560 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_CullTransparentMesh: 0 +--- !u!114 &114191773214048956 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114435775103397422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_ChildAlignment: 0 + m_Spacing: 2 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 +--- !u!114 &114794564072650832 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!114 &114333704717712772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 402b5de5d75c05445994c83bba07d273, type: 3} + m_Name: + m_EditorClassIdentifier: + group: {fileID: 225097459571521398} + selectedNode: {fileID: 0} +--- !u!225 &225097459571521398 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938490410154190} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab.meta new file mode 100644 index 00000000..e357b662 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/NodeGraph.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 93cd8c9c9c49d5a48a1b48ae3415b91b +timeCreated: 1525818382 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes.meta new file mode 100644 index 00000000..63a5b473 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4df6a8137a1ed174495e29df73cd795f +folderAsset: yes +timeCreated: 1525818390 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab new file mode 100644 index 00000000..1eebc881 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab @@ -0,0 +1,815 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1063730772643432 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224206413851685318} + - component: {fileID: 222383793396297832} + - component: {fileID: 114291101882281026} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224206413851685318 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063730772643432} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224874840061069050} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222383793396297832 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063730772643432} + m_CullTransparentMesh: 0 +--- !u!114 &114291101882281026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063730772643432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Display Value +--- !u!1 &1084463112460962 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224564080930831106} + - component: {fileID: 114319593245711978} + - component: {fileID: 114983036860962382} + m_Layer: 5 + m_Name: Body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224564080930831106 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1084463112460962} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224411668895070732} + - {fileID: 224912831914420478} + m_Father: {fileID: 224785298841643576} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114319593245711978 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1084463112460962} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 2 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 +--- !u!114 &114983036860962382 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1084463112460962} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!1 &1094422009235864 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224874840061069050} + - component: {fileID: 114738213689377746} + - component: {fileID: 114186757388496260} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224874840061069050 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1094422009235864} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224206413851685318} + m_Father: {fileID: 224785298841643576} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114738213689377746 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1094422009235864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d3f4b82da0d484640839efdaf81118b8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114186757388496260 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1094422009235864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 20 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1200727805601860 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224411668895070732} + m_Layer: 5 + m_Name: Input + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224411668895070732 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1200727805601860} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224891389766944898} + - {fileID: 224924195636046264} + m_Father: {fileID: 224564080930831106} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1251706551910640 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224912831914420478} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224912831914420478 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251706551910640} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224070683186375678} + m_Father: {fileID: 224564080930831106} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1251945988277988 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224924195636046264} + - component: {fileID: 222705214186496996} + - component: {fileID: 114099586822934242} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224924195636046264 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251945988277988} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224138597047519026} + - {fileID: 224783137235966372} + m_Father: {fileID: 224411668895070732} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222705214186496996 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251945988277988} + m_CullTransparentMesh: 0 +--- !u!114 &114099586822934242 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251945988277988} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1299545030906486 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224783137235966372} + - component: {fileID: 222373491758694958} + - component: {fileID: 114594317770391210} + - component: {fileID: 114466420426663360} + m_Layer: 5 + m_Name: input + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224783137235966372 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299545030906486} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224924195636046264} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222373491758694958 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299545030906486} + m_CullTransparentMesh: 0 +--- !u!114 &114594317770391210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299545030906486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114466420426663360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299545030906486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: input + node: {fileID: 0} +--- !u!1 &1457671505331600 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224785298841643576} + - component: {fileID: 222692851544594444} + - component: {fileID: 114694063998101204} + - component: {fileID: 114596094228159580} + - component: {fileID: 114818084582578196} + - component: {fileID: 114300031540392060} + m_Layer: 5 + m_Name: DisplayValue + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224785298841643576 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224874840061069050} + - {fileID: 224564080930831106} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -91.5, y: 39.126434} + m_SizeDelta: {x: 200, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!222 &222692851544594444 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_CullTransparentMesh: 0 +--- !u!114 &114694063998101204 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 105d5a0e2ead77c428847ed8572bb93b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114596094228159580 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 8 + m_Bottom: 8 + m_ChildAlignment: 0 + m_Spacing: 4 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114818084582578196 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!114 &114300031540392060 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1457671505331600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 151bec3209e717646b65a9214bc08295, type: 3} + m_Name: + m_EditorClassIdentifier: + node: {fileID: 0} + graph: {fileID: 0} + header: {fileID: 114291101882281026} + label: {fileID: 114644402162490310} +--- !u!1 &1556234573473262 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224891389766944898} + - component: {fileID: 222581870252866348} + - component: {fileID: 114810439027345428} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224891389766944898 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1556234573473262} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224411668895070732} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -42, y: 0} + m_SizeDelta: {x: -84, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222581870252866348 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1556234573473262} + m_CullTransparentMesh: 0 +--- !u!114 &114810439027345428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1556234573473262} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Input +--- !u!1 &1723884935111430 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224138597047519026} + - component: {fileID: 222572228723217760} + - component: {fileID: 114944652667425536} + m_Layer: 5 + m_Name: Port (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224138597047519026 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1723884935111430} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224924195636046264} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222572228723217760 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1723884935111430} + m_CullTransparentMesh: 0 +--- !u!114 &114944652667425536 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1723884935111430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.29350832, g: 0.38024586, b: 0.066857345, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 1 + m_FillAmount: 0.5 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1886807258005856 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224070683186375678} + - component: {fileID: 222150925861779298} + - component: {fileID: 114644402162490310} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224070683186375678 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1886807258005856} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224912831914420478} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222150925861779298 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1886807258005856} + m_CullTransparentMesh: 0 +--- !u!114 &114644402162490310 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1886807258005856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Result diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab.meta new file mode 100644 index 00000000..192d102d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/DisplayValue.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9e82b168e67f1384d82799733341d6f8 +timeCreated: 1525815979 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab new file mode 100644 index 00000000..e34c318c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab @@ -0,0 +1,2759 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1004528088127830 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224097197299264200} + - component: {fileID: 222425236267409506} + - component: {fileID: 114931937975476158} + - component: {fileID: 114224080290421180} + m_Layer: 5 + m_Name: Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &224097197299264200 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1004528088127830} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224723010222354496} + - {fileID: 224159254625289618} + m_Father: {fileID: 224283551619283498} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 0, y: 150} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &222425236267409506 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1004528088127830} + m_CullTransparentMesh: 0 +--- !u!114 &114931937975476158 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1004528088127830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114224080290421180 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1004528088127830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 224104325551478218} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 224723010222354496} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 114016590350288588} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &1111398901492432 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224159254625289618} + - component: {fileID: 222676831642664184} + - component: {fileID: 114817159991368794} + - component: {fileID: 114016590350288588} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224159254625289618 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1111398901492432} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224214298415881748} + m_Father: {fileID: 224097197299264200} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!222 &222676831642664184 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1111398901492432} + m_CullTransparentMesh: 0 +--- !u!114 &114817159991368794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1111398901492432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114016590350288588 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1111398901492432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114573636399100602} + m_HandleRect: {fileID: 224506617371454942} + m_Direction: 2 + m_Value: 0 + m_Size: 0.2 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &1209229313144122 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224500269664915212} + - component: {fileID: 222411211355111218} + - component: {fileID: 114123990555266112} + m_Layer: 5 + m_Name: Item Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224500269664915212 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1209229313144122} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224862823282276960} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 5, y: -0.5} + m_SizeDelta: {x: -30, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222411211355111218 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1209229313144122} + m_CullTransparentMesh: 0 +--- !u!114 &114123990555266112 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1209229313144122} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Option A +--- !u!1 &1215165281341172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224214298415881748} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224214298415881748 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1215165281341172} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224506617371454942} + m_Father: {fileID: 224159254625289618} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1218422892560390 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224686446659909710} + m_Layer: 5 + m_Name: Output + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224686446659909710 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218422892560390} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224458587306372646} + - {fileID: 224897363529277388} + m_Father: {fileID: 224223861966153486} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1246332141565224 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224481633101319356} + - component: {fileID: 222164699881995892} + - component: {fileID: 114601806951785616} + m_Layer: 5 + m_Name: Item Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224481633101319356 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1246332141565224} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224862823282276960} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222164699881995892 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1246332141565224} + m_CullTransparentMesh: 0 +--- !u!114 &114601806951785616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1246332141565224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1253847035942568 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224520350227254470} + m_Layer: 5 + m_Name: EnumProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224520350227254470 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1253847035942568} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224608278901931642} + - {fileID: 224283551619283498} + m_Father: {fileID: 224223861966153486} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1254172840210442 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224637057621050262} + - component: {fileID: 222070408837677356} + - component: {fileID: 114437491928475828} + - component: {fileID: 114051425137983550} + m_Layer: 5 + m_Name: b + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224637057621050262 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254172840210442} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224127699692185830} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222070408837677356 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254172840210442} + m_CullTransparentMesh: 0 +--- !u!114 &114437491928475828 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254172840210442} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114051425137983550 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254172840210442} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: b + node: {fileID: 0} +--- !u!1 &1290704875425382 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224311444752037216} + - component: {fileID: 222088916721982582} + - component: {fileID: 114214595425573086} + - component: {fileID: 114829536489819236} + m_Layer: 5 + m_Name: a + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224311444752037216 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1290704875425382} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224598205021815032} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222088916721982582 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1290704875425382} + m_CullTransparentMesh: 0 +--- !u!114 &114214595425573086 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1290704875425382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114829536489819236 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1290704875425382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: a + node: {fileID: 0} +--- !u!1 &1299025257513770 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224223861966153486} + - component: {fileID: 114106192783608360} + - component: {fileID: 114931825254550348} + m_Layer: 5 + m_Name: Body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224223861966153486 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299025257513770} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224476546001273506} + - {fileID: 224465761096458102} + - {fileID: 224686446659909710} + - {fileID: 224520350227254470} + m_Father: {fileID: 224808755397884742} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114106192783608360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299025257513770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 2 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 +--- !u!114 &114931825254550348 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299025257513770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!1 &1324638397227144 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224334622823080502} + - component: {fileID: 222347201823056090} + - component: {fileID: 114078391553309720} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224334622823080502 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324638397227144} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224465761096458102} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222347201823056090 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324638397227144} + m_CullTransparentMesh: 0 +--- !u!114 &114078391553309720 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324638397227144} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: B +--- !u!1 &1399594084150066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224506617371454942} + - component: {fileID: 222568416947915960} + - component: {fileID: 114573636399100602} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224506617371454942 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399594084150066} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224214298415881748} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.2} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222568416947915960 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399594084150066} + m_CullTransparentMesh: 0 +--- !u!114 &114573636399100602 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399594084150066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1413820031525212 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224832805378533456} + - component: {fileID: 222357133852905262} + - component: {fileID: 114793607099774102} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224832805378533456 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1413820031525212} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224057946066154690} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222357133852905262 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1413820031525212} + m_CullTransparentMesh: 0 +--- !u!114 &114793607099774102 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1413820031525212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Math Node +--- !u!1 &1444812037673254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224458587306372646} + - component: {fileID: 222284887123578026} + - component: {fileID: 114716328747617300} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224458587306372646 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1444812037673254} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224686446659909710} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222284887123578026 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1444812037673254} + m_CullTransparentMesh: 0 +--- !u!114 &114716328747617300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1444812037673254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 2 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Result +--- !u!1 &1458458709148244 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224743806517306460} + - component: {fileID: 222429734168623296} + - component: {fileID: 114075372595275334} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224743806517306460 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1458458709148244} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224476546001273506} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222429734168623296 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1458458709148244} + m_CullTransparentMesh: 0 +--- !u!114 &114075372595275334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1458458709148244} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: A +--- !u!1 &1468010523511640 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224665146012347518} + - component: {fileID: 222554144660646996} + - component: {fileID: 114742627317500872} + - component: {fileID: 114271295552568400} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224665146012347518 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1468010523511640} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224957544687527936} + m_Father: {fileID: 224476546001273506} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222554144660646996 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1468010523511640} + m_CullTransparentMesh: 0 +--- !u!114 &114742627317500872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1468010523511640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114271295552568400 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1468010523511640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114742627317500872} + m_TextComponent: {fileID: 114702532274693260} + m_Placeholder: {fileID: 0} + m_ContentType: 3 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 2 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 2 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: 0.32 + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!1 &1518999759705154 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224057946066154690} + - component: {fileID: 114126354508387900} + - component: {fileID: 114738280979331030} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224057946066154690 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518999759705154} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224832805378533456} + m_Father: {fileID: 224808755397884742} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114126354508387900 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518999759705154} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d3f4b82da0d484640839efdaf81118b8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114738280979331030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518999759705154} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 20 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1538381257476566 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224957544687527936} + - component: {fileID: 222858345911544680} + - component: {fileID: 114702532274693260} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224957544687527936 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538381257476566} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224665146012347518} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222858345911544680 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538381257476566} + m_CullTransparentMesh: 0 +--- !u!114 &114702532274693260 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538381257476566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: +--- !u!1 &1595855132016706 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224476546001273506} + m_Layer: 5 + m_Name: FloatProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224476546001273506 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1595855132016706} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224743806517306460} + - {fileID: 224665146012347518} + - {fileID: 224598205021815032} + m_Father: {fileID: 224223861966153486} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1632656846953254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224104325551478218} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224104325551478218 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1632656846953254} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224862823282276960} + m_Father: {fileID: 224723010222354496} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 28} + m_Pivot: {x: 0.5, y: 1} +--- !u!1 &1658702316966384 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224806976072166056} + - component: {fileID: 222190073266348040} + - component: {fileID: 114518701957225104} + m_Layer: 5 + m_Name: Item Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224806976072166056 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658702316966384} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224862823282276960} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222190073266348040 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658702316966384} + m_CullTransparentMesh: 0 +--- !u!114 &114518701957225104 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658702316966384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1676333992032258 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224111220540512302} + - component: {fileID: 222757426797109968} + - component: {fileID: 114973787613337498} + - component: {fileID: 114925279352983948} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224111220540512302 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1676333992032258} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224918267294993680} + m_Father: {fileID: 224465761096458102} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222757426797109968 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1676333992032258} + m_CullTransparentMesh: 0 +--- !u!114 &114973787613337498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1676333992032258} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114925279352983948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1676333992032258} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114973787613337498} + m_TextComponent: {fileID: 114583536942749334} + m_Placeholder: {fileID: 0} + m_ContentType: 3 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 2 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 2 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: 0.53 + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!1 &1695973076677334 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224598205021815032} + - component: {fileID: 222658696017613434} + - component: {fileID: 114532467380840992} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224598205021815032 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695973076677334} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224311444752037216} + m_Father: {fileID: 224476546001273506} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222658696017613434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695973076677334} + m_CullTransparentMesh: 0 +--- !u!114 &114532467380840992 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695973076677334} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1728308470988228 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224744719153536446} + - component: {fileID: 222575931281088520} + - component: {fileID: 114512830623023508} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224744719153536446 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728308470988228} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224283551619283498} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -7.5, y: -0.5} + m_SizeDelta: {x: -35, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222575931281088520 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728308470988228} + m_CullTransparentMesh: 0 +--- !u!114 &114512830623023508 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728308470988228} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Add +--- !u!1 &1732978593555718 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224918267294993680} + - component: {fileID: 222689212983016120} + - component: {fileID: 114583536942749334} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224918267294993680 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732978593555718} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224111220540512302} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222689212983016120 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732978593555718} + m_CullTransparentMesh: 0 +--- !u!114 &114583536942749334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732978593555718} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: +--- !u!1 &1748579019798086 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224808755397884742} + - component: {fileID: 222424362798663936} + - component: {fileID: 114335710487695362} + - component: {fileID: 114153987647402982} + - component: {fileID: 114975810007284298} + - component: {fileID: 114056545184363226} + m_Layer: 5 + m_Name: MathNode + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224808755397884742 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224057946066154690} + - {fileID: 224223861966153486} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 66.5, y: -2.4} + m_SizeDelta: {x: 200, y: 119.91} + m_Pivot: {x: 0, y: 1} +--- !u!222 &222424362798663936 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_CullTransparentMesh: 0 +--- !u!114 &114335710487695362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 105d5a0e2ead77c428847ed8572bb93b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114153987647402982 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 8 + m_Bottom: 8 + m_ChildAlignment: 0 + m_Spacing: 4 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114975810007284298 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!114 &114056545184363226 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748579019798086} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f9595458c0d990a458724e20b81b5637, type: 3} + m_Name: + m_EditorClassIdentifier: + node: {fileID: 0} + graph: {fileID: 0} + header: {fileID: 114793607099774102} + valA: {fileID: 114271295552568400} + valB: {fileID: 114925279352983948} + dropDown: {fileID: 114591900377971610} +--- !u!1 &1749157135916380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224283551619283498} + - component: {fileID: 222242444179594958} + - component: {fileID: 114867098757934702} + - component: {fileID: 114591900377971610} + m_Layer: 5 + m_Name: Dropdown + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224283551619283498 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1749157135916380} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224744719153536446} + - {fileID: 224067718968490978} + - {fileID: 224097197299264200} + m_Father: {fileID: 224520350227254470} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222242444179594958 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1749157135916380} + m_CullTransparentMesh: 0 +--- !u!114 &114867098757934702 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1749157135916380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114591900377971610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1749157135916380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114867098757934702} + m_Template: {fileID: 224097197299264200} + m_CaptionText: {fileID: 114512830623023508} + m_CaptionImage: {fileID: 0} + m_ItemText: {fileID: 114123990555266112} + m_ItemImage: {fileID: 0} + m_Value: 0 + m_Options: + m_Options: + - m_Text: Add + m_Image: {fileID: 0} + - m_Text: Subtract + m_Image: {fileID: 0} + - m_Text: Multply + m_Image: {fileID: 0} + - m_Text: Divide + m_Image: {fileID: 0} + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &1806097225651252 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224465761096458102} + m_Layer: 5 + m_Name: FloatProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224465761096458102 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1806097225651252} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224334622823080502} + - {fileID: 224111220540512302} + - {fileID: 224127699692185830} + m_Father: {fileID: 224223861966153486} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1822755053354808 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224067718968490978} + - component: {fileID: 222760339147030770} + - component: {fileID: 114575440801921710} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224067718968490978 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822755053354808} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224283551619283498} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222760339147030770 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822755053354808} + m_CullTransparentMesh: 0 +--- !u!114 &114575440801921710 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822755053354808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1857090747325602 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224619599164791978} + - component: {fileID: 222788036146112870} + - component: {fileID: 114602547539355322} + - component: {fileID: 114963067717371464} + m_Layer: 5 + m_Name: result + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224619599164791978 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857090747325602} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224897363529277388} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222788036146112870 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857090747325602} + m_CullTransparentMesh: 0 +--- !u!114 &114602547539355322 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857090747325602} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114963067717371464 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857090747325602} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: result + node: {fileID: 0} +--- !u!1 &1861819573484644 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224897363529277388} + - component: {fileID: 222031922388320372} + - component: {fileID: 114721324640144304} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224897363529277388 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1861819573484644} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224619599164791978} + m_Father: {fileID: 224686446659909710} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222031922388320372 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1861819573484644} + m_CullTransparentMesh: 0 +--- !u!114 &114721324640144304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1861819573484644} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1864109450240564 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224723010222354496} + - component: {fileID: 114430020129389554} + - component: {fileID: 222864376156644684} + - component: {fileID: 114250055965603752} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224723010222354496 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1864109450240564} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224104325551478218} + m_Father: {fileID: 224097197299264200} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -18, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &114430020129389554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1864109450240564} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!222 &222864376156644684 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1864109450240564} + m_CullTransparentMesh: 0 +--- !u!114 &114250055965603752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1864109450240564} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1889314793016040 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224608278901931642} + - component: {fileID: 222804454985414570} + - component: {fileID: 114593859222903144} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224608278901931642 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1889314793016040} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224520350227254470} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222804454985414570 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1889314793016040} + m_CullTransparentMesh: 0 +--- !u!114 &114593859222903144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1889314793016040} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Math Type +--- !u!1 &1971333158930998 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224127699692185830} + - component: {fileID: 222930221442652788} + - component: {fileID: 114223491287201354} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224127699692185830 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971333158930998} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224637057621050262} + m_Father: {fileID: 224465761096458102} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222930221442652788 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971333158930998} + m_CullTransparentMesh: 0 +--- !u!114 &114223491287201354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971333158930998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1994901382513188 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224862823282276960} + - component: {fileID: 114152635354106728} + m_Layer: 5 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224862823282276960 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1994901382513188} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224481633101319356} + - {fileID: 224806976072166056} + - {fileID: 224500269664915212} + m_Father: {fileID: 224104325551478218} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &114152635354106728 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1994901382513188} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114601806951785616} + toggleTransition: 1 + graphic: {fileID: 114518701957225104} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab.meta new file mode 100644 index 00000000..560a99af --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/MathNode.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4feddbc48021f37449adc6b750f91afa +timeCreated: 1525813474 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab new file mode 100644 index 00000000..ff0f242b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab @@ -0,0 +1,2091 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1015460128384768 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224351252973763242} + - component: {fileID: 222505271851528660} + - component: {fileID: 114767906168699218} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224351252973763242 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015460128384768} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224673952806231602} + m_Father: {fileID: 224008639048431020} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222505271851528660 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015460128384768} + m_CullTransparentMesh: 0 +--- !u!114 &114767906168699218 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015460128384768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.29350832, g: 0.38024586, b: 0.066857345, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1069590160782378 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224008639048431020} + m_Layer: 5 + m_Name: Output + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224008639048431020 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1069590160782378} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224990797329245514} + - {fileID: 224351252973763242} + m_Father: {fileID: 224577300214448952} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1119284330502210 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224787194044687560} + - component: {fileID: 222452330640265794} + - component: {fileID: 114732326317441118} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224787194044687560 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1119284330502210} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224222201073283050} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222452330640265794 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1119284330502210} + m_CullTransparentMesh: 0 +--- !u!114 &114732326317441118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1119284330502210} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Z +--- !u!1 &1138614632077000 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224565723540351600} + - component: {fileID: 222236204925780646} + - component: {fileID: 114774402792345564} + - component: {fileID: 114772955078810982} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224565723540351600 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1138614632077000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224329569113032452} + m_Father: {fileID: 224222201073283050} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222236204925780646 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1138614632077000} + m_CullTransparentMesh: 0 +--- !u!114 &114774402792345564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1138614632077000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114772955078810982 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1138614632077000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114774402792345564} + m_TextComponent: {fileID: 114898625559682194} + m_Placeholder: {fileID: 0} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: 0.53 + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!1 &1251899822965418 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224031354056572434} + m_Layer: 5 + m_Name: FloatProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224031354056572434 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1251899822965418} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224525157045397654} + - {fileID: 224110291499804394} + - {fileID: 224901500202789200} + m_Father: {fileID: 224577300214448952} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1269516562594232 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224525157045397654} + - component: {fileID: 222211165427198142} + - component: {fileID: 114335798096160570} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224525157045397654 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1269516562594232} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224031354056572434} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222211165427198142 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1269516562594232} + m_CullTransparentMesh: 0 +--- !u!114 &114335798096160570 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1269516562594232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: X +--- !u!1 &1277003857922084 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224165978965162296} + - component: {fileID: 222379865173276430} + - component: {fileID: 114465812833789814} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224165978965162296 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277003857922084} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224718894057542000} + m_Father: {fileID: 224222201073283050} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222379865173276430 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277003857922084} + m_CullTransparentMesh: 0 +--- !u!114 &114465812833789814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277003857922084} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1295784128558782 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224990797329245514} + - component: {fileID: 222761241316514048} + - component: {fileID: 114641087120111354} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224990797329245514 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1295784128558782} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224008639048431020} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222761241316514048 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1295784128558782} + m_CullTransparentMesh: 0 +--- !u!114 &114641087120111354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1295784128558782} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 2 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Vector +--- !u!1 &1298018867706454 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224242729401345464} + - component: {fileID: 222847081962727056} + - component: {fileID: 114206691159009534} + - component: {fileID: 114589699403605908} + m_Layer: 5 + m_Name: x + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224242729401345464 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1298018867706454} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224901500202789200} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222847081962727056 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1298018867706454} + m_CullTransparentMesh: 0 +--- !u!114 &114206691159009534 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1298018867706454} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114589699403605908 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1298018867706454} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: x + node: {fileID: 0} +--- !u!1 &1309738924597176 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224297568559142818} + - component: {fileID: 222644739961307276} + - component: {fileID: 114788813935369812} + - component: {fileID: 114255838567478916} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224297568559142818 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1309738924597176} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224461964084293024} + m_Father: {fileID: 224957762719044464} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222644739961307276 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1309738924597176} + m_CullTransparentMesh: 0 +--- !u!114 &114788813935369812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1309738924597176} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114255838567478916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1309738924597176} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114788813935369812} + m_TextComponent: {fileID: 114747632436395246} + m_Placeholder: {fileID: 0} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: 0.53 + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!1 &1354902888206120 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224222201073283050} + m_Layer: 5 + m_Name: FloatProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224222201073283050 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1354902888206120} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224787194044687560} + - {fileID: 224565723540351600} + - {fileID: 224165978965162296} + m_Father: {fileID: 224577300214448952} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1371958437240464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224110291499804394} + - component: {fileID: 222299497633961274} + - component: {fileID: 114471484911902260} + - component: {fileID: 114456529856717930} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224110291499804394 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1371958437240464} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224816133835580304} + m_Father: {fileID: 224031354056572434} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222299497633961274 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1371958437240464} + m_CullTransparentMesh: 0 +--- !u!114 &114471484911902260 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1371958437240464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114456529856717930 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1371958437240464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114471484911902260} + m_TextComponent: {fileID: 114288609188130876} + m_Placeholder: {fileID: 0} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: 0.32 + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!1 &1491554490708046 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224957762719044464} + m_Layer: 5 + m_Name: FloatProperty + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224957762719044464 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1491554490708046} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224138252972511240} + - {fileID: 224297568559142818} + - {fileID: 224772973337764014} + m_Father: {fileID: 224577300214448952} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1495327195063286 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224718894057542000} + - component: {fileID: 222897571479884622} + - component: {fileID: 114919450647516184} + - component: {fileID: 114210633888700720} + m_Layer: 5 + m_Name: z + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224718894057542000 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495327195063286} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224165978965162296} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222897571479884622 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495327195063286} + m_CullTransparentMesh: 0 +--- !u!114 &114919450647516184 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495327195063286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114210633888700720 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495327195063286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: z + node: {fileID: 0} +--- !u!1 &1530299206478764 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224398939986762190} + - component: {fileID: 114449448551818232} + - component: {fileID: 114572448728824570} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224398939986762190 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1530299206478764} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224440163384519434} + m_Father: {fileID: 224082841979064698} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114449448551818232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1530299206478764} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d3f4b82da0d484640839efdaf81118b8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114572448728824570 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1530299206478764} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 20 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1581311145126224 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224138252972511240} + - component: {fileID: 222604547430035256} + - component: {fileID: 114918305740389326} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224138252972511240 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1581311145126224} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224957762719044464} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222604547430035256 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1581311145126224} + m_CullTransparentMesh: 0 +--- !u!114 &114918305740389326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1581311145126224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Y +--- !u!1 &1588195666821976 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224772973337764014} + - component: {fileID: 222136101950795896} + - component: {fileID: 114659485103444416} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224772973337764014 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588195666821976} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224674388232685748} + m_Father: {fileID: 224957762719044464} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222136101950795896 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588195666821976} + m_CullTransparentMesh: 0 +--- !u!114 &114659485103444416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588195666821976} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1645095834278716 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224901500202789200} + - component: {fileID: 222572115702834044} + - component: {fileID: 114962149903563542} + m_Layer: 5 + m_Name: Port + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224901500202789200 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645095834278716} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224242729401345464} + m_Father: {fileID: 224031354056572434} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222572115702834044 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645095834278716} + m_CullTransparentMesh: 0 +--- !u!114 &114962149903563542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645095834278716} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.7312668, g: 0.5270179, b: 0.54772156, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e8cf87ddc81cfee4b8417b635e25177b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &1648513598338774 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224674388232685748} + - component: {fileID: 222650682464953506} + - component: {fileID: 114840987678405674} + - component: {fileID: 114236795218135448} + m_Layer: 5 + m_Name: y + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224674388232685748 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1648513598338774} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224772973337764014} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222650682464953506 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1648513598338774} + m_CullTransparentMesh: 0 +--- !u!114 &114840987678405674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1648513598338774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114236795218135448 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1648513598338774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: y + node: {fileID: 0} +--- !u!1 &1694899202362220 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224082841979064698} + - component: {fileID: 222216463613423264} + - component: {fileID: 114658833664138292} + - component: {fileID: 114212773683170394} + - component: {fileID: 114638840566758834} + - component: {fileID: 114898082577364016} + m_Layer: 5 + m_Name: Vector + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224082841979064698 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224398939986762190} + - {fileID: 224577300214448952} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -91.5, y: 39.126434} + m_SizeDelta: {x: 200, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!222 &222216463613423264 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_CullTransparentMesh: 0 +--- !u!114 &114658833664138292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 105d5a0e2ead77c428847ed8572bb93b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114212773683170394 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 8 + m_Bottom: 8 + m_ChildAlignment: 0 + m_Spacing: 4 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114638840566758834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!114 &114898082577364016 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694899202362220} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8f91529775ea04f4681f3f03df79e870, type: 3} + m_Name: + m_EditorClassIdentifier: + node: {fileID: 0} + graph: {fileID: 0} + header: {fileID: 114675622506652126} + valX: {fileID: 114456529856717930} + valY: {fileID: 114255838567478916} + valZ: {fileID: 114772955078810982} +--- !u!1 &1696325040060250 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224461964084293024} + - component: {fileID: 222604701248167800} + - component: {fileID: 114747632436395246} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224461964084293024 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1696325040060250} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224297568559142818} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222604701248167800 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1696325040060250} + m_CullTransparentMesh: 0 +--- !u!114 &114747632436395246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1696325040060250} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: +--- !u!1 &1728198620354036 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224577300214448952} + - component: {fileID: 114464341413138534} + - component: {fileID: 114223781772078866} + m_Layer: 5 + m_Name: Body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224577300214448952 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728198620354036} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224031354056572434} + - {fileID: 224957762719044464} + - {fileID: 224222201073283050} + - {fileID: 224008639048431020} + m_Father: {fileID: 224082841979064698} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &114464341413138534 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728198620354036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 8 + m_Right: 8 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 2 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 +--- !u!114 &114223781772078866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728198620354036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!1 &1789008041133680 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224329569113032452} + - component: {fileID: 222767819792431552} + - component: {fileID: 114898625559682194} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224329569113032452 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1789008041133680} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224565723540351600} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222767819792431552 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1789008041133680} + m_CullTransparentMesh: 0 +--- !u!114 &114898625559682194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1789008041133680} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: +--- !u!1 &1822288204503682 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224440163384519434} + - component: {fileID: 222167908138033502} + - component: {fileID: 114675622506652126} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224440163384519434 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822288204503682} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224398939986762190} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222167908138033502 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822288204503682} + m_CullTransparentMesh: 0 +--- !u!114 &114675622506652126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822288204503682} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Vector +--- !u!1 &1822368795461446 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224673952806231602} + - component: {fileID: 222461025608905708} + - component: {fileID: 114803254194713868} + - component: {fileID: 114927637396102672} + m_Layer: 5 + m_Name: vector + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224673952806231602 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822368795461446} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224351252973763242} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222461025608905708 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822368795461446} + m_CullTransparentMesh: 0 +--- !u!114 &114803254194713868 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822368795461446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3529412, g: 0.38431376, b: 0.40784317, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 935eabc21488fa749abf5308640a4ba1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &114927637396102672 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1822368795461446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c005fc401e40f42b1e76d5ffc80292, type: 3} + m_Name: + m_EditorClassIdentifier: + fieldName: vector + node: {fileID: 0} +--- !u!1 &1857170562718150 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 224816133835580304} + - component: {fileID: 222570877475700354} + - component: {fileID: 114288609188130876} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224816133835580304 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857170562718150} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224110291499804394} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &222570877475700354 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857170562718150} + m_CullTransparentMesh: 0 +--- !u!114 &114288609188130876 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1857170562718150} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab.meta new file mode 100644 index 00000000..8ba241cf --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Prefabs/Nodes/Vector.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85f77ac8ea4840c4a982e2197715bf6f +timeCreated: 1525816131 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes.meta new file mode 100644 index 00000000..5c8e626b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 51aca6355d0176d4a9de10207f170a0f +folderAsset: yes +timeCreated: 1525605250 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity new file mode 100644 index 00000000..a61fbffd --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity @@ -0,0 +1,628 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &33301364 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 33301368} + - component: {fileID: 33301367} + - component: {fileID: 33301366} + - component: {fileID: 33301365} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &33301365 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33301364} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &33301366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33301364} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &33301367 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33301364} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &33301368 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33301364} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1815881478} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &94983508 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 94983513} + - component: {fileID: 94983512} + - component: {fileID: 94983511} + - component: {fileID: 94983510} + - component: {fileID: 94983509} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &94983509 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 94983508} + m_Enabled: 1 +--- !u!124 &94983510 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 94983508} + m_Enabled: 1 +--- !u!92 &94983511 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 94983508} + m_Enabled: 1 +--- !u!20 &94983512 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 94983508} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &94983513 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 94983508} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &575526055 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 33301368} + m_Modifications: + - target: {fileID: 224002617184882216, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 224002617184882216, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -19 + objectReference: {fileID: 0} + - target: {fileID: 224060157229491642, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224060157229491642, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224115189799977692, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -50 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224331467887983144, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224331467887983144, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224399615908657694, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 224551638448215900, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -51 + objectReference: {fileID: 0} + - target: {fileID: 224554742420507178, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 224554742420507178, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -19 + objectReference: {fileID: 0} + - target: {fileID: 224707157113485814, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -83 + objectReference: {fileID: 0} + - target: {fileID: 224771777543867704, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224771777543867704, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224909489589417492, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + propertyPath: m_LocalPosition.y + value: -51 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, type: 3} +--- !u!1 &996803678 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 996803681} + - component: {fileID: 996803680} + - component: {fileID: 996803679} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &996803679 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996803678} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &996803680 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996803678} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &996803681 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996803678} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1265667114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1265667116} + - component: {fileID: 1265667115} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1265667115 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265667114} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1265667116 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265667114} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!224 &1815881478 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 224256572033804734, guid: 93cd8c9c9c49d5a48a1b48ae3415b91b, + type: 3} + m_PrefabInstance: {fileID: 575526055} + m_PrefabAsset: {fileID: 0} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity.meta new file mode 100644 index 00000000..6d14b52e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scenes/RuntimeGraph.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 58c9f16d3dd0a2349b49ab4a6e83a2d1 +timeCreated: 1525605251 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts.meta new file mode 100644 index 00000000..2b1d753f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5015730ed7e9ddb43b21c2d35f15b1cb +folderAsset: yes +timeCreated: 1525604672 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs new file mode 100644 index 00000000..ac4e889b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode; + +namespace XNode.Examples.RuntimeMathNodes { + public class Connection : MonoBehaviour { + private RectTransform rectTransform; + public void SetPosition(Vector2 start, Vector2 end) { + if (!rectTransform) rectTransform = (RectTransform) transform; + transform.position = (start + end) * 0.5f; + + float r = Mathf.Atan2(start.y - end.y, start.x - end.x) * Mathf.Rad2Deg; + transform.rotation = Quaternion.Euler(0, 0, r); + rectTransform.sizeDelta = new Vector2(Vector2.Distance(start, end), rectTransform.sizeDelta.y); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs.meta new file mode 100644 index 00000000..bb46d546 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/Connection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 656e34b375c2eb64991ee74b5f01bd13 +timeCreated: 1525819160 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs new file mode 100644 index 00000000..96ba753d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs @@ -0,0 +1,40 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace XNode.Examples.RuntimeMathNodes { + public class NodeDrag : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler { + private Vector3 offset; + private UGUIMathBaseNode node; + + private void Awake() { + node = GetComponentInParent<UGUIMathBaseNode>(); + } + + public void OnDrag(PointerEventData eventData) { + node.transform.localPosition = node.graph.scrollRect.content.InverseTransformPoint(eventData.position) - offset; + } + + public void OnBeginDrag(PointerEventData eventData) { + Vector2 pointer = node.graph.scrollRect.content.InverseTransformPoint(eventData.position); + Vector2 pos = node.transform.localPosition; + offset = pointer - pos; + } + + public void OnEndDrag(PointerEventData eventData) { + node.transform.localPosition = node.graph.scrollRect.content.InverseTransformPoint(eventData.position) - offset; + Vector2 pos = node.transform.localPosition; + pos.y = -pos.y; + node.node.position = pos; + } + + public void OnPointerClick(PointerEventData eventData) { + if (eventData.button != PointerEventData.InputButton.Right) + return; + + node.graph.nodeContextMenu.selectedNode = node.node; + node.graph.nodeContextMenu.OpenAt(eventData.position); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs.meta new file mode 100644 index 00000000..30ca3d52 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/NodeDrag.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d3f4b82da0d484640839efdaf81118b8 +timeCreated: 1525909194 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs new file mode 100644 index 00000000..f1b39b9b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; +using XNode.Examples.MathNodes; + +namespace XNode.Examples.RuntimeMathNodes { + public class RuntimeMathGraph : MonoBehaviour, IPointerClickHandler { + [Header("Graph")] + public MathGraph graph; + [Header("Prefabs")] + public XNode.Examples.RuntimeMathNodes.UGUIMathNode runtimeMathNodePrefab; + public XNode.Examples.RuntimeMathNodes.UGUIVector runtimeVectorPrefab; + public XNode.Examples.RuntimeMathNodes.UGUIDisplayValue runtimeDisplayValuePrefab; + public XNode.Examples.RuntimeMathNodes.Connection runtimeConnectionPrefab; + [Header("References")] + public UGUIContextMenu graphContextMenu; + public UGUIContextMenu nodeContextMenu; + public UGUITooltip tooltip; + + public ScrollRect scrollRect { get; private set; } + private List<UGUIMathBaseNode> nodes; + + private void Awake() { + // Create a clone so we don't modify the original asset + graph = graph.Copy() as MathGraph; + scrollRect = GetComponentInChildren<ScrollRect>(); + graphContextMenu.onClickSpawn -= SpawnNode; + graphContextMenu.onClickSpawn += SpawnNode; + } + + private void Start() { + SpawnGraph(); + } + + public void Refresh() { + Clear(); + SpawnGraph(); + } + + public void Clear() { + for (int i = nodes.Count - 1; i >= 0; i--) { + Destroy(nodes[i].gameObject); + } + nodes.Clear(); + } + + public void SpawnGraph() { + if (nodes != null) nodes.Clear(); + else nodes = new List<UGUIMathBaseNode>(); + + for (int i = 0; i < graph.nodes.Count; i++) { + Node node = graph.nodes[i]; + + UGUIMathBaseNode runtimeNode = null; + if (node is XNode.Examples.MathNodes.MathNode) { + runtimeNode = Instantiate(runtimeMathNodePrefab); + } else if (node is XNode.Examples.MathNodes.Vector) { + runtimeNode = Instantiate(runtimeVectorPrefab); + } else if (node is XNode.Examples.MathNodes.DisplayValue) { + runtimeNode = Instantiate(runtimeDisplayValuePrefab); + } + runtimeNode.transform.SetParent(scrollRect.content); + runtimeNode.node = node; + runtimeNode.graph = this; + nodes.Add(runtimeNode); + } + } + + public UGUIMathBaseNode GetRuntimeNode(Node node) { + for (int i = 0; i < nodes.Count; i++) { + if (nodes[i].node == node) { + return nodes[i]; + } else { } + } + return null; + } + + public void SpawnNode(Type type, Vector2 position) { + Node node = graph.AddNode(type); + node.name = type.Name; + node.position = position; + Refresh(); + } + + public void OnPointerClick(PointerEventData eventData) { + if (eventData.button != PointerEventData.InputButton.Right) + return; + + graphContextMenu.OpenAt(eventData.position); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs.meta new file mode 100644 index 00000000..7aac1ef6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeMathGraph.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f58f5c7a27d48e34fb5180e77697e866 +timeCreated: 1525811971 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes.meta new file mode 100644 index 00000000..d26d8b02 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e934323f65742a4ebcabeebb8da2f92 +folderAsset: yes +timeCreated: 1525818451 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs new file mode 100644 index 00000000..da5e4c20 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using XNode.Examples.MathNodes; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIDisplayValue : UGUIMathBaseNode { + public Text label; + + void Update() { + DisplayValue displayValue = node as DisplayValue; + object obj = displayValue.GetInputValue<object>("input"); + if (obj != null) label.text = obj.ToString(); + else label.text = "n/a"; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs.meta new file mode 100644 index 00000000..d8904cf3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIDisplayValue.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 151bec3209e717646b65a9214bc08295 +timeCreated: 1525812043 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs new file mode 100644 index 00000000..8b9c6496 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs @@ -0,0 +1,49 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; +using XNode.Examples.MathNodes; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIMathBaseNode : MonoBehaviour, IDragHandler { + [HideInInspector] public Node node; + [HideInInspector] public RuntimeMathGraph graph; + public Text header; + + private UGUIPort[] ports; + + public virtual void Start() { + ports = GetComponentsInChildren<UGUIPort>(); + foreach (UGUIPort port in ports) port.node = node; + header.text = node.name; + SetPosition(node.position); + } + + public virtual void UpdateGUI() { } + + private void LateUpdate() { + foreach (UGUIPort port in ports) port.UpdateConnectionTransforms(); + } + + public UGUIPort GetPort(string name) { + for (int i = 0; i < ports.Length; i++) { + if (ports[i].name == name) return ports[i]; + } + return null; + } + + public void SetPosition(Vector2 pos) { + pos.y = -pos.y; + transform.localPosition = pos; + } + + public void SetName(string name) { + header.text = name; + } + + public void OnDrag(PointerEventData eventData) { + + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs.meta new file mode 100644 index 00000000..a874bda3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathBaseNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f09009dde769a3845a66ded688a8f8dd +timeCreated: 1525812043 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs new file mode 100644 index 00000000..76c2663e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs @@ -0,0 +1,48 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using XNode.Examples.MathNodes; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIMathNode : UGUIMathBaseNode { + public InputField valA; + public InputField valB; + public Dropdown dropDown; + + private MathNode mathNode; + + public override void Start() { + base.Start(); + mathNode = node as MathNode; + + valA.onValueChanged.AddListener(OnChangeValA); + valB.onValueChanged.AddListener(OnChangeValB); + dropDown.onValueChanged.AddListener(OnChangeDropdown); + UpdateGUI(); + } + + public override void UpdateGUI() { + NodePort portA = node.GetInputPort("a"); + NodePort portB = node.GetInputPort("b"); + valA.gameObject.SetActive(!portA.IsConnected); + valB.gameObject.SetActive(!portB.IsConnected); + + valA.text = mathNode.a.ToString(); + valB.text = mathNode.b.ToString(); + dropDown.value = (int) mathNode.mathType; + } + + private void OnChangeValA(string val) { + mathNode.a = float.Parse(valA.text); + } + + private void OnChangeValB(string val) { + mathNode.b = float.Parse(valB.text); + } + + private void OnChangeDropdown(int val) { + mathNode.mathType = (MathNode.MathType) val; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs.meta new file mode 100644 index 00000000..2754d28b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIMathNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f9595458c0d990a458724e20b81b5637 +timeCreated: 1525812043 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs new file mode 100644 index 00000000..ca517a3e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs @@ -0,0 +1,51 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using XNode.Examples.MathNodes; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIVector : UGUIMathBaseNode { + public InputField valX; + public InputField valY; + public InputField valZ; + + private Vector vectorNode; + + public override void Start() { + base.Start(); + vectorNode = node as Vector; + + valX.onValueChanged.AddListener(OnChangeValX); + valY.onValueChanged.AddListener(OnChangeValY); + valZ.onValueChanged.AddListener(OnChangeValZ); + UpdateGUI(); + } + + public override void UpdateGUI() { + NodePort portX = node.GetInputPort("x"); + NodePort portY = node.GetInputPort("y"); + NodePort portZ = node.GetInputPort("z"); + valX.gameObject.SetActive(!portX.IsConnected); + valY.gameObject.SetActive(!portY.IsConnected); + valZ.gameObject.SetActive(!portZ.IsConnected); + + Vector vectorNode = node as Vector; + valX.text = vectorNode.x.ToString(); + valY.text = vectorNode.y.ToString(); + valZ.text = vectorNode.z.ToString(); + } + + private void OnChangeValX(string val) { + vectorNode.x = float.Parse(valX.text); + } + + private void OnChangeValY(string val) { + vectorNode.y = float.Parse(valY.text); + } + + private void OnChangeValZ(string val) { + vectorNode.z = float.Parse(valZ.text); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs.meta new file mode 100644 index 00000000..3afde48a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/RuntimeNodes/UGUIVector.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8f91529775ea04f4681f3f03df79e870 +timeCreated: 1525812043 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs new file mode 100644 index 00000000..0d2e85c1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIContextMenu : MonoBehaviour, IPointerExitHandler { + + public Action<Type, Vector2> onClickSpawn; + public CanvasGroup group; + [HideInInspector] public Node selectedNode; + private Vector2 pos; + + private void Start() { + Close(); + } + + public void OpenAt(Vector2 pos) { + transform.position = pos; + group.alpha = 1; + group.interactable = true; + group.blocksRaycasts = true; + transform.SetAsLastSibling(); + } + + public void Close() { + group.alpha = 0; + group.interactable = false; + group.blocksRaycasts = false; + } + + public void SpawnMathNode() { + SpawnNode(typeof(XNode.Examples.MathNodes.MathNode)); + } + + public void SpawnDisplayNode() { + SpawnNode(typeof(XNode.Examples.MathNodes.DisplayValue)); + } + + public void SpawnVectorNode() { + SpawnNode(typeof(XNode.Examples.MathNodes.Vector)); + } + + private void SpawnNode(Type nodeType) { + Vector2 pos = new Vector2(transform.localPosition.x, -transform.localPosition.y); + onClickSpawn(nodeType, pos); + } + + public void RemoveNode() { + RuntimeMathGraph runtimeMathGraph = GetComponentInParent<RuntimeMathGraph>(); + runtimeMathGraph.graph.RemoveNode(selectedNode); + runtimeMathGraph.Refresh(); + Close(); + } + + public void OnPointerExit(PointerEventData eventData) { + Close(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs.meta new file mode 100644 index 00000000..a68a31d4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIContextMenu.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 402b5de5d75c05445994c83bba07d273 +timeCreated: 1526035634 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs new file mode 100644 index 00000000..1ed72589 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; +using XNode; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUIPort : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerEnterHandler, IPointerExitHandler { + + public string fieldName; + [HideInInspector] public XNode.Node node; + + private NodePort port; + private Connection tempConnection; + private NodePort startPort; + private UGUIPort tempHovered; + private RuntimeMathGraph graph; + private Vector2 startPos; + private List<Connection> connections = new List<Connection>(); + + void Start() { + port = node.GetPort(fieldName); + graph = GetComponentInParent<RuntimeMathGraph>(); + if (port.IsOutput && port.IsConnected) { + for (int i = 0; i < port.ConnectionCount; i++) { + AddConnection(); + } + } + } + + void Reset() { + fieldName = name; + } + + private void OnDestroy() { + // Also destroy connections + for (int i = connections.Count - 1; i >= 0; i--) { + Destroy(connections[i].gameObject); + } + connections.Clear(); + } + + public void UpdateConnectionTransforms() { + if (port.IsInput) return; + + while (connections.Count < port.ConnectionCount) AddConnection(); + while (connections.Count > port.ConnectionCount) { + Destroy(connections[0].gameObject); + connections.RemoveAt(0); + } + + // Loop through connections + for (int i = 0; i < port.ConnectionCount; i++) { + NodePort other = port.GetConnection(i); + UGUIMathBaseNode otherNode = graph.GetRuntimeNode(other.node); + if (!otherNode) Debug.LogWarning(other.node.name + " node not found", this); + Transform port2 = otherNode.GetPort(other.fieldName).transform; + if (!port2) Debug.LogWarning(other.fieldName + " not found", this); + connections[i].SetPosition(transform.position, port2.position); + } + } + + private void AddConnection() { + Connection connection = Instantiate(graph.runtimeConnectionPrefab); + connection.transform.SetParent(graph.scrollRect.content); + connections.Add(connection); + } + + public void OnBeginDrag(PointerEventData eventData) { + if (port.IsOutput) { + tempConnection = Instantiate(graph.runtimeConnectionPrefab); + tempConnection.transform.SetParent(graph.scrollRect.content); + tempConnection.SetPosition(transform.position, eventData.position); + startPos = transform.position; + startPort = port; + } else { + if (port.IsConnected) { + NodePort output = port.Connection; + Debug.Log("has " + port.ConnectionCount + " connections"); + Debug.Log(port.GetConnection(0)); + UGUIMathBaseNode otherNode = graph.GetRuntimeNode(output.node); + UGUIPort otherUGUIPort = otherNode.GetPort(output.fieldName); + Debug.Log("Disconnect"); + output.Disconnect(port); + tempConnection = Instantiate(graph.runtimeConnectionPrefab); + tempConnection.transform.SetParent(graph.scrollRect.content); + tempConnection.SetPosition(otherUGUIPort.transform.position, eventData.position); + startPos = otherUGUIPort.transform.position; + startPort = otherUGUIPort.port; + graph.GetRuntimeNode(node).UpdateGUI(); + } + } + } + + public void OnDrag(PointerEventData eventData) { + if (tempConnection == null) return; + UGUIPort otherPort = FindPortInStack(eventData.hovered); + tempHovered = otherPort; + tempConnection.SetPosition(startPos, eventData.position); + } + + public void OnEndDrag(PointerEventData eventData) { + if (tempConnection == null) return; + if (tempHovered) { + startPort.Connect(tempHovered.port); + graph.GetRuntimeNode(tempHovered.node).UpdateGUI(); + } + Destroy(tempConnection.gameObject); + } + + public UGUIPort FindPortInStack(List<GameObject> stack) { + for (int i = 0; i < stack.Count; i++) { + UGUIPort port = stack[i].GetComponent<UGUIPort>(); + if (port) return port; + } + return null; + } + + public void OnPointerEnter(PointerEventData eventData) { + graph.tooltip.Show(); + object obj = node.GetInputValue<object>(port.fieldName, null); + if (obj != null) graph.tooltip.label.text = obj.ToString(); + else graph.tooltip.label.text = "n/a"; + } + + public void OnPointerExit(PointerEventData eventData) { + graph.tooltip.Hide(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs.meta new file mode 100644 index 00000000..15b8f2f6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUIPort.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 76c005fc401e40f42b1e76d5ffc80292 +timeCreated: 1526084889 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs new file mode 100644 index 00000000..fd61a329 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs @@ -0,0 +1,45 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace XNode.Examples.RuntimeMathNodes { + public class UGUITooltip : MonoBehaviour { + public CanvasGroup group; + public Text label; + private bool show; + private RuntimeMathGraph graph; + + private void Awake() { + graph = GetComponentInParent<RuntimeMathGraph>(); + } + + private void Start() { + Hide(); + } + + private void Update() { + if (show) UpdatePosition(); + } + + public void Show() { + show = true; + group.alpha = 1; + UpdatePosition(); + transform.SetAsLastSibling(); + } + + public void Hide() { + show = false; + group.alpha = 0; + } + + private void UpdatePosition() { + Vector2 pos; + RectTransform rect = graph.scrollRect.content.transform as RectTransform; + Camera cam = graph.gameObject.GetComponentInParent<Canvas>().worldCamera; + RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, cam, out pos); + transform.localPosition = pos; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs.meta new file mode 100644 index 00000000..4490bf78 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/RuntimeMathGraph/Scripts/UGUITooltip.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 6ea6060c58096cd4d8c959a427a9b059 +timeCreated: 1526123957 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine.meta new file mode 100644 index 00000000..2349392a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e8aa31d972c52204dbdcf109681928c8 +folderAsset: yes +timeCreated: 1516177052 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor.meta new file mode 100644 index 00000000..598278ae --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9abb31871fcc4b840baedb640fb6815e +folderAsset: yes +timeCreated: 1516181202 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs new file mode 100644 index 00000000..cbc810a7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode.Examples.StateGraph; +using XNodeEditor; + +namespace XNodeEditor.Examples { + [CustomNodeGraphEditor(typeof(StateGraph))] + public class StateGraphEditor : NodeGraphEditor { + + /// <summary> + /// Overriding GetNodeMenuName lets you control if and how nodes are categorized. + /// In this example we are sorting out all node types that are not in the XNode.Examples namespace. + /// </summary> + public override string GetNodeMenuName(System.Type type) { + if (type.Namespace == "XNode.Examples.StateGraph") { + return base.GetNodeMenuName(type).Replace("X Node/Examples/State Graph/", ""); + } else return null; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs.meta new file mode 100644 index 00000000..5a85ea07 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Editor/StateGraphEditor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: c46ac2790aeee7341998d217311ba8d3 +timeCreated: 1516181207 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset new file mode 100644 index 00000000..00465c33 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset @@ -0,0 +1,230 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dad9e75908d47ae419dba5bc800df549, type: 3} + m_Name: New State Graph + m_EditorClassIdentifier: + nodes: + - {fileID: 114319284393922042} + - {fileID: 114471802820302434} + - {fileID: 114232340257100334} + - {fileID: 114484137410015790} + - {fileID: 114067607725051884} + current: {fileID: 114471802820302434} +--- !u!114 &114067607725051884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32ef86e1b73c7d642acaa1b75f66bbbb, type: 3} + m_Name: State + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 296, y: -184} + ports: + keys: + - enter + - exit + values: + - _fieldName: enter + _node: {fileID: 114067607725051884} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: exit + node: {fileID: 114484137410015790} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: exit + _node: {fileID: 114067607725051884} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 +--- !u!114 &114232340257100334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32ef86e1b73c7d642acaa1b75f66bbbb, type: 3} + m_Name: State Node + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -584, y: -328} + ports: + keys: + - enter + - exit + values: + - _fieldName: enter + _node: {fileID: 114232340257100334} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: exit + _node: {fileID: 114232340257100334} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: enter + node: {fileID: 114319284393922042} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 +--- !u!114 &114319284393922042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32ef86e1b73c7d642acaa1b75f66bbbb, type: 3} + m_Name: State Node + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: -296, y: -328} + ports: + keys: + - enter + - exit + values: + - _fieldName: enter + _node: {fileID: 114319284393922042} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: exit + node: {fileID: 114232340257100334} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: exit + _node: {fileID: 114319284393922042} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: enter + node: {fileID: 114471802820302434} + reroutePoints: [] + - fieldName: enter + node: {fileID: 114484137410015790} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 +--- !u!114 &114471802820302434 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32ef86e1b73c7d642acaa1b75f66bbbb, type: 3} + m_Name: State Node + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 8, y: -424} + ports: + keys: + - enter + - exit + values: + - _fieldName: enter + _node: {fileID: 114471802820302434} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: exit + node: {fileID: 114319284393922042} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: exit + _node: {fileID: 114471802820302434} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 +--- !u!114 &114484137410015790 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32ef86e1b73c7d642acaa1b75f66bbbb, type: 3} + m_Name: State + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 8, y: -184} + ports: + keys: + - enter + - exit + values: + - _fieldName: enter + _node: {fileID: 114484137410015790} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: exit + node: {fileID: 114319284393922042} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: exit + _node: {fileID: 114484137410015790} + _typeQualifiedName: XNode.Examples.StateGraph.StateNode+Empty, Assembly-CSharp, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + connections: + - fieldName: enter + node: {fileID: 114067607725051884} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset.meta new file mode 100644 index 00000000..5513aaca --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/New State Graph.asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 18b73d7e492ac594886d6afd816395ec +timeCreated: 1516181166 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes.meta new file mode 100644 index 00000000..7854c232 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1e4f25b00cb54f84c82e84af31c8e056 +folderAsset: yes +timeCreated: 1514505844 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor.meta new file mode 100644 index 00000000..cb4202f6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 61176f710e9af264db5db0a81711f423 +folderAsset: yes +timeCreated: 1514506327 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs new file mode 100644 index 00000000..f9d6b9eb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs @@ -0,0 +1,30 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using XNode.Examples.StateGraph; + +namespace XNodeEditor.Examples { + [CustomNodeEditor(typeof(StateNode))] + public class StateNodeEditor : NodeEditor { + + public override void OnHeaderGUI() { + GUI.color = Color.white; + StateNode node = target as StateNode; + StateGraph graph = node.graph as StateGraph; + if (graph.current == node) GUI.color = Color.blue; + string title = target.name; + GUILayout.Label(title, NodeEditorResources.styles.nodeHeader, GUILayout.Height(30)); + GUI.color = Color.white; + } + + public override void OnBodyGUI() { + base.OnBodyGUI(); + StateNode node = target as StateNode; + StateGraph graph = node.graph as StateGraph; + if (GUILayout.Button("MoveNext Node")) node.MoveNext(); + if (GUILayout.Button("Continue Graph")) graph.Continue(); + if (GUILayout.Button("Set as current")) graph.current = node; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs.meta new file mode 100644 index 00000000..e5414c99 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/Editor/StateNodeEditor.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: f59d4dfd6e73e6b4d9d14256bc7a20f3 +timeCreated: 1514506333 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs new file mode 100644 index 00000000..2bb7dc03 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace XNode.Examples.StateGraph { + public class StateNode : Node { + + [Input] public Empty enter; + [Output] public Empty exit; + + public void MoveNext() { + StateGraph fmGraph = graph as StateGraph; + + if (fmGraph.current != this) { + Debug.LogWarning("Node isn't active"); + return; + } + + NodePort exitPort = GetOutputPort("exit"); + + if (!exitPort.IsConnected) { + Debug.LogWarning("Node isn't connected"); + return; + } + + StateNode node = exitPort.Connection.node as StateNode; + node.OnEnter(); + } + + public void OnEnter() { + StateGraph fmGraph = graph as StateGraph; + fmGraph.current = this; + } + + [Serializable] + public class Empty { } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs.meta new file mode 100644 index 00000000..04432757 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/Nodes/StateNode.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 32ef86e1b73c7d642acaa1b75f66bbbb +timeCreated: 1514505861 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md new file mode 100644 index 00000000..8e7aa3e0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md @@ -0,0 +1,14 @@ +[](https://discord.gg/qgPrHv4) +[](https://github.com/Siccity/xNode/issues) +[](https://raw.githubusercontent.com/Siccity/xNode/master/LICENSE.md) +[](https://github.com/Siccity/xNode/wiki) + +[Go to Downloads](https://github.com/Siccity/xNode/releases) + +### xNode State Machine (Example) +This example project should give you an understanding of how to handle traversing through nodes, one by one. +The same principle can be applied to dialogue graphs, and other simple decision makers. + + +Join the [Discord](https://discord.gg/qgPrHv4 "Join Discord server") server to leave feedback or get support. +Feel free to also leave suggestions/requests in the [issues](https://github.com/Siccity/xNode/issues "Go to Issues") page. diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md.meta new file mode 100644 index 00000000..255080c3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 942cd94b8baa8d4419d3d7da96deb5fa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs new file mode 100644 index 00000000..8a136c27 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace XNode.Examples.StateGraph { + [CreateAssetMenu(fileName = "New State Graph", menuName = "xNode Examples/State Graph")] + public class StateGraph : NodeGraph { + + // The current "active" node + public StateNode current; + + public void Continue() { + current.MoveNext(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs.meta new file mode 100644 index 00000000..8e83d937 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/StateMachine/StateGraph.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: dad9e75908d47ae419dba5bc800df549 +timeCreated: 1514505839 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md b/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md new file mode 100644 index 00000000..5167260e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Thor Brigsted + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md.meta b/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md.meta new file mode 100644 index 00000000..5f0a7c7c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 77523c356ccf04f56b53e6527c6b12fd +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/README.md b/Other/NodeEditorExamples/Assets/xNode-examples/README.md new file mode 100644 index 00000000..0207ad36 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/README.md @@ -0,0 +1,96 @@ +<img align="right" width="100" height="100" src="https://user-images.githubusercontent.com/37786733/41541140-71602302-731a-11e8-9434-79b3a57292b6.png"> + +[](https://discord.gg/qgPrHv4) +[](https://github.com/Siccity/xNode/issues) +[](https://raw.githubusercontent.com/Siccity/xNode/master/LICENSE.md) +[](https://github.com/Siccity/xNode/wiki) +[](https://openupm.com/packages/com.github.siccity.xnode/) + +[Downloads](https://github.com/Siccity/xNode/releases) / [Asset Store](http://u3d.as/108S) / [Documentation](https://github.com/Siccity/xNode/wiki) + +Support xNode on [Ko-fi](https://ko-fi.com/Z8Z5DYWA) or [Patreon](https://www.patreon.com/thorbrigsted) + +### xNode +Thinking of developing a node-based plugin? Then this is for you. You can download it as an archive and unpack to a new unity project, or connect it as git submodule. + +xNode is super userfriendly, intuitive and will help you reap the benefits of node graphs in no time. +With a minimal footprint, it is ideal as a base for custom state machines, dialogue systems, decision makers etc. + +<p align="center"> + <img src="https://user-images.githubusercontent.com/6402525/53689100-3821e680-3d4e-11e9-8440-e68bd802bfd9.png"> +</p> + +### Key features +* Lightweight in runtime +* Very little boilerplate code +* Strong separation of editor and runtime code +* No runtime reflection (unless you need to edit/build node graphs at runtime. In this case, all reflection is cached.) +* Does not rely on any 3rd party plugins +* Custom node inspector code is very similar to regular custom inspector code +* Supported from Unity 5.3 and up + +### Wiki +* [Getting started](https://github.com/Siccity/xNode/wiki/Getting%20Started) - create your very first node node and graph +* [Examples branch](https://github.com/Siccity/xNode/tree/examples) - look at other small projects + +### Installing with Unity Package Manager +***Via Git URL*** +*(Requires Unity version 2018.3.0b7 or above)* + +To install this project as a [Git dependency](https://docs.unity3d.com/Manual/upm-git.html) using the Unity Package Manager, +add the following line to your project's `manifest.json`: + +``` +"com.github.siccity.xnode": "https://github.com/siccity/xNode.git" +``` + +You will need to have Git installed and available in your system's PATH. + +If you are using [Assembly Definitions](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) in your project, you will need to add `XNode` and/or `XNodeEditor` as Assembly Definition References. + +***Via OpenUPM*** + +The package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli). + +``` +openupm add com.github.siccity.xnode +``` + +### Node example: +```csharp +// public classes deriving from Node are registered as nodes for use within a graph +public class MathNode : Node { + // Adding [Input] or [Output] is all you need to do to register a field as a valid port on your node + [Input] public float a; + [Input] public float b; + // The value of an output node field is not used for anything, but could be used for caching output results + [Output] public float result; + [Output] public float sum; + + // The value of 'mathType' will be displayed on the node in an editable format, similar to the inspector + public MathType mathType = MathType.Add; + public enum MathType { Add, Subtract, Multiply, Divide} + + // GetValue should be overridden to return a value for any specified output port + public override object GetValue(NodePort port) { + + // Get new a and b values from input connections. Fallback to field values if input is not connected + float a = GetInputValue<float>("a", this.a); + float b = GetInputValue<float>("b", this.b); + + // After you've gotten your input values, you can perform your calculations and return a value + if (port.fieldName == "result") + switch(mathType) { + case MathType.Add: default: return a + b; + case MathType.Subtract: return a - b; + case MathType.Multiply: return a * b; + case MathType.Divide: return a / b; + } + else if (port.fieldName == "sum") return a + b; + else return 0f; + } +} +``` + +Join the [Discord](https://discord.gg/qgPrHv4 "Join Discord server") server to leave feedback or get support. +Feel free to also leave suggestions/requests in the [issues](https://github.com/Siccity/xNode/issues "Go to Issues") page. diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/README.md.meta b/Other/NodeEditorExamples/Assets/xNode-examples/README.md.meta new file mode 100644 index 00000000..dd3ed6f6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 243efae3a6b7941ad8f8e54dcf38ce8c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts.meta new file mode 100644 index 00000000..ab712b6a --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 657b15cb3ec32a24ca80faebf094d0f4 +folderAsset: yes +timeCreated: 1505418321 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes.meta new file mode 100644 index 00000000..c0be8497 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5644dfc7eed151045af664a9d4fd1906 +folderAsset: yes +timeCreated: 1541633926 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs new file mode 100644 index 00000000..9cdaef4c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs @@ -0,0 +1,5 @@ +using UnityEngine; + +/// <summary> Draw enums correctly within nodes. Without it, enums show up at the wrong positions. </summary> +/// <remarks> Enums with this attribute are not detected by EditorGui.ChangeCheck due to waiting before executing </remarks> +public class NodeEnumAttribute : PropertyAttribute { }
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs.meta new file mode 100644 index 00000000..813a80bc --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Attributes/NodeEnum.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 10a8338f6c985854697b35459181af0a +timeCreated: 1541633942 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor.meta new file mode 100644 index 00000000..b0ba142e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94d4fd78d9120634ebe0e8717610c412 +folderAsset: yes +timeCreated: 1505418345 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers.meta new file mode 100644 index 00000000..b69e0ac8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7adf21edfb51f514fa991d7556ecd0ef +folderAsset: yes +timeCreated: 1541971984 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs new file mode 100644 index 00000000..8aa748c2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using XNode; +using XNodeEditor; + +namespace XNodeEditor { + [CustomPropertyDrawer(typeof(NodeEnumAttribute))] + public class NodeEnumDrawer : PropertyDrawer { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { + EditorGUI.BeginProperty(position, label, property); + + EnumPopup(position, property, label); + + EditorGUI.EndProperty(); + } + + public static void EnumPopup(Rect position, SerializedProperty property, GUIContent label) { + // Throw error on wrong type + if (property.propertyType != SerializedPropertyType.Enum) { + throw new ArgumentException("Parameter selected must be of type System.Enum"); + } + + // Add label + position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label); + + // Get current enum name + string enumName = ""; + if (property.enumValueIndex >= 0 && property.enumValueIndex < property.enumDisplayNames.Length) enumName = property.enumDisplayNames[property.enumValueIndex]; + +#if UNITY_2017_1_OR_NEWER + // Display dropdown + if (EditorGUI.DropdownButton(position, new GUIContent(enumName), FocusType.Passive)) { + // Position is all wrong if we show the dropdown during the node draw phase. + // Instead, add it to onLateGUI to display it later. + NodeEditorWindow.current.onLateGUI += () => ShowContextMenuAtMouse(property); + } +#else + // Display dropdown + if (GUI.Button(position, new GUIContent(enumName), "MiniPopup")) { + // Position is all wrong if we show the dropdown during the node draw phase. + // Instead, add it to onLateGUI to display it later. + NodeEditorWindow.current.onLateGUI += () => ShowContextMenuAtMouse(property); + } +#endif + } + + public static void ShowContextMenuAtMouse(SerializedProperty property) { + // Initialize menu + GenericMenu menu = new GenericMenu(); + + // Add all enum display names to menu + for (int i = 0; i < property.enumDisplayNames.Length; i++) { + int index = i; + menu.AddItem(new GUIContent(property.enumDisplayNames[i]), false, () => SetEnum(property, index)); + } + + // Display at cursor position + Rect r = new Rect(Event.current.mousePosition, new Vector2(0, 0)); + menu.DropDown(r); + } + + private static void SetEnum(SerializedProperty property, int index) { + property.enumValueIndex = index; + property.serializedObject.ApplyModifiedProperties(); + property.serializedObject.Update(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs.meta new file mode 100644 index 00000000..beacf6b3 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/NodeEnumDrawer.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 83db81f92abadca439507e25d517cabe +timeCreated: 1541633798 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin.meta new file mode 100644 index 00000000..c2b0ac98 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 327994a52f523b641898a39ff7500a02 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs new file mode 100644 index 00000000..84c6d8e7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs @@ -0,0 +1,48 @@ +#if UNITY_EDITOR && ODIN_INSPECTOR +using System; +using System.Collections.Generic; +using System.Reflection; +using Sirenix.OdinInspector.Editor; +using UnityEngine; +using XNode; + +namespace XNodeEditor { + internal class OdinNodeInGraphAttributeProcessor<T> : OdinAttributeProcessor<T> where T : Node { + public override bool CanProcessSelfAttributes(InspectorProperty property) { + return false; + } + + public override bool CanProcessChildMemberAttributes(InspectorProperty parentProperty, MemberInfo member) { + if (!NodeEditor.inNodeEditor) + return false; + + if (member.MemberType == MemberTypes.Field) { + switch (member.Name) { + case "graph": + case "position": + case "ports": + return true; + + default: + break; + } + } + + return false; + } + + public override void ProcessChildMemberAttributes(InspectorProperty parentProperty, MemberInfo member, List<Attribute> attributes) { + switch (member.Name) { + case "graph": + case "position": + case "ports": + attributes.Add(new HideInInspector()); + break; + + default: + break; + } + } + } +} +#endif
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs.meta new file mode 100644 index 00000000..15f69908 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cf2561fbfea9a041ac81efbbb5b3e0d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs new file mode 100644 index 00000000..a384bdcf --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs @@ -0,0 +1,49 @@ +#if UNITY_EDITOR && ODIN_INSPECTOR +using Sirenix.OdinInspector; +using Sirenix.OdinInspector.Editor; +using Sirenix.Utilities.Editor; +using UnityEngine; +using XNode; + +namespace XNodeEditor { + public class InputAttributeDrawer : OdinAttributeDrawer<XNode.Node.InputAttribute> { + protected override bool CanDrawAttributeProperty(InspectorProperty property) { + Node node = property.Tree.WeakTargets[0] as Node; + return node != null; + } + + protected override void DrawPropertyLayout(GUIContent label) { + Node node = Property.Tree.WeakTargets[0] as Node; + NodePort port = node.GetInputPort(Property.Name); + + if (!NodeEditor.inNodeEditor) { + if (Attribute.backingValue == XNode.Node.ShowBackingValue.Always || Attribute.backingValue == XNode.Node.ShowBackingValue.Unconnected && !port.IsConnected) + CallNextDrawer(label); + return; + } + + if (Property.Tree.WeakTargets.Count > 1) { + SirenixEditorGUI.WarningMessageBox("Cannot draw ports with multiple nodes selected"); + return; + } + + if (port != null) { + var portPropoerty = Property.Tree.GetUnityPropertyForPath(Property.UnityPropertyPath); + if (portPropoerty == null) { + SirenixEditorGUI.ErrorMessageBox("Port property missing at: " + Property.UnityPropertyPath); + return; + } else { + var labelWidth = Property.GetAttribute<LabelWidthAttribute>(); + if (labelWidth != null) + GUIHelper.PushLabelWidth(labelWidth.Width); + + NodeEditorGUILayout.PropertyField(portPropoerty, label == null ? GUIContent.none : label, true, GUILayout.MinWidth(30)); + + if (labelWidth != null) + GUIHelper.PopLabelWidth(); + } + } + } + } +} +#endif
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs.meta new file mode 100644 index 00000000..12b76158 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2fd590b2e9ea0bd49b6986a2ca9010ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs new file mode 100644 index 00000000..ff596156 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs @@ -0,0 +1,49 @@ +#if UNITY_EDITOR && ODIN_INSPECTOR +using Sirenix.OdinInspector; +using Sirenix.OdinInspector.Editor; +using Sirenix.Utilities.Editor; +using UnityEngine; +using XNode; + +namespace XNodeEditor { + public class OutputAttributeDrawer : OdinAttributeDrawer<XNode.Node.OutputAttribute> { + protected override bool CanDrawAttributeProperty(InspectorProperty property) { + Node node = property.Tree.WeakTargets[0] as Node; + return node != null; + } + + protected override void DrawPropertyLayout(GUIContent label) { + Node node = Property.Tree.WeakTargets[0] as Node; + NodePort port = node.GetOutputPort(Property.Name); + + if (!NodeEditor.inNodeEditor) { + if (Attribute.backingValue == XNode.Node.ShowBackingValue.Always || Attribute.backingValue == XNode.Node.ShowBackingValue.Unconnected && !port.IsConnected) + CallNextDrawer(label); + return; + } + + if (Property.Tree.WeakTargets.Count > 1) { + SirenixEditorGUI.WarningMessageBox("Cannot draw ports with multiple nodes selected"); + return; + } + + if (port != null) { + var portPropoerty = Property.Tree.GetUnityPropertyForPath(Property.UnityPropertyPath); + if (portPropoerty == null) { + SirenixEditorGUI.ErrorMessageBox("Port property missing at: " + Property.UnityPropertyPath); + return; + } else { + var labelWidth = Property.GetAttribute<LabelWidthAttribute>(); + if (labelWidth != null) + GUIHelper.PushLabelWidth(labelWidth.Width); + + NodeEditorGUILayout.PropertyField(portPropoerty, label == null ? GUIContent.none : label, true, GUILayout.MinWidth(30)); + + if (labelWidth != null) + GUIHelper.PopLabelWidth(); + } + } + } + } +} +#endif
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs.meta new file mode 100644 index 00000000..aa22218d --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e7ebd8f2b42e2384aa109551dc46af88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs new file mode 100644 index 00000000..6859855c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs @@ -0,0 +1,75 @@ +using UnityEditor; +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector.Editor; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +#endif + +namespace XNodeEditor { + /// <summary> Override graph inspector to show an 'Open Graph' button at the top </summary> + [CustomEditor(typeof(XNode.NodeGraph), true)] +#if ODIN_INSPECTOR + public class GlobalGraphEditor : OdinEditor { + public override void OnInspectorGUI() { + if (GUILayout.Button("Edit graph", GUILayout.Height(40))) { + NodeEditorWindow.Open(serializedObject.targetObject as XNode.NodeGraph); + } + base.OnInspectorGUI(); + } + } +#else + [CanEditMultipleObjects] + public class GlobalGraphEditor : Editor { + public override void OnInspectorGUI() { + serializedObject.Update(); + + if (GUILayout.Button("Edit graph", GUILayout.Height(40))) { + NodeEditorWindow.Open(serializedObject.targetObject as XNode.NodeGraph); + } + + GUILayout.Space(EditorGUIUtility.singleLineHeight); + GUILayout.Label("Raw data", "BoldLabel"); + + DrawDefaultInspector(); + + serializedObject.ApplyModifiedProperties(); + } + } +#endif + + [CustomEditor(typeof(XNode.Node), true)] +#if ODIN_INSPECTOR + public class GlobalNodeEditor : OdinEditor { + public override void OnInspectorGUI() { + if (GUILayout.Button("Edit graph", GUILayout.Height(40))) { + SerializedProperty graphProp = serializedObject.FindProperty("graph"); + NodeEditorWindow w = NodeEditorWindow.Open(graphProp.objectReferenceValue as XNode.NodeGraph); + w.Home(); // Focus selected node + } + base.OnInspectorGUI(); + } + } +#else + [CanEditMultipleObjects] + public class GlobalNodeEditor : Editor { + public override void OnInspectorGUI() { + serializedObject.Update(); + + if (GUILayout.Button("Edit graph", GUILayout.Height(40))) { + SerializedProperty graphProp = serializedObject.FindProperty("graph"); + NodeEditorWindow w = NodeEditorWindow.Open(graphProp.objectReferenceValue as XNode.NodeGraph); + w.Home(); // Focus selected node + } + + GUILayout.Space(EditorGUIUtility.singleLineHeight); + GUILayout.Label("Raw data", "BoldLabel"); + + // Now draw the node itself. + DrawDefaultInspector(); + + serializedObject.ApplyModifiedProperties(); + } + } +#endif +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs.meta new file mode 100644 index 00000000..5cc60df1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphAndNodeEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bdd6e443125ccac4dad0665515759637 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs new file mode 100644 index 00000000..264e8b12 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs @@ -0,0 +1,35 @@ +using UnityEditor; +using XNode; + +namespace XNodeEditor { + /// <summary> + /// This asset processor resolves an issue with the new v2 AssetDatabase system present on 2019.3 and later. When + /// renaming a <see cref="XNode.NodeGraph"/> asset, it appears that sometimes the v2 AssetDatabase will swap which asset + /// is the main asset (present at top level) between the <see cref="XNode.NodeGraph"/> and one of its <see cref="XNode.Node"/> + /// sub-assets. As a workaround until Unity fixes this, this asset processor checks all renamed assets and if it + /// finds a case where a <see cref="XNode.Node"/> has been made the main asset it will swap it back to being a sub-asset + /// and rename the node to the default name for that node type. + /// </summary> + internal sealed class GraphRenameFixAssetProcessor : AssetPostprocessor { + private static void OnPostprocessAllAssets( + string[] importedAssets, + string[] deletedAssets, + string[] movedAssets, + string[] movedFromAssetPaths) { + for (int i = 0; i < movedAssets.Length; i++) { + Node nodeAsset = AssetDatabase.LoadMainAssetAtPath(movedAssets[i]) as Node; + + // If the renamed asset is a node graph, but the v2 AssetDatabase has swapped a sub-asset node to be its + // main asset, reset the node graph to be the main asset and rename the node asset back to its default + // name. + if (nodeAsset != null && AssetDatabase.IsMainAsset(nodeAsset)) { + AssetDatabase.SetMainObject(nodeAsset.graph, movedAssets[i]); + AssetDatabase.ImportAsset(movedAssets[i]); + + nodeAsset.name = NodeEditorUtilities.NodeDefaultName(nodeAsset.GetType()); + EditorUtility.SetDirty(nodeAsset); + } + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs.meta new file mode 100644 index 00000000..77e87eef --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/GraphRenameFixAssetProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65da1ff1c50a9984a9c95fd18799e8dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal.meta new file mode 100644 index 00000000..600ad293 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Internal.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6a1bbc054e282346a02e7bbddde3206 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: 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: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs new file mode 100644 index 00000000..45b96050 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector.Editor; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +#endif + +namespace XNodeEditor { + /// <summary> Base class to derive custom Node editors from. Use this to create your own custom inspectors and editors for your nodes. </summary> + [CustomNodeEditor(typeof(XNode.Node))] + public class NodeEditor : XNodeEditor.Internal.NodeEditorBase<NodeEditor, NodeEditor.CustomNodeEditorAttribute, XNode.Node> { + + private readonly Color DEFAULTCOLOR = new Color32(90, 97, 105, 255); + + /// <summary> Fires every whenever a node was modified through the editor </summary> + public static Action<XNode.Node> onUpdateNode; + public readonly static Dictionary<XNode.NodePort, Vector2> portPositions = new Dictionary<XNode.NodePort, Vector2>(); + +#if ODIN_INSPECTOR + protected internal static bool inNodeEditor = false; +#endif + + public virtual void OnHeaderGUI() { + GUILayout.Label(target.name, NodeEditorResources.styles.nodeHeader, GUILayout.Height(30)); + } + + /// <summary> Draws standard field editors for all public fields </summary> + public virtual void OnBodyGUI() { +#if ODIN_INSPECTOR + inNodeEditor = true; +#endif + + // Unity specifically requires this to save/update any serial object. + // serializedObject.Update(); must go at the start of an inspector gui, and + // serializedObject.ApplyModifiedProperties(); goes at the end. + serializedObject.Update(); + string[] excludes = { "m_Script", "graph", "position", "ports" }; + +#if ODIN_INSPECTOR + InspectorUtilities.BeginDrawPropertyTree(objectTree, true); + GUIHelper.PushLabelWidth(84); + objectTree.Draw(true); + InspectorUtilities.EndDrawPropertyTree(objectTree); + GUIHelper.PopLabelWidth(); +#else + + // Iterate through serialized properties and draw them like the Inspector (But with ports) + SerializedProperty iterator = serializedObject.GetIterator(); + bool enterChildren = true; + while (iterator.NextVisible(enterChildren)) { + enterChildren = false; + if (excludes.Contains(iterator.name)) continue; + NodeEditorGUILayout.PropertyField(iterator, true); + } +#endif + + // Iterate through dynamic ports and draw them in the order in which they are serialized + foreach (XNode.NodePort dynamicPort in target.DynamicPorts) { + if (NodeEditorGUILayout.IsDynamicPortListPort(dynamicPort)) continue; + NodeEditorGUILayout.PortField(dynamicPort); + } + + serializedObject.ApplyModifiedProperties(); + +#if ODIN_INSPECTOR + // Call repaint so that the graph window elements respond properly to layout changes coming from Odin + if (GUIHelper.RepaintRequested) { + GUIHelper.ClearRepaintRequest(); + window.Repaint(); + } +#endif + +#if ODIN_INSPECTOR + inNodeEditor = false; +#endif + } + + public virtual int GetWidth() { + Type type = target.GetType(); + int width; + if (type.TryGetAttributeWidth(out width)) return width; + else return 208; + } + + /// <summary> Returns color for target node </summary> + public virtual Color GetTint() { + // Try get color from [NodeTint] attribute + Type type = target.GetType(); + Color color; + if (type.TryGetAttributeTint(out color)) return color; + // Return default color (grey) + else return DEFAULTCOLOR; + } + + public virtual GUIStyle GetBodyStyle() { + return NodeEditorResources.styles.nodeBody; + } + + public virtual GUIStyle GetBodyHighlightStyle() { + return NodeEditorResources.styles.nodeHighlight; + } + + /// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary> + public virtual void AddContextMenuItems(GenericMenu menu) { + bool canRemove = true; + // Actions if only one node is selected + if (Selection.objects.Length == 1 && Selection.activeObject is XNode.Node) { + XNode.Node node = Selection.activeObject as XNode.Node; + menu.AddItem(new GUIContent("Move To Top"), false, () => NodeEditorWindow.current.MoveNodeToTop(node)); + menu.AddItem(new GUIContent("Rename"), false, NodeEditorWindow.current.RenameSelectedNode); + + canRemove = NodeGraphEditor.GetEditor(node.graph, NodeEditorWindow.current).CanRemove(node); + } + + // Add actions to any number of selected nodes + menu.AddItem(new GUIContent("Copy"), false, NodeEditorWindow.current.CopySelectedNodes); + menu.AddItem(new GUIContent("Duplicate"), false, NodeEditorWindow.current.DuplicateSelectedNodes); + + if (canRemove) menu.AddItem(new GUIContent("Remove"), false, NodeEditorWindow.current.RemoveSelectedNodes); + else menu.AddItem(new GUIContent("Remove"), false, null); + + // Custom sctions if only one node is selected + if (Selection.objects.Length == 1 && Selection.activeObject is XNode.Node) { + XNode.Node node = Selection.activeObject as XNode.Node; + menu.AddCustomContextMenuItems(node); + } + } + + /// <summary> Rename the node asset. This will trigger a reimport of the node. </summary> + public void Rename(string newName) { + if (newName == null || newName.Trim() == "") newName = NodeEditorUtilities.NodeDefaultName(target.GetType()); + target.name = newName; + OnRename(); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); + } + + /// <summary> Called after this node's name has changed. </summary> + public virtual void OnRename() { } + + [AttributeUsage(AttributeTargets.Class)] + public class CustomNodeEditorAttribute : Attribute, + XNodeEditor.Internal.NodeEditorBase<NodeEditor, NodeEditor.CustomNodeEditorAttribute, XNode.Node>.INodeEditorAttrib { + private Type inspectedType; + /// <summary> Tells a NodeEditor which Node type it is an editor for </summary> + /// <param name="inspectedType">Type that this editor can edit</param> + public CustomNodeEditorAttribute(Type inspectedType) { + this.inspectedType = inspectedType; + } + + public Type GetInspectedType() { + return inspectedType; + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs.meta new file mode 100644 index 00000000..db8651d5 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 712c3fc5d9eeb4c45b1e23918df6018f +timeCreated: 1505462176 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs new file mode 100644 index 00000000..8c151698 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs @@ -0,0 +1,551 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using XNodeEditor.Internal; + +namespace XNodeEditor { + public partial class NodeEditorWindow { + public enum NodeActivity { Idle, HoldNode, DragNode, HoldGrid, DragGrid } + public static NodeActivity currentActivity = NodeActivity.Idle; + public static bool isPanning { get; private set; } + public static Vector2[] dragOffset; + + public static XNode.Node[] copyBuffer = null; + + private bool IsDraggingPort { get { return draggedOutput != null; } } + private bool IsHoveringPort { get { return hoveredPort != null; } } + private bool IsHoveringNode { get { return hoveredNode != null; } } + private bool IsHoveringReroute { get { return hoveredReroute.port != null; } } + private XNode.Node hoveredNode = null; + [NonSerialized] public XNode.NodePort hoveredPort = null; + [NonSerialized] private XNode.NodePort draggedOutput = null; + [NonSerialized] private XNode.NodePort draggedOutputTarget = null; + [NonSerialized] private XNode.NodePort autoConnectOutput = null; + [NonSerialized] private List<Vector2> draggedOutputReroutes = new List<Vector2>(); + private RerouteReference hoveredReroute = new RerouteReference(); + public List<RerouteReference> selectedReroutes = new List<RerouteReference>(); + private Vector2 dragBoxStart; + private UnityEngine.Object[] preBoxSelection; + private RerouteReference[] preBoxSelectionReroute; + private Rect selectionBox; + private bool isDoubleClick = false; + private Vector2 lastMousePosition; + private float dragThreshold = 1f; + + public void Controls() { + wantsMouseMove = true; + Event e = Event.current; + switch (e.type) { + case EventType.DragUpdated: + case EventType.DragPerform: + DragAndDrop.visualMode = DragAndDropVisualMode.Generic; + if (e.type == EventType.DragPerform) { + DragAndDrop.AcceptDrag(); + graphEditor.OnDropObjects(DragAndDrop.objectReferences); + } + break; + case EventType.MouseMove: + //Keyboard commands will not get correct mouse position from Event + lastMousePosition = e.mousePosition; + break; + case EventType.ScrollWheel: + float oldZoom = zoom; + if (e.delta.y > 0) zoom += 0.1f * zoom; + else zoom -= 0.1f * zoom; + if (NodeEditorPreferences.GetSettings().zoomToMouse) panOffset += (1 - oldZoom / zoom) * (WindowToGridPosition(e.mousePosition) + panOffset); + break; + case EventType.MouseDrag: + if (e.button == 0) { + if (IsDraggingPort) { + // Set target even if we can't connect, so as to prevent auto-conn menu from opening erroneously + if (IsHoveringPort && hoveredPort.IsInput && !draggedOutput.IsConnectedTo(hoveredPort)) { + draggedOutputTarget = hoveredPort; + } else { + draggedOutputTarget = null; + } + Repaint(); + } else if (currentActivity == NodeActivity.HoldNode) { + RecalculateDragOffsets(e); + currentActivity = NodeActivity.DragNode; + Repaint(); + } + if (currentActivity == NodeActivity.DragNode) { + // Holding ctrl inverts grid snap + bool gridSnap = NodeEditorPreferences.GetSettings().gridSnap; + if (e.control) gridSnap = !gridSnap; + + Vector2 mousePos = WindowToGridPosition(e.mousePosition); + // Move selected nodes with offset + for (int i = 0; i < Selection.objects.Length; i++) { + if (Selection.objects[i] is XNode.Node) { + XNode.Node node = Selection.objects[i] as XNode.Node; + Undo.RecordObject(node, "Moved Node"); + Vector2 initial = node.position; + node.position = mousePos + dragOffset[i]; + if (gridSnap) { + node.position.x = (Mathf.Round((node.position.x + 8) / 16) * 16) - 8; + node.position.y = (Mathf.Round((node.position.y + 8) / 16) * 16) - 8; + } + + // Offset portConnectionPoints instantly if a node is dragged so they aren't delayed by a frame. + Vector2 offset = node.position - initial; + if (offset.sqrMagnitude > 0) { + foreach (XNode.NodePort output in node.Outputs) { + Rect rect; + if (portConnectionPoints.TryGetValue(output, out rect)) { + rect.position += offset; + portConnectionPoints[output] = rect; + } + } + + foreach (XNode.NodePort input in node.Inputs) { + Rect rect; + if (portConnectionPoints.TryGetValue(input, out rect)) { + rect.position += offset; + portConnectionPoints[input] = rect; + } + } + } + } + } + // Move selected reroutes with offset + for (int i = 0; i < selectedReroutes.Count; i++) { + Vector2 pos = mousePos + dragOffset[Selection.objects.Length + i]; + if (gridSnap) { + pos.x = (Mathf.Round(pos.x / 16) * 16); + pos.y = (Mathf.Round(pos.y / 16) * 16); + } + selectedReroutes[i].SetPoint(pos); + } + Repaint(); + } else if (currentActivity == NodeActivity.HoldGrid) { + currentActivity = NodeActivity.DragGrid; + preBoxSelection = Selection.objects; + preBoxSelectionReroute = selectedReroutes.ToArray(); + dragBoxStart = WindowToGridPosition(e.mousePosition); + Repaint(); + } else if (currentActivity == NodeActivity.DragGrid) { + Vector2 boxStartPos = GridToWindowPosition(dragBoxStart); + Vector2 boxSize = e.mousePosition - boxStartPos; + if (boxSize.x < 0) { boxStartPos.x += boxSize.x; boxSize.x = Mathf.Abs(boxSize.x); } + if (boxSize.y < 0) { boxStartPos.y += boxSize.y; boxSize.y = Mathf.Abs(boxSize.y); } + selectionBox = new Rect(boxStartPos, boxSize); + Repaint(); + } + } else if (e.button == 1 || e.button == 2) { + //check drag threshold for larger screens + if (e.delta.magnitude > dragThreshold) { + panOffset += e.delta * zoom; + isPanning = true; + } + } + break; + case EventType.MouseDown: + Repaint(); + if (e.button == 0) { + draggedOutputReroutes.Clear(); + + if (IsHoveringPort) { + if (hoveredPort.IsOutput) { + draggedOutput = hoveredPort; + autoConnectOutput = hoveredPort; + } else { + hoveredPort.VerifyConnections(); + autoConnectOutput = null; + if (hoveredPort.IsConnected) { + XNode.Node node = hoveredPort.node; + XNode.NodePort output = hoveredPort.Connection; + int outputConnectionIndex = output.GetConnectionIndex(hoveredPort); + draggedOutputReroutes = output.GetReroutePoints(outputConnectionIndex); + hoveredPort.Disconnect(output); + draggedOutput = output; + draggedOutputTarget = hoveredPort; + if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node); + } + } + } else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) { + // If mousedown on node header, select or deselect + if (!Selection.Contains(hoveredNode)) { + SelectNode(hoveredNode, e.control || e.shift); + if (!e.control && !e.shift) selectedReroutes.Clear(); + } else if (e.control || e.shift) DeselectNode(hoveredNode); + + // Cache double click state, but only act on it in MouseUp - Except ClickCount only works in mouseDown. + isDoubleClick = (e.clickCount == 2); + + e.Use(); + currentActivity = NodeActivity.HoldNode; + } else if (IsHoveringReroute) { + // If reroute isn't selected + if (!selectedReroutes.Contains(hoveredReroute)) { + // Add it + if (e.control || e.shift) selectedReroutes.Add(hoveredReroute); + // Select it + else { + selectedReroutes = new List<RerouteReference>() { hoveredReroute }; + Selection.activeObject = null; + } + + } + // Deselect + else if (e.control || e.shift) selectedReroutes.Remove(hoveredReroute); + e.Use(); + currentActivity = NodeActivity.HoldNode; + } + // If mousedown on grid background, deselect all + else if (!IsHoveringNode) { + currentActivity = NodeActivity.HoldGrid; + if (!e.control && !e.shift) { + selectedReroutes.Clear(); + Selection.activeObject = null; + } + } + } + break; + case EventType.MouseUp: + if (e.button == 0) { + //Port drag release + if (IsDraggingPort) { + // If connection is valid, save it + if (draggedOutputTarget != null && draggedOutput.CanConnectTo(draggedOutputTarget)) { + XNode.Node node = draggedOutputTarget.node; + if (graph.nodes.Count != 0) draggedOutput.Connect(draggedOutputTarget); + + // ConnectionIndex can be -1 if the connection is removed instantly after creation + int connectionIndex = draggedOutput.GetConnectionIndex(draggedOutputTarget); + if (connectionIndex != -1) { + draggedOutput.GetReroutePoints(connectionIndex).AddRange(draggedOutputReroutes); + if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node); + EditorUtility.SetDirty(graph); + } + } + // Open context menu for auto-connection if there is no target node + else if (draggedOutputTarget == null && NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) { + GenericMenu menu = new GenericMenu(); + graphEditor.AddContextMenuItems(menu); + menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); + } + //Release dragged connection + draggedOutput = null; + draggedOutputTarget = null; + EditorUtility.SetDirty(graph); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } else if (currentActivity == NodeActivity.DragNode) { + IEnumerable<XNode.Node> nodes = Selection.objects.Where(x => x is XNode.Node).Select(x => x as XNode.Node); + foreach (XNode.Node node in nodes) EditorUtility.SetDirty(node); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } else if (!IsHoveringNode) { + // If click outside node, release field focus + if (!isPanning) { + EditorGUI.FocusTextInControl(null); + EditorGUIUtility.editingTextField = false; + } + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + + // If click node header, select it. + if (currentActivity == NodeActivity.HoldNode && !(e.control || e.shift)) { + selectedReroutes.Clear(); + SelectNode(hoveredNode, false); + + // Double click to center node + if (isDoubleClick) { + Vector2 nodeDimension = nodeSizes.ContainsKey(hoveredNode) ? nodeSizes[hoveredNode] / 2 : Vector2.zero; + panOffset = -hoveredNode.position - nodeDimension; + } + } + + // If click reroute, select it. + if (IsHoveringReroute && !(e.control || e.shift)) { + selectedReroutes = new List<RerouteReference>() { hoveredReroute }; + Selection.activeObject = null; + } + + Repaint(); + currentActivity = NodeActivity.Idle; + } else if (e.button == 1 || e.button == 2) { + if (!isPanning) { + if (IsDraggingPort) { + draggedOutputReroutes.Add(WindowToGridPosition(e.mousePosition)); + } else if (currentActivity == NodeActivity.DragNode && Selection.activeObject == null && selectedReroutes.Count == 1) { + selectedReroutes[0].InsertPoint(selectedReroutes[0].GetPoint()); + selectedReroutes[0] = new RerouteReference(selectedReroutes[0].port, selectedReroutes[0].connectionIndex, selectedReroutes[0].pointIndex + 1); + } else if (IsHoveringReroute) { + ShowRerouteContextMenu(hoveredReroute); + } else if (IsHoveringPort) { + ShowPortContextMenu(hoveredPort); + } else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) { + if (!Selection.Contains(hoveredNode)) SelectNode(hoveredNode, false); + autoConnectOutput = null; + GenericMenu menu = new GenericMenu(); + NodeEditor.GetEditor(hoveredNode, this).AddContextMenuItems(menu); + menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); + e.Use(); // Fixes copy/paste context menu appearing in Unity 5.6.6f2 - doesn't occur in 2018.3.2f1 Probably needs to be used in other places. + } else if (!IsHoveringNode) { + autoConnectOutput = null; + GenericMenu menu = new GenericMenu(); + graphEditor.AddContextMenuItems(menu); + menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); + } + } + isPanning = false; + } + // Reset DoubleClick + isDoubleClick = false; + break; + case EventType.KeyDown: + if (EditorGUIUtility.editingTextField) break; + else if (e.keyCode == KeyCode.F) Home(); + if (NodeEditorUtilities.IsMac()) { + if (e.keyCode == KeyCode.Return) RenameSelectedNode(); + } else { + if (e.keyCode == KeyCode.F2) RenameSelectedNode(); + } + if (e.keyCode == KeyCode.A) { + if (Selection.objects.Any(x => graph.nodes.Contains(x as XNode.Node))) { + foreach (XNode.Node node in graph.nodes) { + DeselectNode(node); + } + } else { + foreach (XNode.Node node in graph.nodes) { + SelectNode(node, true); + } + } + Repaint(); + } + break; + case EventType.ValidateCommand: + case EventType.ExecuteCommand: + if (e.commandName == "SoftDelete") { + if (e.type == EventType.ExecuteCommand) RemoveSelectedNodes(); + e.Use(); + } else if (NodeEditorUtilities.IsMac() && e.commandName == "Delete") { + if (e.type == EventType.ExecuteCommand) RemoveSelectedNodes(); + e.Use(); + } else if (e.commandName == "Duplicate") { + if (e.type == EventType.ExecuteCommand) DuplicateSelectedNodes(); + e.Use(); + } else if (e.commandName == "Copy") { + if (e.type == EventType.ExecuteCommand) CopySelectedNodes(); + e.Use(); + } else if (e.commandName == "Paste") { + if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition)); + e.Use(); + } + Repaint(); + break; + case EventType.Ignore: + // If release mouse outside window + if (e.rawType == EventType.MouseUp && currentActivity == NodeActivity.DragGrid) { + Repaint(); + currentActivity = NodeActivity.Idle; + } + break; + } + } + + private void RecalculateDragOffsets(Event current) { + dragOffset = new Vector2[Selection.objects.Length + selectedReroutes.Count]; + // Selected nodes + for (int i = 0; i < Selection.objects.Length; i++) { + if (Selection.objects[i] is XNode.Node) { + XNode.Node node = Selection.objects[i] as XNode.Node; + dragOffset[i] = node.position - WindowToGridPosition(current.mousePosition); + } + } + + // Selected reroutes + for (int i = 0; i < selectedReroutes.Count; i++) { + dragOffset[Selection.objects.Length + i] = selectedReroutes[i].GetPoint() - WindowToGridPosition(current.mousePosition); + } + } + + /// <summary> Puts all selected nodes in focus. If no nodes are present, resets view and zoom to to origin </summary> + public void Home() { + var nodes = Selection.objects.Where(o => o is XNode.Node).Cast<XNode.Node>().ToList(); + if (nodes.Count > 0) { + Vector2 minPos = nodes.Select(x => x.position).Aggregate((x, y) => new Vector2(Mathf.Min(x.x, y.x), Mathf.Min(x.y, y.y))); + Vector2 maxPos = nodes.Select(x => x.position + (nodeSizes.ContainsKey(x) ? nodeSizes[x] : Vector2.zero)).Aggregate((x, y) => new Vector2(Mathf.Max(x.x, y.x), Mathf.Max(x.y, y.y))); + panOffset = -(minPos + (maxPos - minPos) / 2f); + } else { + zoom = 2; + panOffset = Vector2.zero; + } + } + + /// <summary> Remove nodes in the graph in Selection.objects</summary> + public void RemoveSelectedNodes() { + // We need to delete reroutes starting at the highest point index to avoid shifting indices + selectedReroutes = selectedReroutes.OrderByDescending(x => x.pointIndex).ToList(); + for (int i = 0; i < selectedReroutes.Count; i++) { + selectedReroutes[i].RemovePoint(); + } + selectedReroutes.Clear(); + foreach (UnityEngine.Object item in Selection.objects) { + if (item is XNode.Node) { + XNode.Node node = item as XNode.Node; + graphEditor.RemoveNode(node); + } + } + } + + /// <summary> Initiate a rename on the currently selected node </summary> + public void RenameSelectedNode() { + if (Selection.objects.Length == 1 && Selection.activeObject is XNode.Node) { + XNode.Node node = Selection.activeObject as XNode.Node; + Vector2 size; + if (nodeSizes.TryGetValue(node, out size)) { + RenamePopup.Show(Selection.activeObject, size.x); + } else { + RenamePopup.Show(Selection.activeObject); + } + } + } + + /// <summary> Draw this node on top of other nodes by placing it last in the graph.nodes list </summary> + public void MoveNodeToTop(XNode.Node node) { + int index; + while ((index = graph.nodes.IndexOf(node)) != graph.nodes.Count - 1) { + graph.nodes[index] = graph.nodes[index + 1]; + graph.nodes[index + 1] = node; + } + } + + /// <summary> Duplicate selected nodes and select the duplicates </summary> + public void DuplicateSelectedNodes() { + // Get selected nodes which are part of this graph + XNode.Node[] selectedNodes = Selection.objects.Select(x => x as XNode.Node).Where(x => x != null && x.graph == graph).ToArray(); + if (selectedNodes == null || selectedNodes.Length == 0) return; + // Get top left node position + Vector2 topLeftNode = selectedNodes.Select(x => x.position).Aggregate((x, y) => new Vector2(Mathf.Min(x.x, y.x), Mathf.Min(x.y, y.y))); + InsertDuplicateNodes(selectedNodes, topLeftNode + new Vector2(30, 30)); + } + + public void CopySelectedNodes() { + copyBuffer = Selection.objects.Select(x => x as XNode.Node).Where(x => x != null && x.graph == graph).ToArray(); + } + + public void PasteNodes(Vector2 pos) { + InsertDuplicateNodes(copyBuffer, pos); + } + + private void InsertDuplicateNodes(XNode.Node[] nodes, Vector2 topLeft) { + if (nodes == null || nodes.Length == 0) return; + + // Get top-left node + Vector2 topLeftNode = nodes.Select(x => x.position).Aggregate((x, y) => new Vector2(Mathf.Min(x.x, y.x), Mathf.Min(x.y, y.y))); + Vector2 offset = topLeft - topLeftNode; + + UnityEngine.Object[] newNodes = new UnityEngine.Object[nodes.Length]; + Dictionary<XNode.Node, XNode.Node> substitutes = new Dictionary<XNode.Node, XNode.Node>(); + for (int i = 0; i < nodes.Length; i++) { + XNode.Node srcNode = nodes[i]; + if (srcNode == null) continue; + + // Check if user is allowed to add more of given node type + XNode.Node.DisallowMultipleNodesAttribute disallowAttrib; + Type nodeType = srcNode.GetType(); + if (NodeEditorUtilities.GetAttrib(nodeType, out disallowAttrib)) { + int typeCount = graph.nodes.Count(x => x.GetType() == nodeType); + if (typeCount >= disallowAttrib.max) continue; + } + + XNode.Node newNode = graphEditor.CopyNode(srcNode); + substitutes.Add(srcNode, newNode); + newNode.position = srcNode.position + offset; + newNodes[i] = newNode; + } + + // Walk through the selected nodes again, recreate connections, using the new nodes + for (int i = 0; i < nodes.Length; i++) { + XNode.Node srcNode = nodes[i]; + if (srcNode == null) continue; + foreach (XNode.NodePort port in srcNode.Ports) { + for (int c = 0; c < port.ConnectionCount; c++) { + XNode.NodePort inputPort = port.direction == XNode.NodePort.IO.Input ? port : port.GetConnection(c); + XNode.NodePort outputPort = port.direction == XNode.NodePort.IO.Output ? port : port.GetConnection(c); + + XNode.Node newNodeIn, newNodeOut; + if (substitutes.TryGetValue(inputPort.node, out newNodeIn) && substitutes.TryGetValue(outputPort.node, out newNodeOut)) { + newNodeIn.UpdatePorts(); + newNodeOut.UpdatePorts(); + inputPort = newNodeIn.GetInputPort(inputPort.fieldName); + outputPort = newNodeOut.GetOutputPort(outputPort.fieldName); + } + if (!inputPort.IsConnectedTo(outputPort)) inputPort.Connect(outputPort); + } + } + } + // Select the new nodes + Selection.objects = newNodes; + } + + /// <summary> Draw a connection as we are dragging it </summary> + public void DrawDraggedConnection() { + if (IsDraggingPort) { + Gradient gradient = graphEditor.GetNoodleGradient(draggedOutput, null); + float thickness = graphEditor.GetNoodleThickness(draggedOutput, null); + NoodlePath path = graphEditor.GetNoodlePath(draggedOutput, null); + NoodleStroke stroke = graphEditor.GetNoodleStroke(draggedOutput, null); + + Rect fromRect; + if (!_portConnectionPoints.TryGetValue(draggedOutput, out fromRect)) return; + List<Vector2> gridPoints = new List<Vector2>(); + gridPoints.Add(fromRect.center); + for (int i = 0; i < draggedOutputReroutes.Count; i++) { + gridPoints.Add(draggedOutputReroutes[i]); + } + if (draggedOutputTarget != null) gridPoints.Add(portConnectionPoints[draggedOutputTarget].center); + else gridPoints.Add(WindowToGridPosition(Event.current.mousePosition)); + + DrawNoodle(gradient, path, stroke, thickness, gridPoints); + + Color bgcol = Color.black; + Color frcol = gradient.colorKeys[0].color; + bgcol.a = 0.6f; + frcol.a = 0.6f; + + // Loop through reroute points again and draw the points + for (int i = 0; i < draggedOutputReroutes.Count; i++) { + // Draw reroute point at position + Rect rect = new Rect(draggedOutputReroutes[i], new Vector2(16, 16)); + rect.position = new Vector2(rect.position.x - 8, rect.position.y - 8); + rect = GridToWindowRect(rect); + + NodeEditorGUILayout.DrawPortHandle(rect, bgcol, frcol); + } + } + } + + bool IsHoveringTitle(XNode.Node node) { + Vector2 mousePos = Event.current.mousePosition; + //Get node position + Vector2 nodePos = GridToWindowPosition(node.position); + float width; + Vector2 size; + if (nodeSizes.TryGetValue(node, out size)) width = size.x; + else width = 200; + Rect windowRect = new Rect(nodePos, new Vector2(width / zoom, 30 / zoom)); + return windowRect.Contains(mousePos); + } + + /// <summary> Attempt to connect dragged output to target node </summary> + public void AutoConnect(XNode.Node node) { + if (autoConnectOutput == null) return; + + // Find input port of same type + XNode.NodePort inputPort = node.Ports.FirstOrDefault(x => x.IsInput && x.ValueType == autoConnectOutput.ValueType); + // Fallback to input port + if (inputPort == null) inputPort = node.Ports.FirstOrDefault(x => x.IsInput); + // Autoconnect if connection is compatible + if (inputPort != null && inputPort.CanConnectTo(autoConnectOutput)) autoConnectOutput.Connect(inputPort); + + // Save changes + EditorUtility.SetDirty(graph); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + autoConnectOutput = null; + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs.meta new file mode 100644 index 00000000..a081bf79 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa7d4286bf0ad2e4086252f2893d2cf5 +timeCreated: 1505426655 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs new file mode 100644 index 00000000..f4b14a27 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs @@ -0,0 +1,66 @@ +using UnityEditor; +using UnityEngine; +using System.IO; + +namespace XNodeEditor { + /// <summary> Deals with modified assets </summary> + class NodeEditorAssetModProcessor : UnityEditor.AssetModificationProcessor { + + /// <summary> Automatically delete Node sub-assets before deleting their script. + /// This is important to do, because you can't delete null sub assets. + /// <para/> For another workaround, see: https://gitlab.com/RotaryHeart-UnityShare/subassetmissingscriptdelete </summary> + private static AssetDeleteResult OnWillDeleteAsset (string path, RemoveAssetOptions options) { + // Skip processing anything without the .cs extension + if (Path.GetExtension(path) != ".cs") return AssetDeleteResult.DidNotDelete; + + // Get the object that is requested for deletion + UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath<UnityEngine.Object> (path); + + // If we aren't deleting a script, return + if (!(obj is UnityEditor.MonoScript)) return AssetDeleteResult.DidNotDelete; + + // Check script type. Return if deleting a non-node script + UnityEditor.MonoScript script = obj as UnityEditor.MonoScript; + System.Type scriptType = script.GetClass (); + if (scriptType == null || (scriptType != typeof (XNode.Node) && !scriptType.IsSubclassOf (typeof (XNode.Node)))) return AssetDeleteResult.DidNotDelete; + + // Find all ScriptableObjects using this script + string[] guids = AssetDatabase.FindAssets ("t:" + scriptType); + for (int i = 0; i < guids.Length; i++) { + string assetpath = AssetDatabase.GUIDToAssetPath (guids[i]); + Object[] objs = AssetDatabase.LoadAllAssetRepresentationsAtPath (assetpath); + for (int k = 0; k < objs.Length; k++) { + XNode.Node node = objs[k] as XNode.Node; + if (node.GetType () == scriptType) { + if (node != null && node.graph != null) { + // Delete the node and notify the user + Debug.LogWarning (node.name + " of " + node.graph + " depended on deleted script and has been removed automatically.", node.graph); + node.graph.RemoveNode (node); + } + } + } + } + // We didn't actually delete the script. Tell the internal system to carry on with normal deletion procedure + return AssetDeleteResult.DidNotDelete; + } + + /// <summary> Automatically re-add loose node assets to the Graph node list </summary> + [InitializeOnLoadMethod] + private static void OnReloadEditor () { + // Find all NodeGraph assets + string[] guids = AssetDatabase.FindAssets ("t:" + typeof (XNode.NodeGraph)); + for (int i = 0; i < guids.Length; i++) { + string assetpath = AssetDatabase.GUIDToAssetPath (guids[i]); + XNode.NodeGraph graph = AssetDatabase.LoadAssetAtPath (assetpath, typeof (XNode.NodeGraph)) as XNode.NodeGraph; + graph.nodes.RemoveAll(x => x == null); //Remove null items + Object[] objs = AssetDatabase.LoadAllAssetRepresentationsAtPath (assetpath); + // Ensure that all sub node assets are present in the graph node list + for (int u = 0; u < objs.Length; u++) { + // Ignore null sub assets + if (objs[u] == null) continue; + if (!graph.nodes.Contains (objs[u] as XNode.Node)) graph.nodes.Add(objs[u] as XNode.Node); + } + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs.meta new file mode 100644 index 00000000..057198bc --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorAssetModProcessor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e515e86efe8160243a68b7c06d730c9c +timeCreated: 1507982232 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs new file mode 100644 index 00000000..1fc28c72 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector.Editor; +#endif + +namespace XNodeEditor.Internal { + /// <summary> Handles caching of custom editor classes and their target types. Accessible with GetEditor(Type type) </summary> + /// <typeparam name="T">Editor Type. Should be the type of the deriving script itself (eg. NodeEditor) </typeparam> + /// <typeparam name="A">Attribute Type. The attribute used to connect with the runtime type (eg. CustomNodeEditorAttribute) </typeparam> + /// <typeparam name="K">Runtime Type. The ScriptableObject this can be an editor for (eg. Node) </typeparam> + public abstract class NodeEditorBase<T, A, K> where A : Attribute, NodeEditorBase<T, A, K>.INodeEditorAttrib where T : NodeEditorBase<T, A, K> where K : ScriptableObject { + /// <summary> Custom editors defined with [CustomNodeEditor] </summary> + private static Dictionary<Type, Type> editorTypes; + private static Dictionary<K, T> editors = new Dictionary<K, T>(); + public NodeEditorWindow window; + public K target; + public SerializedObject serializedObject; +#if ODIN_INSPECTOR + private PropertyTree _objectTree; + public PropertyTree objectTree { + get { + if (this._objectTree == null) { + try { + bool wasInEditor = NodeEditor.inNodeEditor; + NodeEditor.inNodeEditor = true; + this._objectTree = PropertyTree.Create(this.serializedObject); + NodeEditor.inNodeEditor = wasInEditor; + } catch (ArgumentException ex) { + Debug.Log(ex); + } + } + return this._objectTree; + } + } +#endif + + public static T GetEditor(K target, NodeEditorWindow window) { + if (target == null) return null; + T editor; + if (!editors.TryGetValue(target, out editor)) { + Type type = target.GetType(); + Type editorType = GetEditorType(type); + editor = Activator.CreateInstance(editorType) as T; + editor.target = target; + editor.serializedObject = new SerializedObject(target); + editor.window = window; + editor.OnCreate(); + editors.Add(target, editor); + } + if (editor.target == null) editor.target = target; + if (editor.window != window) editor.window = window; + if (editor.serializedObject == null) editor.serializedObject = new SerializedObject(target); + return editor; + } + + private static Type GetEditorType(Type type) { + if (type == null) return null; + if (editorTypes == null) CacheCustomEditors(); + Type result; + if (editorTypes.TryGetValue(type, out result)) return result; + //If type isn't found, try base type + return GetEditorType(type.BaseType); + } + + private static void CacheCustomEditors() { + editorTypes = new Dictionary<Type, Type>(); + + //Get all classes deriving from NodeEditor via reflection + Type[] nodeEditors = typeof(T).GetDerivedTypes(); + for (int i = 0; i < nodeEditors.Length; i++) { + if (nodeEditors[i].IsAbstract) continue; + var attribs = nodeEditors[i].GetCustomAttributes(typeof(A), false); + if (attribs == null || attribs.Length == 0) continue; + A attrib = attribs[0] as A; + editorTypes.Add(attrib.GetInspectedType(), nodeEditors[i]); + } + } + + /// <summary> Called on creation, after references have been set </summary> + public virtual void OnCreate() { } + + public interface INodeEditorAttrib { + Type GetInspectedType(); + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs.meta new file mode 100644 index 00000000..4ded02a2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorBase.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: e85122ded59aceb4eb4b1bd9d9202642 +timeCreated: 1511353946 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs new file mode 100644 index 00000000..41f1d9ca --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs @@ -0,0 +1,567 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using XNodeEditor.Internal; + +namespace XNodeEditor { + /// <summary> Contains GUI methods </summary> + public partial class NodeEditorWindow { + public NodeGraphEditor graphEditor; + private List<UnityEngine.Object> selectionCache; + private List<XNode.Node> culledNodes; + /// <summary> 19 if docked, 22 if not </summary> + private int topPadding { get { return isDocked() ? 19 : 22; } } + /// <summary> Executed after all other window GUI. Useful if Zoom is ruining your day. Automatically resets after being run.</summary> + public event Action onLateGUI; + private static readonly Vector3[] polyLineTempArray = new Vector3[2]; + + protected virtual void OnGUI() { + Event e = Event.current; + Matrix4x4 m = GUI.matrix; + if (graph == null) return; + ValidateGraphEditor(); + Controls(); + + DrawGrid(position, zoom, panOffset); + DrawConnections(); + DrawDraggedConnection(); + DrawNodes(); + DrawSelectionBox(); + DrawTooltip(); + graphEditor.OnGUI(); + + // Run and reset onLateGUI + if (onLateGUI != null) { + onLateGUI(); + onLateGUI = null; + } + + GUI.matrix = m; + } + + public static void BeginZoomed(Rect rect, float zoom, float topPadding) { + GUI.EndClip(); + + GUIUtility.ScaleAroundPivot(Vector2.one / zoom, rect.size * 0.5f); + Vector4 padding = new Vector4(0, topPadding, 0, 0); + padding *= zoom; + GUI.BeginClip(new Rect(-((rect.width * zoom) - rect.width) * 0.5f, -(((rect.height * zoom) - rect.height) * 0.5f) + (topPadding * zoom), + rect.width * zoom, + rect.height * zoom)); + } + + public static void EndZoomed(Rect rect, float zoom, float topPadding) { + GUIUtility.ScaleAroundPivot(Vector2.one * zoom, rect.size * 0.5f); + Vector3 offset = new Vector3( + (((rect.width * zoom) - rect.width) * 0.5f), + (((rect.height * zoom) - rect.height) * 0.5f) + (-topPadding * zoom) + topPadding, + 0); + GUI.matrix = Matrix4x4.TRS(offset, Quaternion.identity, Vector3.one); + } + + public void DrawGrid(Rect rect, float zoom, Vector2 panOffset) { + + rect.position = Vector2.zero; + + Vector2 center = rect.size / 2f; + Texture2D gridTex = graphEditor.GetGridTexture(); + Texture2D crossTex = graphEditor.GetSecondaryGridTexture(); + + // Offset from origin in tile units + float xOffset = -(center.x * zoom + panOffset.x) / gridTex.width; + float yOffset = ((center.y - rect.size.y) * zoom + panOffset.y) / gridTex.height; + + Vector2 tileOffset = new Vector2(xOffset, yOffset); + + // Amount of tiles + float tileAmountX = Mathf.Round(rect.size.x * zoom) / gridTex.width; + float tileAmountY = Mathf.Round(rect.size.y * zoom) / gridTex.height; + + Vector2 tileAmount = new Vector2(tileAmountX, tileAmountY); + + // Draw tiled background + GUI.DrawTextureWithTexCoords(rect, gridTex, new Rect(tileOffset, tileAmount)); + GUI.DrawTextureWithTexCoords(rect, crossTex, new Rect(tileOffset + new Vector2(0.5f, 0.5f), tileAmount)); + } + + public void DrawSelectionBox() { + if (currentActivity == NodeActivity.DragGrid) { + Vector2 curPos = WindowToGridPosition(Event.current.mousePosition); + Vector2 size = curPos - dragBoxStart; + Rect r = new Rect(dragBoxStart, size); + r.position = GridToWindowPosition(r.position); + r.size /= zoom; + Handles.DrawSolidRectangleWithOutline(r, new Color(0, 0, 0, 0.1f), new Color(1, 1, 1, 0.6f)); + } + } + + public static bool DropdownButton(string name, float width) { + return GUILayout.Button(name, EditorStyles.toolbarDropDown, GUILayout.Width(width)); + } + + /// <summary> Show right-click context menu for hovered reroute </summary> + void ShowRerouteContextMenu(RerouteReference reroute) { + GenericMenu contextMenu = new GenericMenu(); + contextMenu.AddItem(new GUIContent("Remove"), false, () => reroute.RemovePoint()); + contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + + /// <summary> Show right-click context menu for hovered port </summary> + void ShowPortContextMenu(XNode.NodePort hoveredPort) { + GenericMenu contextMenu = new GenericMenu(); + contextMenu.AddItem(new GUIContent("Clear Connections"), false, () => hoveredPort.ClearConnections()); + contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + + static Vector2 CalculateBezierPoint(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t) { + float u = 1 - t; + float tt = t * t, uu = u * u; + float uuu = uu * u, ttt = tt * t; + return new Vector2( + (uuu * p0.x) + (3 * uu * t * p1.x) + (3 * u * tt * p2.x) + (ttt * p3.x), + (uuu * p0.y) + (3 * uu * t * p1.y) + (3 * u * tt * p2.y) + (ttt * p3.y) + ); + } + + /// <summary> Draws a line segment without allocating temporary arrays </summary> + static void DrawAAPolyLineNonAlloc(float thickness, Vector2 p0, Vector2 p1) { + polyLineTempArray[0].x = p0.x; + polyLineTempArray[0].y = p0.y; + polyLineTempArray[1].x = p1.x; + polyLineTempArray[1].y = p1.y; + Handles.DrawAAPolyLine(thickness, polyLineTempArray); + } + + /// <summary> Draw a bezier from output to input in grid coordinates </summary> + public void DrawNoodle(Gradient gradient, NoodlePath path, NoodleStroke stroke, float thickness, List<Vector2> gridPoints) { + // convert grid points to window points + for (int i = 0; i < gridPoints.Count; ++i) + gridPoints[i] = GridToWindowPosition(gridPoints[i]); + + Color originalHandlesColor = Handles.color; + Handles.color = gradient.Evaluate(0f); + int length = gridPoints.Count; + switch (path) { + case NoodlePath.Curvy: + Vector2 outputTangent = Vector2.right; + for (int i = 0; i < length - 1; i++) { + Vector2 inputTangent; + // Cached most variables that repeat themselves here to avoid so many indexer calls :p + Vector2 point_a = gridPoints[i]; + Vector2 point_b = gridPoints[i + 1]; + float dist_ab = Vector2.Distance(point_a, point_b); + if (i == 0) outputTangent = zoom * dist_ab * 0.01f * Vector2.right; + if (i < length - 2) { + Vector2 point_c = gridPoints[i + 2]; + Vector2 ab = (point_b - point_a).normalized; + Vector2 cb = (point_b - point_c).normalized; + Vector2 ac = (point_c - point_a).normalized; + Vector2 p = (ab + cb) * 0.5f; + float tangentLength = (dist_ab + Vector2.Distance(point_b, point_c)) * 0.005f * zoom; + float side = ((ac.x * (point_b.y - point_a.y)) - (ac.y * (point_b.x - point_a.x))); + + p = tangentLength * Mathf.Sign(side) * new Vector2(-p.y, p.x); + inputTangent = p; + } else { + inputTangent = zoom * dist_ab * 0.01f * Vector2.left; + } + + // Calculates the tangents for the bezier's curves. + float zoomCoef = 50 / zoom; + Vector2 tangent_a = point_a + outputTangent * zoomCoef; + Vector2 tangent_b = point_b + inputTangent * zoomCoef; + // Hover effect. + int division = Mathf.RoundToInt(.2f * dist_ab) + 3; + // Coloring and bezier drawing. + int draw = 0; + Vector2 bezierPrevious = point_a; + for (int j = 1; j <= division; ++j) { + if (stroke == NoodleStroke.Dashed) { + draw++; + if (draw >= 2) draw = -2; + if (draw < 0) continue; + if (draw == 0) bezierPrevious = CalculateBezierPoint(point_a, tangent_a, tangent_b, point_b, (j - 1f) / (float) division); + } + if (i == length - 2) + Handles.color = gradient.Evaluate((j + 1f) / division); + Vector2 bezierNext = CalculateBezierPoint(point_a, tangent_a, tangent_b, point_b, j / (float) division); + DrawAAPolyLineNonAlloc(thickness, bezierPrevious, bezierNext); + bezierPrevious = bezierNext; + } + outputTangent = -inputTangent; + } + break; + case NoodlePath.Straight: + for (int i = 0; i < length - 1; i++) { + Vector2 point_a = gridPoints[i]; + Vector2 point_b = gridPoints[i + 1]; + // Draws the line with the coloring. + Vector2 prev_point = point_a; + // Approximately one segment per 5 pixels + int segments = (int) Vector2.Distance(point_a, point_b) / 5; + segments = Math.Max(segments, 1); + + int draw = 0; + for (int j = 0; j <= segments; j++) { + draw++; + float t = j / (float) segments; + Vector2 lerp = Vector2.Lerp(point_a, point_b, t); + if (draw > 0) { + if (i == length - 2) Handles.color = gradient.Evaluate(t); + DrawAAPolyLineNonAlloc(thickness, prev_point, lerp); + } + prev_point = lerp; + if (stroke == NoodleStroke.Dashed && draw >= 2) draw = -2; + } + } + break; + case NoodlePath.Angled: + for (int i = 0; i < length - 1; i++) { + if (i == length - 1) continue; // Skip last index + if (gridPoints[i].x <= gridPoints[i + 1].x - (50 / zoom)) { + float midpoint = (gridPoints[i].x + gridPoints[i + 1].x) * 0.5f; + Vector2 start_1 = gridPoints[i]; + Vector2 end_1 = gridPoints[i + 1]; + start_1.x = midpoint; + end_1.x = midpoint; + if (i == length - 2) { + DrawAAPolyLineNonAlloc(thickness, gridPoints[i], start_1); + Handles.color = gradient.Evaluate(0.5f); + DrawAAPolyLineNonAlloc(thickness, start_1, end_1); + Handles.color = gradient.Evaluate(1f); + DrawAAPolyLineNonAlloc(thickness, end_1, gridPoints[i + 1]); + } else { + DrawAAPolyLineNonAlloc(thickness, gridPoints[i], start_1); + DrawAAPolyLineNonAlloc(thickness, start_1, end_1); + DrawAAPolyLineNonAlloc(thickness, end_1, gridPoints[i + 1]); + } + } else { + float midpoint = (gridPoints[i].y + gridPoints[i + 1].y) * 0.5f; + Vector2 start_1 = gridPoints[i]; + Vector2 end_1 = gridPoints[i + 1]; + start_1.x += 25 / zoom; + end_1.x -= 25 / zoom; + Vector2 start_2 = start_1; + Vector2 end_2 = end_1; + start_2.y = midpoint; + end_2.y = midpoint; + if (i == length - 2) { + DrawAAPolyLineNonAlloc(thickness, gridPoints[i], start_1); + Handles.color = gradient.Evaluate(0.25f); + DrawAAPolyLineNonAlloc(thickness, start_1, start_2); + Handles.color = gradient.Evaluate(0.5f); + DrawAAPolyLineNonAlloc(thickness, start_2, end_2); + Handles.color = gradient.Evaluate(0.75f); + DrawAAPolyLineNonAlloc(thickness, end_2, end_1); + Handles.color = gradient.Evaluate(1f); + DrawAAPolyLineNonAlloc(thickness, end_1, gridPoints[i + 1]); + } else { + DrawAAPolyLineNonAlloc(thickness, gridPoints[i], start_1); + DrawAAPolyLineNonAlloc(thickness, start_1, start_2); + DrawAAPolyLineNonAlloc(thickness, start_2, end_2); + DrawAAPolyLineNonAlloc(thickness, end_2, end_1); + DrawAAPolyLineNonAlloc(thickness, end_1, gridPoints[i + 1]); + } + } + } + break; + case NoodlePath.ShaderLab: + Vector2 start = gridPoints[0]; + Vector2 end = gridPoints[length - 1]; + //Modify first and last point in array so we can loop trough them nicely. + gridPoints[0] = gridPoints[0] + Vector2.right * (20 / zoom); + gridPoints[length - 1] = gridPoints[length - 1] + Vector2.left * (20 / zoom); + //Draw first vertical lines going out from nodes + Handles.color = gradient.Evaluate(0f); + DrawAAPolyLineNonAlloc(thickness, start, gridPoints[0]); + Handles.color = gradient.Evaluate(1f); + DrawAAPolyLineNonAlloc(thickness, end, gridPoints[length - 1]); + for (int i = 0; i < length - 1; i++) { + Vector2 point_a = gridPoints[i]; + Vector2 point_b = gridPoints[i + 1]; + // Draws the line with the coloring. + Vector2 prev_point = point_a; + // Approximately one segment per 5 pixels + int segments = (int) Vector2.Distance(point_a, point_b) / 5; + segments = Math.Max(segments, 1); + + int draw = 0; + for (int j = 0; j <= segments; j++) { + draw++; + float t = j / (float) segments; + Vector2 lerp = Vector2.Lerp(point_a, point_b, t); + if (draw > 0) { + if (i == length - 2) Handles.color = gradient.Evaluate(t); + DrawAAPolyLineNonAlloc(thickness, prev_point, lerp); + } + prev_point = lerp; + if (stroke == NoodleStroke.Dashed && draw >= 2) draw = -2; + } + } + gridPoints[0] = start; + gridPoints[length - 1] = end; + break; + } + Handles.color = originalHandlesColor; + } + + /// <summary> Draws all connections </summary> + public void DrawConnections() { + Vector2 mousePos = Event.current.mousePosition; + List<RerouteReference> selection = preBoxSelectionReroute != null ? new List<RerouteReference>(preBoxSelectionReroute) : new List<RerouteReference>(); + hoveredReroute = new RerouteReference(); + + List<Vector2> gridPoints = new List<Vector2>(2); + + Color col = GUI.color; + foreach (XNode.Node node in graph.nodes) { + //If a null node is found, return. This can happen if the nodes associated script is deleted. It is currently not possible in Unity to delete a null asset. + if (node == null) continue; + + // Draw full connections and output > reroute + foreach (XNode.NodePort output in node.Outputs) { + //Needs cleanup. Null checks are ugly + Rect fromRect; + if (!_portConnectionPoints.TryGetValue(output, out fromRect)) continue; + + Color portColor = graphEditor.GetPortColor(output); + for (int k = 0; k < output.ConnectionCount; k++) { + XNode.NodePort input = output.GetConnection(k); + + Gradient noodleGradient = graphEditor.GetNoodleGradient(output, input); + float noodleThickness = graphEditor.GetNoodleThickness(output, input); + NoodlePath noodlePath = graphEditor.GetNoodlePath(output, input); + NoodleStroke noodleStroke = graphEditor.GetNoodleStroke(output, input); + + // Error handling + if (input == null) continue; //If a script has been updated and the port doesn't exist, it is removed and null is returned. If this happens, return. + if (!input.IsConnectedTo(output)) input.Connect(output); + Rect toRect; + if (!_portConnectionPoints.TryGetValue(input, out toRect)) continue; + + List<Vector2> reroutePoints = output.GetReroutePoints(k); + + gridPoints.Clear(); + gridPoints.Add(fromRect.center); + gridPoints.AddRange(reroutePoints); + gridPoints.Add(toRect.center); + DrawNoodle(noodleGradient, noodlePath, noodleStroke, noodleThickness, gridPoints); + + // Loop through reroute points again and draw the points + for (int i = 0; i < reroutePoints.Count; i++) { + RerouteReference rerouteRef = new RerouteReference(output, k, i); + // Draw reroute point at position + Rect rect = new Rect(reroutePoints[i], new Vector2(12, 12)); + rect.position = new Vector2(rect.position.x - 6, rect.position.y - 6); + rect = GridToWindowRect(rect); + + // Draw selected reroute points with an outline + if (selectedReroutes.Contains(rerouteRef)) { + GUI.color = NodeEditorPreferences.GetSettings().highlightColor; + GUI.DrawTexture(rect, NodeEditorResources.dotOuter); + } + + GUI.color = portColor; + GUI.DrawTexture(rect, NodeEditorResources.dot); + if (rect.Overlaps(selectionBox)) selection.Add(rerouteRef); + if (rect.Contains(mousePos)) hoveredReroute = rerouteRef; + + } + } + } + } + GUI.color = col; + if (Event.current.type != EventType.Layout && currentActivity == NodeActivity.DragGrid) selectedReroutes = selection; + } + + private void DrawNodes() { + Event e = Event.current; + if (e.type == EventType.Layout) { + selectionCache = new List<UnityEngine.Object>(Selection.objects); + } + + System.Reflection.MethodInfo onValidate = null; + if (Selection.activeObject != null && Selection.activeObject is XNode.Node) { + onValidate = Selection.activeObject.GetType().GetMethod("OnValidate"); + if (onValidate != null) EditorGUI.BeginChangeCheck(); + } + + BeginZoomed(position, zoom, topPadding); + + Vector2 mousePos = Event.current.mousePosition; + + if (e.type != EventType.Layout) { + hoveredNode = null; + hoveredPort = null; + } + + List<UnityEngine.Object> preSelection = preBoxSelection != null ? new List<UnityEngine.Object>(preBoxSelection) : new List<UnityEngine.Object>(); + + // Selection box stuff + Vector2 boxStartPos = GridToWindowPositionNoClipped(dragBoxStart); + Vector2 boxSize = mousePos - boxStartPos; + if (boxSize.x < 0) { boxStartPos.x += boxSize.x; boxSize.x = Mathf.Abs(boxSize.x); } + if (boxSize.y < 0) { boxStartPos.y += boxSize.y; boxSize.y = Mathf.Abs(boxSize.y); } + Rect selectionBox = new Rect(boxStartPos, boxSize); + + //Save guiColor so we can revert it + Color guiColor = GUI.color; + + List<XNode.NodePort> removeEntries = new List<XNode.NodePort>(); + + if (e.type == EventType.Layout) culledNodes = new List<XNode.Node>(); + + for (int n = 0; n < graph.nodes.Count; n++) { + // Skip null nodes. The user could be in the process of renaming scripts, so removing them at this point is not advisable. + if (graph.nodes[n] == null) continue; + if (n >= graph.nodes.Count) return; + XNode.Node node = graph.nodes[n]; + + // Culling + if (e.type == EventType.Layout) { + // Cull unselected nodes outside view + if (!Selection.Contains(node) && ShouldBeCulled(node)) { + culledNodes.Add(node); + continue; + } + } else if (culledNodes.Contains(node)) continue; + + if (e.type == EventType.Repaint) { + removeEntries.Clear(); + foreach (var kvp in _portConnectionPoints) + if (kvp.Key.node == node) removeEntries.Add(kvp.Key); + foreach (var k in removeEntries) _portConnectionPoints.Remove(k); + } + + NodeEditor nodeEditor = NodeEditor.GetEditor(node, this); + + NodeEditor.portPositions.Clear(); + + // Set default label width. This is potentially overridden in OnBodyGUI + EditorGUIUtility.labelWidth = 84; + + //Get node position + Vector2 nodePos = GridToWindowPositionNoClipped(node.position); + + GUILayout.BeginArea(new Rect(nodePos, new Vector2(nodeEditor.GetWidth(), 4000))); + + bool selected = selectionCache.Contains(graph.nodes[n]); + + if (selected) { + GUIStyle style = new GUIStyle(nodeEditor.GetBodyStyle()); + GUIStyle highlightStyle = new GUIStyle(nodeEditor.GetBodyHighlightStyle()); + highlightStyle.padding = style.padding; + style.padding = new RectOffset(); + GUI.color = nodeEditor.GetTint(); + GUILayout.BeginVertical(style); + GUI.color = NodeEditorPreferences.GetSettings().highlightColor; + GUILayout.BeginVertical(new GUIStyle(highlightStyle)); + } else { + GUIStyle style = new GUIStyle(nodeEditor.GetBodyStyle()); + GUI.color = nodeEditor.GetTint(); + GUILayout.BeginVertical(style); + } + + GUI.color = guiColor; + EditorGUI.BeginChangeCheck(); + + //Draw node contents + nodeEditor.OnHeaderGUI(); + nodeEditor.OnBodyGUI(); + + //If user changed a value, notify other scripts through onUpdateNode + if (EditorGUI.EndChangeCheck()) { + if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node); + EditorUtility.SetDirty(node); + nodeEditor.serializedObject.ApplyModifiedProperties(); + } + + GUILayout.EndVertical(); + + //Cache data about the node for next frame + if (e.type == EventType.Repaint) { + Vector2 size = GUILayoutUtility.GetLastRect().size; + if (nodeSizes.ContainsKey(node)) nodeSizes[node] = size; + else nodeSizes.Add(node, size); + + foreach (var kvp in NodeEditor.portPositions) { + Vector2 portHandlePos = kvp.Value; + portHandlePos += node.position; + Rect rect = new Rect(portHandlePos.x - 8, portHandlePos.y - 8, 16, 16); + portConnectionPoints[kvp.Key] = rect; + } + } + + if (selected) GUILayout.EndVertical(); + + if (e.type != EventType.Layout) { + //Check if we are hovering this node + Vector2 nodeSize = GUILayoutUtility.GetLastRect().size; + Rect windowRect = new Rect(nodePos, nodeSize); + if (windowRect.Contains(mousePos)) hoveredNode = node; + + //If dragging a selection box, add nodes inside to selection + if (currentActivity == NodeActivity.DragGrid) { + if (windowRect.Overlaps(selectionBox)) preSelection.Add(node); + } + + //Check if we are hovering any of this nodes ports + //Check input ports + foreach (XNode.NodePort input in node.Inputs) { + //Check if port rect is available + if (!portConnectionPoints.ContainsKey(input)) continue; + Rect r = GridToWindowRectNoClipped(portConnectionPoints[input]); + if (r.Contains(mousePos)) hoveredPort = input; + } + //Check all output ports + foreach (XNode.NodePort output in node.Outputs) { + //Check if port rect is available + if (!portConnectionPoints.ContainsKey(output)) continue; + Rect r = GridToWindowRectNoClipped(portConnectionPoints[output]); + if (r.Contains(mousePos)) hoveredPort = output; + } + } + + GUILayout.EndArea(); + } + + if (e.type != EventType.Layout && currentActivity == NodeActivity.DragGrid) Selection.objects = preSelection.ToArray(); + EndZoomed(position, zoom, topPadding); + + //If a change in is detected in the selected node, call OnValidate method. + //This is done through reflection because OnValidate is only relevant in editor, + //and thus, the code should not be included in build. + if (onValidate != null && EditorGUI.EndChangeCheck()) onValidate.Invoke(Selection.activeObject, null); + } + + private bool ShouldBeCulled(XNode.Node node) { + + Vector2 nodePos = GridToWindowPositionNoClipped(node.position); + if (nodePos.x / _zoom > position.width) return true; // Right + else if (nodePos.y / _zoom > position.height) return true; // Bottom + else if (nodeSizes.ContainsKey(node)) { + Vector2 size = nodeSizes[node]; + if (nodePos.x + size.x < 0) return true; // Left + else if (nodePos.y + size.y < 0) return true; // Top + } + return false; + } + + private void DrawTooltip() { + if (hoveredPort != null && NodeEditorPreferences.GetSettings().portTooltips && graphEditor != null) { + string tooltip = graphEditor.GetPortTooltip(hoveredPort); + if (string.IsNullOrEmpty(tooltip)) return; + GUIContent content = new GUIContent(tooltip); + Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content); + size.x += 8; + Rect rect = new Rect(Event.current.mousePosition - (size), size); + EditorGUI.LabelField(rect, content, NodeEditorResources.styles.tooltip); + Repaint(); + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs.meta new file mode 100644 index 00000000..543878b8 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 756276bfe9a0c2f4da3930ba1964f58d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs new file mode 100644 index 00000000..3574acef --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs @@ -0,0 +1,517 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; + +namespace XNodeEditor { + /// <summary> xNode-specific version of <see cref="EditorGUILayout"/> </summary> + public static class NodeEditorGUILayout { + + private static readonly Dictionary<UnityEngine.Object, Dictionary<string, ReorderableList>> reorderableListCache = new Dictionary<UnityEngine.Object, Dictionary<string, ReorderableList>>(); + private static int reorderableListIndex = -1; + + /// <summary> Make a field for a serialized property. Automatically displays relevant node port. </summary> + public static void PropertyField(SerializedProperty property, bool includeChildren = true, params GUILayoutOption[] options) { + PropertyField(property, (GUIContent) null, includeChildren, options); + } + + /// <summary> Make a field for a serialized property. Automatically displays relevant node port. </summary> + public static void PropertyField(SerializedProperty property, GUIContent label, bool includeChildren = true, params GUILayoutOption[] options) { + if (property == null) throw new NullReferenceException(); + XNode.Node node = property.serializedObject.targetObject as XNode.Node; + XNode.NodePort port = node.GetPort(property.name); + PropertyField(property, label, port, includeChildren); + } + + /// <summary> Make a field for a serialized property. Manual node port override. </summary> + public static void PropertyField(SerializedProperty property, XNode.NodePort port, bool includeChildren = true, params GUILayoutOption[] options) { + PropertyField(property, null, port, includeChildren, options); + } + + /// <summary> Make a field for a serialized property. Manual node port override. </summary> + public static void PropertyField(SerializedProperty property, GUIContent label, XNode.NodePort port, bool includeChildren = true, params GUILayoutOption[] options) { + if (property == null) throw new NullReferenceException(); + + // If property is not a port, display a regular property field + if (port == null) EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); + else { + Rect rect = new Rect(); + + List<PropertyAttribute> propertyAttributes = NodeEditorUtilities.GetCachedPropertyAttribs(port.node.GetType(), property.name); + + // If property is an input, display a regular property field and put a port handle on the left side + if (port.direction == XNode.NodePort.IO.Input) { + // Get data from [Input] attribute + XNode.Node.ShowBackingValue showBacking = XNode.Node.ShowBackingValue.Unconnected; + XNode.Node.InputAttribute inputAttribute; + bool dynamicPortList = false; + if (NodeEditorUtilities.GetCachedAttrib(port.node.GetType(), property.name, out inputAttribute)) { + dynamicPortList = inputAttribute.dynamicPortList; + showBacking = inputAttribute.backingValue; + } + + bool usePropertyAttributes = dynamicPortList || + showBacking == XNode.Node.ShowBackingValue.Never || + (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected); + + float spacePadding = 0; + foreach (var attr in propertyAttributes) { + if (attr is SpaceAttribute) { + if (usePropertyAttributes) GUILayout.Space((attr as SpaceAttribute).height); + else spacePadding += (attr as SpaceAttribute).height; + } else if (attr is HeaderAttribute) { + if (usePropertyAttributes) { + //GUI Values are from https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/ScriptAttributeGUI/Implementations/DecoratorDrawers.cs + Rect position = GUILayoutUtility.GetRect(0, (EditorGUIUtility.singleLineHeight * 1.5f) - EditorGUIUtility.standardVerticalSpacing); //Layout adds standardVerticalSpacing after rect so we subtract it. + position.yMin += EditorGUIUtility.singleLineHeight * 0.5f; + position = EditorGUI.IndentedRect(position); + GUI.Label(position, (attr as HeaderAttribute).header, EditorStyles.boldLabel); + } else spacePadding += EditorGUIUtility.singleLineHeight * 1.5f; + } + } + + if (dynamicPortList) { + Type type = GetType(property); + XNode.Node.ConnectionType connectionType = inputAttribute != null ? inputAttribute.connectionType : XNode.Node.ConnectionType.Multiple; + DynamicPortList(property.name, type, property.serializedObject, port.direction, connectionType); + return; + } + switch (showBacking) { + case XNode.Node.ShowBackingValue.Unconnected: + // Display a label if port is connected + if (port.IsConnected) EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName)); + // Display an editable property field if port is not connected + else EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); + break; + case XNode.Node.ShowBackingValue.Never: + // Display a label + EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName)); + break; + case XNode.Node.ShowBackingValue.Always: + // Display an editable property field + EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); + break; + } + + rect = GUILayoutUtility.GetLastRect(); + rect.position = rect.position - new Vector2(16, -spacePadding); + // If property is an output, display a text label and put a port handle on the right side + } else if (port.direction == XNode.NodePort.IO.Output) { + // Get data from [Output] attribute + XNode.Node.ShowBackingValue showBacking = XNode.Node.ShowBackingValue.Unconnected; + XNode.Node.OutputAttribute outputAttribute; + bool dynamicPortList = false; + if (NodeEditorUtilities.GetCachedAttrib(port.node.GetType(), property.name, out outputAttribute)) { + dynamicPortList = outputAttribute.dynamicPortList; + showBacking = outputAttribute.backingValue; + } + + bool usePropertyAttributes = dynamicPortList || + showBacking == XNode.Node.ShowBackingValue.Never || + (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected); + + float spacePadding = 0; + foreach (var attr in propertyAttributes) { + if (attr is SpaceAttribute) { + if (usePropertyAttributes) GUILayout.Space((attr as SpaceAttribute).height); + else spacePadding += (attr as SpaceAttribute).height; + } else if (attr is HeaderAttribute) { + if (usePropertyAttributes) { + //GUI Values are from https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/ScriptAttributeGUI/Implementations/DecoratorDrawers.cs + Rect position = GUILayoutUtility.GetRect(0, (EditorGUIUtility.singleLineHeight * 1.5f) - EditorGUIUtility.standardVerticalSpacing); //Layout adds standardVerticalSpacing after rect so we subtract it. + position.yMin += EditorGUIUtility.singleLineHeight * 0.5f; + position = EditorGUI.IndentedRect(position); + GUI.Label(position, (attr as HeaderAttribute).header, EditorStyles.boldLabel); + } else spacePadding += EditorGUIUtility.singleLineHeight * 1.5f; + } + } + + if (dynamicPortList) { + Type type = GetType(property); + XNode.Node.ConnectionType connectionType = outputAttribute != null ? outputAttribute.connectionType : XNode.Node.ConnectionType.Multiple; + DynamicPortList(property.name, type, property.serializedObject, port.direction, connectionType); + return; + } + switch (showBacking) { + case XNode.Node.ShowBackingValue.Unconnected: + // Display a label if port is connected + if (port.IsConnected) EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30)); + // Display an editable property field if port is not connected + else EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); + break; + case XNode.Node.ShowBackingValue.Never: + // Display a label + EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30)); + break; + case XNode.Node.ShowBackingValue.Always: + // Display an editable property field + EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); + break; + } + + rect = GUILayoutUtility.GetLastRect(); + rect.position = rect.position + new Vector2(rect.width, spacePadding); + } + + rect.size = new Vector2(16, 16); + + NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current); + Color backgroundColor = editor.GetTint(); + Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port); + DrawPortHandle(rect, backgroundColor, col); + + // Register the handle position + Vector2 portPos = rect.center; + NodeEditor.portPositions[port] = portPos; + } + } + + private static System.Type GetType(SerializedProperty property) { + System.Type parentType = property.serializedObject.targetObject.GetType(); + System.Reflection.FieldInfo fi = parentType.GetFieldInfo(property.name); + return fi.FieldType; + } + + /// <summary> Make a simple port field. </summary> + public static void PortField(XNode.NodePort port, params GUILayoutOption[] options) { + PortField(null, port, options); + } + + /// <summary> Make a simple port field. </summary> + public static void PortField(GUIContent label, XNode.NodePort port, params GUILayoutOption[] options) { + if (port == null) return; + if (options == null) options = new GUILayoutOption[] { GUILayout.MinWidth(30) }; + Vector2 position = Vector3.zero; + GUIContent content = label != null ? label : new GUIContent(ObjectNames.NicifyVariableName(port.fieldName)); + + // If property is an input, display a regular property field and put a port handle on the left side + if (port.direction == XNode.NodePort.IO.Input) { + // Display a label + EditorGUILayout.LabelField(content, options); + + Rect rect = GUILayoutUtility.GetLastRect(); + position = rect.position - new Vector2(16, 0); + } + // If property is an output, display a text label and put a port handle on the right side + else if (port.direction == XNode.NodePort.IO.Output) { + // Display a label + EditorGUILayout.LabelField(content, NodeEditorResources.OutputPort, options); + + Rect rect = GUILayoutUtility.GetLastRect(); + position = rect.position + new Vector2(rect.width, 0); + } + PortField(position, port); + } + + /// <summary> Make a simple port field. </summary> + public static void PortField(Vector2 position, XNode.NodePort port) { + if (port == null) return; + + Rect rect = new Rect(position, new Vector2(16, 16)); + + NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current); + Color backgroundColor = editor.GetTint(); + Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port); + DrawPortHandle(rect, backgroundColor, col); + + // Register the handle position + Vector2 portPos = rect.center; + NodeEditor.portPositions[port] = portPos; + } + + /// <summary> Add a port field to previous layout element. </summary> + public static void AddPortField(XNode.NodePort port) { + if (port == null) return; + Rect rect = new Rect(); + + // If property is an input, display a regular property field and put a port handle on the left side + if (port.direction == XNode.NodePort.IO.Input) { + rect = GUILayoutUtility.GetLastRect(); + rect.position = rect.position - new Vector2(16, 0); + // If property is an output, display a text label and put a port handle on the right side + } else if (port.direction == XNode.NodePort.IO.Output) { + rect = GUILayoutUtility.GetLastRect(); + rect.position = rect.position + new Vector2(rect.width, 0); + } + + rect.size = new Vector2(16, 16); + + NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current); + Color backgroundColor = editor.GetTint(); + Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port); + DrawPortHandle(rect, backgroundColor, col); + + // Register the handle position + Vector2 portPos = rect.center; + NodeEditor.portPositions[port] = portPos; + } + + /// <summary> Draws an input and an output port on the same line </summary> + public static void PortPair(XNode.NodePort input, XNode.NodePort output) { + GUILayout.BeginHorizontal(); + NodeEditorGUILayout.PortField(input, GUILayout.MinWidth(0)); + NodeEditorGUILayout.PortField(output, GUILayout.MinWidth(0)); + GUILayout.EndHorizontal(); + } + + public static void DrawPortHandle(Rect rect, Color backgroundColor, Color typeColor) { + Color col = GUI.color; + GUI.color = backgroundColor; + GUI.DrawTexture(rect, NodeEditorResources.dotOuter); + GUI.color = typeColor; + GUI.DrawTexture(rect, NodeEditorResources.dot); + GUI.color = col; + } + +#region Obsolete + [Obsolete("Use IsDynamicPortListPort instead")] + public static bool IsInstancePortListPort(XNode.NodePort port) { + return IsDynamicPortListPort(port); + } + + [Obsolete("Use DynamicPortList instead")] + public static void InstancePortList(string fieldName, Type type, SerializedObject serializedObject, XNode.NodePort.IO io, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, XNode.Node.TypeConstraint typeConstraint = XNode.Node.TypeConstraint.None, Action<ReorderableList> onCreation = null) { + DynamicPortList(fieldName, type, serializedObject, io, connectionType, typeConstraint, onCreation); + } +#endregion + + /// <summary> Is this port part of a DynamicPortList? </summary> + public static bool IsDynamicPortListPort(XNode.NodePort port) { + string[] parts = port.fieldName.Split(' '); + if (parts.Length != 2) return false; + Dictionary<string, ReorderableList> cache; + if (reorderableListCache.TryGetValue(port.node, out cache)) { + ReorderableList list; + if (cache.TryGetValue(parts[0], out list)) return true; + } + return false; + } + + /// <summary> Draw an editable list of dynamic ports. Port names are named as "[fieldName] [index]" </summary> + /// <param name="fieldName">Supply a list for editable values</param> + /// <param name="type">Value type of added dynamic ports</param> + /// <param name="serializedObject">The serializedObject of the node</param> + /// <param name="connectionType">Connection type of added dynamic ports</param> + /// <param name="onCreation">Called on the list on creation. Use this if you want to customize the created ReorderableList</param> + public static void DynamicPortList(string fieldName, Type type, SerializedObject serializedObject, XNode.NodePort.IO io, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, XNode.Node.TypeConstraint typeConstraint = XNode.Node.TypeConstraint.None, Action<ReorderableList> onCreation = null) { + XNode.Node node = serializedObject.targetObject as XNode.Node; + + var indexedPorts = node.DynamicPorts.Select(x => { + string[] split = x.fieldName.Split(' '); + if (split != null && split.Length == 2 && split[0] == fieldName) { + int i = -1; + if (int.TryParse(split[1], out i)) { + return new { index = i, port = x }; + } + } + return new { index = -1, port = (XNode.NodePort) null }; + }).Where(x => x.port != null); + List<XNode.NodePort> dynamicPorts = indexedPorts.OrderBy(x => x.index).Select(x => x.port).ToList(); + + node.UpdatePorts(); + + ReorderableList list = null; + Dictionary<string, ReorderableList> rlc; + if (reorderableListCache.TryGetValue(serializedObject.targetObject, out rlc)) { + if (!rlc.TryGetValue(fieldName, out list)) list = null; + } + // If a ReorderableList isn't cached for this array, do so. + if (list == null) { + SerializedProperty arrayData = serializedObject.FindProperty(fieldName); + list = CreateReorderableList(fieldName, dynamicPorts, arrayData, type, serializedObject, io, connectionType, typeConstraint, onCreation); + if (reorderableListCache.TryGetValue(serializedObject.targetObject, out rlc)) rlc.Add(fieldName, list); + else reorderableListCache.Add(serializedObject.targetObject, new Dictionary<string, ReorderableList>() { { fieldName, list } }); + } + list.list = dynamicPorts; + list.DoLayoutList(); + + } + + private static ReorderableList CreateReorderableList(string fieldName, List<XNode.NodePort> dynamicPorts, SerializedProperty arrayData, Type type, SerializedObject serializedObject, XNode.NodePort.IO io, XNode.Node.ConnectionType connectionType, XNode.Node.TypeConstraint typeConstraint, Action<ReorderableList> onCreation) { + bool hasArrayData = arrayData != null && arrayData.isArray; + XNode.Node node = serializedObject.targetObject as XNode.Node; + ReorderableList list = new ReorderableList(dynamicPorts, null, true, true, true, true); + string label = arrayData != null ? arrayData.displayName : ObjectNames.NicifyVariableName(fieldName); + + list.drawElementCallback = + (Rect rect, int index, bool isActive, bool isFocused) => { + XNode.NodePort port = node.GetPort(fieldName + " " + index); + if (hasArrayData && arrayData.propertyType != SerializedPropertyType.String) { + if (arrayData.arraySize <= index) { + EditorGUI.LabelField(rect, "Array[" + index + "] data out of range"); + return; + } + SerializedProperty itemData = arrayData.GetArrayElementAtIndex(index); + EditorGUI.PropertyField(rect, itemData, true); + } else EditorGUI.LabelField(rect, port != null ? port.fieldName : ""); + if (port != null) { + Vector2 pos = rect.position + (port.IsOutput?new Vector2(rect.width + 6, 0) : new Vector2(-36, 0)); + NodeEditorGUILayout.PortField(pos, port); + } + }; + list.elementHeightCallback = + (int index) => { + if (hasArrayData) { + if (arrayData.arraySize <= index) return EditorGUIUtility.singleLineHeight; + SerializedProperty itemData = arrayData.GetArrayElementAtIndex(index); + return EditorGUI.GetPropertyHeight(itemData); + } else return EditorGUIUtility.singleLineHeight; + }; + list.drawHeaderCallback = + (Rect rect) => { + EditorGUI.LabelField(rect, label); + }; + list.onSelectCallback = + (ReorderableList rl) => { + reorderableListIndex = rl.index; + }; + list.onReorderCallback = + (ReorderableList rl) => { + bool hasRect = false; + bool hasNewRect = false; + Rect rect = Rect.zero; + Rect newRect = Rect.zero; + // Move up + if (rl.index > reorderableListIndex) { + for (int i = reorderableListIndex; i < rl.index; ++i) { + XNode.NodePort port = node.GetPort(fieldName + " " + i); + XNode.NodePort nextPort = node.GetPort(fieldName + " " + (i + 1)); + port.SwapConnections(nextPort); + + // Swap cached positions to mitigate twitching + hasRect = NodeEditorWindow.current.portConnectionPoints.TryGetValue(port, out rect); + hasNewRect = NodeEditorWindow.current.portConnectionPoints.TryGetValue(nextPort, out newRect); + NodeEditorWindow.current.portConnectionPoints[port] = hasNewRect?newRect:rect; + NodeEditorWindow.current.portConnectionPoints[nextPort] = hasRect?rect:newRect; + } + } + // Move down + else { + for (int i = reorderableListIndex; i > rl.index; --i) { + XNode.NodePort port = node.GetPort(fieldName + " " + i); + XNode.NodePort nextPort = node.GetPort(fieldName + " " + (i - 1)); + port.SwapConnections(nextPort); + + // Swap cached positions to mitigate twitching + hasRect = NodeEditorWindow.current.portConnectionPoints.TryGetValue(port, out rect); + hasNewRect = NodeEditorWindow.current.portConnectionPoints.TryGetValue(nextPort, out newRect); + NodeEditorWindow.current.portConnectionPoints[port] = hasNewRect?newRect:rect; + NodeEditorWindow.current.portConnectionPoints[nextPort] = hasRect?rect:newRect; + } + } + // Apply changes + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); + + // Move array data if there is any + if (hasArrayData) { + arrayData.MoveArrayElement(reorderableListIndex, rl.index); + } + + // Apply changes + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); + NodeEditorWindow.current.Repaint(); + EditorApplication.delayCall += NodeEditorWindow.current.Repaint; + }; + list.onAddCallback = + (ReorderableList rl) => { + // Add dynamic port postfixed with an index number + string newName = fieldName + " 0"; + int i = 0; + while (node.HasPort(newName)) newName = fieldName + " " + (++i); + + if (io == XNode.NodePort.IO.Output) node.AddDynamicOutput(type, connectionType, XNode.Node.TypeConstraint.None, newName); + else node.AddDynamicInput(type, connectionType, typeConstraint, newName); + serializedObject.Update(); + EditorUtility.SetDirty(node); + if (hasArrayData) { + arrayData.InsertArrayElementAtIndex(arrayData.arraySize); + } + serializedObject.ApplyModifiedProperties(); + }; + list.onRemoveCallback = + (ReorderableList rl) => { + + var indexedPorts = node.DynamicPorts.Select(x => { + string[] split = x.fieldName.Split(' '); + if (split != null && split.Length == 2 && split[0] == fieldName) { + int i = -1; + if (int.TryParse(split[1], out i)) { + return new { index = i, port = x }; + } + } + return new { index = -1, port = (XNode.NodePort) null }; + }).Where(x => x.port != null); + dynamicPorts = indexedPorts.OrderBy(x => x.index).Select(x => x.port).ToList(); + + int index = rl.index; + + if (dynamicPorts[index] == null) { + Debug.LogWarning("No port found at index " + index + " - Skipped"); + } else if (dynamicPorts.Count <= index) { + Debug.LogWarning("DynamicPorts[" + index + "] out of range. Length was " + dynamicPorts.Count + " - Skipped"); + } else { + + // Clear the removed ports connections + dynamicPorts[index].ClearConnections(); + // Move following connections one step up to replace the missing connection + for (int k = index + 1; k < dynamicPorts.Count(); k++) { + for (int j = 0; j < dynamicPorts[k].ConnectionCount; j++) { + XNode.NodePort other = dynamicPorts[k].GetConnection(j); + dynamicPorts[k].Disconnect(other); + dynamicPorts[k - 1].Connect(other); + } + } + // Remove the last dynamic port, to avoid messing up the indexing + node.RemoveDynamicPort(dynamicPorts[dynamicPorts.Count() - 1].fieldName); + serializedObject.Update(); + EditorUtility.SetDirty(node); + } + + if (hasArrayData && arrayData.propertyType != SerializedPropertyType.String) { + if (arrayData.arraySize <= index) { + Debug.LogWarning("Attempted to remove array index " + index + " where only " + arrayData.arraySize + " exist - Skipped"); + Debug.Log(rl.list[0]); + return; + } + arrayData.DeleteArrayElementAtIndex(index); + // Error handling. If the following happens too often, file a bug report at https://github.com/Siccity/xNode/issues + if (dynamicPorts.Count <= arrayData.arraySize) { + while (dynamicPorts.Count <= arrayData.arraySize) { + arrayData.DeleteArrayElementAtIndex(arrayData.arraySize - 1); + } + UnityEngine.Debug.LogWarning("Array size exceeded dynamic ports size. Excess items removed."); + } + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); + } + }; + + if (hasArrayData) { + int dynamicPortCount = dynamicPorts.Count; + while (dynamicPortCount < arrayData.arraySize) { + // Add dynamic port postfixed with an index number + string newName = arrayData.name + " 0"; + int i = 0; + while (node.HasPort(newName)) newName = arrayData.name + " " + (++i); + if (io == XNode.NodePort.IO.Output) node.AddDynamicOutput(type, connectionType, typeConstraint, newName); + else node.AddDynamicInput(type, connectionType, typeConstraint, newName); + EditorUtility.SetDirty(node); + dynamicPortCount++; + } + while (arrayData.arraySize < dynamicPortCount) { + arrayData.InsertArrayElementAtIndex(arrayData.arraySize); + } + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); + } + if (onCreation != null) onCreation(list); + return list; + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs.meta new file mode 100644 index 00000000..89596e2b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorGUILayout.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d6c2d118d1c77948a23f2f4a34d1f64 +timeCreated: 1507966608 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs new file mode 100644 index 00000000..72eb8aaf --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs @@ -0,0 +1,253 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.Serialization; + +namespace XNodeEditor { + public enum NoodlePath { Curvy, Straight, Angled, ShaderLab } + public enum NoodleStroke { Full, Dashed } + + public static class NodeEditorPreferences { + + /// <summary> The last editor we checked. This should be the one we modify </summary> + private static XNodeEditor.NodeGraphEditor lastEditor; + /// <summary> The last key we checked. This should be the one we modify </summary> + private static string lastKey = "xNode.Settings"; + + private static Dictionary<Type, Color> typeColors = new Dictionary<Type, Color>(); + private static Dictionary<string, Settings> settings = new Dictionary<string, Settings>(); + + [System.Serializable] + public class Settings : ISerializationCallbackReceiver { + [SerializeField] private Color32 _gridLineColor = new Color(0.45f, 0.45f, 0.45f); + public Color32 gridLineColor { get { return _gridLineColor; } set { _gridLineColor = value; _gridTexture = null; _crossTexture = null; } } + + [SerializeField] private Color32 _gridBgColor = new Color(0.18f, 0.18f, 0.18f); + public Color32 gridBgColor { get { return _gridBgColor; } set { _gridBgColor = value; _gridTexture = null; } } + + [Obsolete("Use maxZoom instead")] + public float zoomOutLimit { get { return maxZoom; } set { maxZoom = value; } } + + [UnityEngine.Serialization.FormerlySerializedAs("zoomOutLimit")] + public float maxZoom = 5f; + public float minZoom = 1f; + public Color32 highlightColor = new Color32(255, 255, 255, 255); + public bool gridSnap = true; + public bool autoSave = true; + public bool dragToCreate = true; + public bool zoomToMouse = true; + public bool portTooltips = true; + [SerializeField] private string typeColorsData = ""; + [NonSerialized] public Dictionary<string, Color> typeColors = new Dictionary<string, Color>(); + [FormerlySerializedAs("noodleType")] public NoodlePath noodlePath = NoodlePath.Curvy; + public NoodleStroke noodleStroke = NoodleStroke.Full; + + private Texture2D _gridTexture; + public Texture2D gridTexture { + get { + if (_gridTexture == null) _gridTexture = NodeEditorResources.GenerateGridTexture(gridLineColor, gridBgColor); + return _gridTexture; + } + } + private Texture2D _crossTexture; + public Texture2D crossTexture { + get { + if (_crossTexture == null) _crossTexture = NodeEditorResources.GenerateCrossTexture(gridLineColor); + return _crossTexture; + } + } + + public void OnAfterDeserialize() { + // Deserialize typeColorsData + typeColors = new Dictionary<string, Color>(); + string[] data = typeColorsData.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < data.Length; i += 2) { + Color col; + if (ColorUtility.TryParseHtmlString("#" + data[i + 1], out col)) { + typeColors.Add(data[i], col); + } + } + } + + public void OnBeforeSerialize() { + // Serialize typeColors + typeColorsData = ""; + foreach (var item in typeColors) { + typeColorsData += item.Key + "," + ColorUtility.ToHtmlStringRGB(item.Value) + ","; + } + } + } + + /// <summary> Get settings of current active editor </summary> + public static Settings GetSettings() { + if (XNodeEditor.NodeEditorWindow.current == null) return new Settings(); + + if (lastEditor != XNodeEditor.NodeEditorWindow.current.graphEditor) { + object[] attribs = XNodeEditor.NodeEditorWindow.current.graphEditor.GetType().GetCustomAttributes(typeof(XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute), true); + if (attribs.Length == 1) { + XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute attrib = attribs[0] as XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute; + lastEditor = XNodeEditor.NodeEditorWindow.current.graphEditor; + lastKey = attrib.editorPrefsKey; + } else return null; + } + if (!settings.ContainsKey(lastKey)) VerifyLoaded(); + return settings[lastKey]; + } + +#if UNITY_2019_1_OR_NEWER + [SettingsProvider] + public static SettingsProvider CreateXNodeSettingsProvider() { + SettingsProvider provider = new SettingsProvider("Preferences/Node Editor", SettingsScope.User) { + guiHandler = (searchContext) => { XNodeEditor.NodeEditorPreferences.PreferencesGUI(); }, + keywords = new HashSet<string>(new [] { "xNode", "node", "editor", "graph", "connections", "noodles", "ports" }) + }; + return provider; + } +#endif + +#if !UNITY_2019_1_OR_NEWER + [PreferenceItem("Node Editor")] +#endif + private static void PreferencesGUI() { + VerifyLoaded(); + Settings settings = NodeEditorPreferences.settings[lastKey]; + + if (GUILayout.Button(new GUIContent("Documentation", "https://github.com/Siccity/xNode/wiki"), GUILayout.Width(100))) Application.OpenURL("https://github.com/Siccity/xNode/wiki"); + EditorGUILayout.Space(); + + NodeSettingsGUI(lastKey, settings); + GridSettingsGUI(lastKey, settings); + SystemSettingsGUI(lastKey, settings); + TypeColorsGUI(lastKey, settings); + if (GUILayout.Button(new GUIContent("Set Default", "Reset all values to default"), GUILayout.Width(120))) { + ResetPrefs(); + } + } + + private static void GridSettingsGUI(string key, Settings settings) { + //Label + EditorGUILayout.LabelField("Grid", EditorStyles.boldLabel); + settings.gridSnap = EditorGUILayout.Toggle(new GUIContent("Snap", "Hold CTRL in editor to invert"), settings.gridSnap); + settings.zoomToMouse = EditorGUILayout.Toggle(new GUIContent("Zoom to Mouse", "Zooms towards mouse position"), settings.zoomToMouse); + EditorGUILayout.LabelField("Zoom"); + EditorGUI.indentLevel++; + settings.maxZoom = EditorGUILayout.FloatField(new GUIContent("Max", "Upper limit to zoom"), settings.maxZoom); + settings.minZoom = EditorGUILayout.FloatField(new GUIContent("Min", "Lower limit to zoom"), settings.minZoom); + EditorGUI.indentLevel--; + settings.gridLineColor = EditorGUILayout.ColorField("Color", settings.gridLineColor); + settings.gridBgColor = EditorGUILayout.ColorField(" ", settings.gridBgColor); + if (GUI.changed) { + SavePrefs(key, settings); + + NodeEditorWindow.RepaintAll(); + } + EditorGUILayout.Space(); + } + + private static void SystemSettingsGUI(string key, Settings settings) { + //Label + EditorGUILayout.LabelField("System", EditorStyles.boldLabel); + settings.autoSave = EditorGUILayout.Toggle(new GUIContent("Autosave", "Disable for better editor performance"), settings.autoSave); + if (GUI.changed) SavePrefs(key, settings); + EditorGUILayout.Space(); + } + + private static void NodeSettingsGUI(string key, Settings settings) { + //Label + EditorGUILayout.LabelField("Node", EditorStyles.boldLabel); + settings.highlightColor = EditorGUILayout.ColorField("Selection", settings.highlightColor); + settings.noodlePath = (NoodlePath) EditorGUILayout.EnumPopup("Noodle path", (Enum) settings.noodlePath); + settings.noodleStroke = (NoodleStroke) EditorGUILayout.EnumPopup("Noodle stroke", (Enum) settings.noodleStroke); + settings.portTooltips = EditorGUILayout.Toggle("Port Tooltips", settings.portTooltips); + settings.dragToCreate = EditorGUILayout.Toggle(new GUIContent("Drag to Create", "Drag a port connection anywhere on the grid to create and connect a node"), settings.dragToCreate); + if (GUI.changed) { + SavePrefs(key, settings); + NodeEditorWindow.RepaintAll(); + } + EditorGUILayout.Space(); + } + + private static void TypeColorsGUI(string key, Settings settings) { + //Label + EditorGUILayout.LabelField("Types", EditorStyles.boldLabel); + + //Clone keys so we can enumerate the dictionary and make changes. + var typeColorKeys = new List<Type>(typeColors.Keys); + + //Display type colors. Save them if they are edited by the user + foreach (var type in typeColorKeys) { + string typeColorKey = NodeEditorUtilities.PrettyName(type); + Color col = typeColors[type]; + EditorGUI.BeginChangeCheck(); + EditorGUILayout.BeginHorizontal(); + col = EditorGUILayout.ColorField(typeColorKey, col); + EditorGUILayout.EndHorizontal(); + if (EditorGUI.EndChangeCheck()) { + typeColors[type] = col; + if (settings.typeColors.ContainsKey(typeColorKey)) settings.typeColors[typeColorKey] = col; + else settings.typeColors.Add(typeColorKey, col); + SavePrefs(key, settings); + NodeEditorWindow.RepaintAll(); + } + } + } + + /// <summary> Load prefs if they exist. Create if they don't </summary> + private static Settings LoadPrefs() { + // Create settings if it doesn't exist + if (!EditorPrefs.HasKey(lastKey)) { + if (lastEditor != null) EditorPrefs.SetString(lastKey, JsonUtility.ToJson(lastEditor.GetDefaultPreferences())); + else EditorPrefs.SetString(lastKey, JsonUtility.ToJson(new Settings())); + } + return JsonUtility.FromJson<Settings>(EditorPrefs.GetString(lastKey)); + } + + /// <summary> Delete all prefs </summary> + public static void ResetPrefs() { + if (EditorPrefs.HasKey(lastKey)) EditorPrefs.DeleteKey(lastKey); + if (settings.ContainsKey(lastKey)) settings.Remove(lastKey); + typeColors = new Dictionary<Type, Color>(); + VerifyLoaded(); + NodeEditorWindow.RepaintAll(); + } + + /// <summary> Save preferences in EditorPrefs </summary> + private static void SavePrefs(string key, Settings settings) { + EditorPrefs.SetString(key, JsonUtility.ToJson(settings)); + } + + /// <summary> Check if we have loaded settings for given key. If not, load them </summary> + private static void VerifyLoaded() { + if (!settings.ContainsKey(lastKey)) settings.Add(lastKey, LoadPrefs()); + } + + /// <summary> Return color based on type </summary> + public static Color GetTypeColor(System.Type type) { + VerifyLoaded(); + if (type == null) return Color.gray; + Color col; + if (!typeColors.TryGetValue(type, out col)) { + string typeName = type.PrettyName(); + if (settings[lastKey].typeColors.ContainsKey(typeName)) typeColors.Add(type, settings[lastKey].typeColors[typeName]); + else { +#if UNITY_5_4_OR_NEWER + UnityEngine.Random.State oldState = UnityEngine.Random.state; + UnityEngine.Random.InitState(typeName.GetHashCode()); +#else + int oldSeed = UnityEngine.Random.seed; + UnityEngine.Random.seed = typeName.GetHashCode(); +#endif + col = new Color(UnityEngine.Random.value, UnityEngine.Random.value, UnityEngine.Random.value); + typeColors.Add(type, col); +#if UNITY_5_4_OR_NEWER + UnityEngine.Random.state = oldState; +#else + UnityEngine.Random.seed = oldSeed; +#endif + } + } + return col; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs.meta new file mode 100644 index 00000000..156543b4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorPreferences.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6b1f47e387a6f714c9f2ff82a6888c85 +timeCreated: 1507920216 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs new file mode 100644 index 00000000..ff8d417f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace XNodeEditor { + /// <summary> Contains reflection-related extensions built for xNode </summary> + public static class NodeEditorReflection { + [NonSerialized] private static Dictionary<Type, Color> nodeTint; + [NonSerialized] private static Dictionary<Type, int> nodeWidth; + /// <summary> All available node types </summary> + public static Type[] nodeTypes { get { return _nodeTypes != null ? _nodeTypes : _nodeTypes = GetNodeTypes(); } } + + [NonSerialized] private static Type[] _nodeTypes = null; + + /// <summary> Return a delegate used to determine whether window is docked or not. It is faster to cache this delegate than run the reflection required each time. </summary> + public static Func<bool> GetIsDockedDelegate(this EditorWindow window) { + BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; + MethodInfo isDockedMethod = typeof(EditorWindow).GetProperty("docked", fullBinding).GetGetMethod(true); + return (Func<bool>) Delegate.CreateDelegate(typeof(Func<bool>), window, isDockedMethod); + } + + public static Type[] GetNodeTypes() { + //Get all classes deriving from Node via reflection + return GetDerivedTypes(typeof(XNode.Node)); + } + + /// <summary> Custom node tint colors defined with [NodeColor(r, g, b)] </summary> + public static bool TryGetAttributeTint(this Type nodeType, out Color tint) { + if (nodeTint == null) { + CacheAttributes<Color, XNode.Node.NodeTintAttribute>(ref nodeTint, x => x.color); + } + return nodeTint.TryGetValue(nodeType, out tint); + } + + /// <summary> Get custom node widths defined with [NodeWidth(width)] </summary> + public static bool TryGetAttributeWidth(this Type nodeType, out int width) { + if (nodeWidth == null) { + CacheAttributes<int, XNode.Node.NodeWidthAttribute>(ref nodeWidth, x => x.width); + } + return nodeWidth.TryGetValue(nodeType, out width); + } + + private static void CacheAttributes<V, A>(ref Dictionary<Type, V> dict, Func<A, V> getter) where A : Attribute { + dict = new Dictionary<Type, V>(); + for (int i = 0; i < nodeTypes.Length; i++) { + object[] attribs = nodeTypes[i].GetCustomAttributes(typeof(A), true); + if (attribs == null || attribs.Length == 0) continue; + A attrib = attribs[0] as A; + dict.Add(nodeTypes[i], getter(attrib)); + } + } + + /// <summary> Get FieldInfo of a field, including those that are private and/or inherited </summary> + public static FieldInfo GetFieldInfo(this Type type, string fieldName) { + // If we can't find field in the first run, it's probably a private field in a base class. + FieldInfo field = type.GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + // Search base classes for private fields only. Public fields are found above + while (field == null && (type = type.BaseType) != typeof(XNode.Node)) field = type.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance); + return field; + } + + /// <summary> Get all classes deriving from baseType via reflection </summary> + public static Type[] GetDerivedTypes(this Type baseType) { + List<System.Type> types = new List<System.Type>(); + System.Reflection.Assembly[] assemblies = System.AppDomain.CurrentDomain.GetAssemblies(); + foreach (Assembly assembly in assemblies) { + try { + types.AddRange(assembly.GetTypes().Where(t => !t.IsAbstract && baseType.IsAssignableFrom(t)).ToArray()); + } catch (ReflectionTypeLoadException) { } + } + return types.ToArray(); + } + + /// <summary> Find methods marked with the [ContextMenu] attribute and add them to the context menu </summary> + public static void AddCustomContextMenuItems(this GenericMenu contextMenu, object obj) { + KeyValuePair<ContextMenu, MethodInfo>[] items = GetContextMenuMethods(obj); + if (items.Length != 0) { + contextMenu.AddSeparator(""); + List<string> invalidatedEntries = new List<string>(); + foreach (KeyValuePair<ContextMenu, MethodInfo> checkValidate in items) { + if (checkValidate.Key.validate && !(bool) checkValidate.Value.Invoke(obj, null)) { + invalidatedEntries.Add(checkValidate.Key.menuItem); + } + } + for (int i = 0; i < items.Length; i++) { + KeyValuePair<ContextMenu, MethodInfo> kvp = items[i]; + if (invalidatedEntries.Contains(kvp.Key.menuItem)) { + contextMenu.AddDisabledItem(new GUIContent(kvp.Key.menuItem)); + } else { + contextMenu.AddItem(new GUIContent(kvp.Key.menuItem), false, () => kvp.Value.Invoke(obj, null)); + } + } + } + } + + /// <summary> Call OnValidate on target </summary> + public static void TriggerOnValidate(this UnityEngine.Object target) { + System.Reflection.MethodInfo onValidate = null; + if (target != null) { + onValidate = target.GetType().GetMethod("OnValidate", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + if (onValidate != null) onValidate.Invoke(target, null); + } + } + + public static KeyValuePair<ContextMenu, MethodInfo>[] GetContextMenuMethods(object obj) { + Type type = obj.GetType(); + MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); + List<KeyValuePair<ContextMenu, MethodInfo>> kvp = new List<KeyValuePair<ContextMenu, MethodInfo>>(); + for (int i = 0; i < methods.Length; i++) { + ContextMenu[] attribs = methods[i].GetCustomAttributes(typeof(ContextMenu), true).Select(x => x as ContextMenu).ToArray(); + if (attribs == null || attribs.Length == 0) continue; + if (methods[i].GetParameters().Length != 0) { + Debug.LogWarning("Method " + methods[i].DeclaringType.Name + "." + methods[i].Name + " has parameters and cannot be used for context menu commands."); + continue; + } + if (methods[i].IsStatic) { + Debug.LogWarning("Method " + methods[i].DeclaringType.Name + "." + methods[i].Name + " is static and cannot be used for context menu commands."); + continue; + } + + for (int k = 0; k < attribs.Length; k++) { + kvp.Add(new KeyValuePair<ContextMenu, MethodInfo>(attribs[k], methods[i])); + } + } +#if UNITY_5_5_OR_NEWER + //Sort menu items + kvp.Sort((x, y) => x.Key.priority.CompareTo(y.Key.priority)); +#endif + return kvp.ToArray(); + } + + /// <summary> Very crude. Uses a lot of reflection. </summary> + public static void OpenPreferences() { + try { +#if UNITY_2018_3_OR_NEWER + SettingsService.OpenUserPreferences("Preferences/Node Editor"); +#else + //Open preferences window + Assembly assembly = Assembly.GetAssembly(typeof(UnityEditor.EditorWindow)); + Type type = assembly.GetType("UnityEditor.PreferencesWindow"); + type.GetMethod("ShowPreferencesWindow", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, null); + + //Get the window + EditorWindow window = EditorWindow.GetWindow(type); + + //Make sure custom sections are added (because waiting for it to happen automatically is too slow) + FieldInfo refreshField = type.GetField("m_RefreshCustomPreferences", BindingFlags.NonPublic | BindingFlags.Instance); + if ((bool) refreshField.GetValue(window)) { + type.GetMethod("AddCustomSections", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(window, null); + refreshField.SetValue(window, false); + } + + //Get sections + FieldInfo sectionsField = type.GetField("m_Sections", BindingFlags.Instance | BindingFlags.NonPublic); + IList sections = sectionsField.GetValue(window) as IList; + + //Iterate through sections and check contents + Type sectionType = sectionsField.FieldType.GetGenericArguments() [0]; + FieldInfo sectionContentField = sectionType.GetField("content", BindingFlags.Instance | BindingFlags.Public); + for (int i = 0; i < sections.Count; i++) { + GUIContent sectionContent = sectionContentField.GetValue(sections[i]) as GUIContent; + if (sectionContent.text == "Node Editor") { + //Found contents - Set index + FieldInfo sectionIndexField = type.GetField("m_SelectedSectionIndex", BindingFlags.Instance | BindingFlags.NonPublic); + sectionIndexField.SetValue(window, i); + return; + } + } +#endif + } catch (Exception e) { + Debug.LogError(e); + Debug.LogWarning("Unity has changed around internally. Can't open properties through reflection. Please contact xNode developer and supply unity version number."); + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs.meta new file mode 100644 index 00000000..fe4ba9b4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorReflection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c78a0fa4a13abcd408ebe73006b7b1bb +timeCreated: 1505419458 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs new file mode 100644 index 00000000..b426f324 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs @@ -0,0 +1,87 @@ +using UnityEditor; +using UnityEngine; + +namespace XNodeEditor { + public static class NodeEditorResources { + // Textures + public static Texture2D dot { get { return _dot != null ? _dot : _dot = Resources.Load<Texture2D>("xnode_dot"); } } + private static Texture2D _dot; + public static Texture2D dotOuter { get { return _dotOuter != null ? _dotOuter : _dotOuter = Resources.Load<Texture2D>("xnode_dot_outer"); } } + private static Texture2D _dotOuter; + public static Texture2D nodeBody { get { return _nodeBody != null ? _nodeBody : _nodeBody = Resources.Load<Texture2D>("xnode_node"); } } + private static Texture2D _nodeBody; + public static Texture2D nodeHighlight { get { return _nodeHighlight != null ? _nodeHighlight : _nodeHighlight = Resources.Load<Texture2D>("xnode_node_highlight"); } } + private static Texture2D _nodeHighlight; + + // Styles + public static Styles styles { get { return _styles != null ? _styles : _styles = new Styles(); } } + public static Styles _styles = null; + public static GUIStyle OutputPort { get { return new GUIStyle(EditorStyles.label) { alignment = TextAnchor.UpperRight }; } } + public class Styles { + public GUIStyle inputPort, nodeHeader, nodeBody, tooltip, nodeHighlight; + + public Styles() { + GUIStyle baseStyle = new GUIStyle("Label"); + baseStyle.fixedHeight = 18; + + inputPort = new GUIStyle(baseStyle); + inputPort.alignment = TextAnchor.UpperLeft; + inputPort.padding.left = 10; + + nodeHeader = new GUIStyle(); + nodeHeader.alignment = TextAnchor.MiddleCenter; + nodeHeader.fontStyle = FontStyle.Bold; + nodeHeader.normal.textColor = Color.white; + + nodeBody = new GUIStyle(); + nodeBody.normal.background = NodeEditorResources.nodeBody; + nodeBody.border = new RectOffset(32, 32, 32, 32); + nodeBody.padding = new RectOffset(16, 16, 4, 16); + + nodeHighlight = new GUIStyle(); + nodeHighlight.normal.background = NodeEditorResources.nodeHighlight; + nodeHighlight.border = new RectOffset(32, 32, 32, 32); + + tooltip = new GUIStyle("helpBox"); + tooltip.alignment = TextAnchor.MiddleCenter; + } + } + + public static Texture2D GenerateGridTexture(Color line, Color bg) { + Texture2D tex = new Texture2D(64, 64); + Color[] cols = new Color[64 * 64]; + for (int y = 0; y < 64; y++) { + for (int x = 0; x < 64; x++) { + Color col = bg; + if (y % 16 == 0 || x % 16 == 0) col = Color.Lerp(line, bg, 0.65f); + if (y == 63 || x == 63) col = Color.Lerp(line, bg, 0.35f); + cols[(y * 64) + x] = col; + } + } + tex.SetPixels(cols); + tex.wrapMode = TextureWrapMode.Repeat; + tex.filterMode = FilterMode.Bilinear; + tex.name = "Grid"; + tex.Apply(); + return tex; + } + + public static Texture2D GenerateCrossTexture(Color line) { + Texture2D tex = new Texture2D(64, 64); + Color[] cols = new Color[64 * 64]; + for (int y = 0; y < 64; y++) { + for (int x = 0; x < 64; x++) { + Color col = line; + if (y != 31 && x != 31) col.a = 0; + cols[(y * 64) + x] = col; + } + } + tex.SetPixels(cols); + tex.wrapMode = TextureWrapMode.Clamp; + tex.filterMode = FilterMode.Bilinear; + tex.name = "Grid"; + tex.Apply(); + return tex; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs.meta new file mode 100644 index 00000000..5e85895b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorResources.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 69f55d341299026489b29443c3dd13d1 +timeCreated: 1505418919 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs new file mode 100644 index 00000000..a6ede849 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs @@ -0,0 +1,266 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace XNodeEditor { + /// <summary> A set of editor-only utilities and extensions for xNode </summary> + public static class NodeEditorUtilities { + + /// <summary>C#'s Script Icon [The one MonoBhevaiour Scripts have].</summary> + private static Texture2D scriptIcon = (EditorGUIUtility.IconContent("cs Script Icon").image as Texture2D); + + /// Saves Attribute from Type+Field for faster lookup. Resets on recompiles. + private static Dictionary<Type, Dictionary<string, Dictionary<Type, Attribute>>> typeAttributes = new Dictionary<Type, Dictionary<string, Dictionary<Type, Attribute>>>(); + + /// Saves ordered PropertyAttribute from Type+Field for faster lookup. Resets on recompiles. + private static Dictionary<Type, Dictionary<string, List<PropertyAttribute>>> typeOrderedPropertyAttributes = new Dictionary<Type, Dictionary<string, List<PropertyAttribute>>>(); + + public static bool GetAttrib<T>(Type classType, out T attribOut) where T : Attribute { + object[] attribs = classType.GetCustomAttributes(typeof(T), false); + return GetAttrib(attribs, out attribOut); + } + + public static bool GetAttrib<T>(object[] attribs, out T attribOut) where T : Attribute { + for (int i = 0; i < attribs.Length; i++) { + if (attribs[i] is T) { + attribOut = attribs[i] as T; + return true; + } + } + attribOut = null; + return false; + } + + public static bool GetAttrib<T>(Type classType, string fieldName, out T attribOut) where T : Attribute { + // If we can't find field in the first run, it's probably a private field in a base class. + FieldInfo field = classType.GetFieldInfo(fieldName); + // This shouldn't happen. Ever. + if (field == null) { + Debug.LogWarning("Field " + fieldName + " couldnt be found"); + attribOut = null; + return false; + } + object[] attribs = field.GetCustomAttributes(typeof(T), true); + return GetAttrib(attribs, out attribOut); + } + + public static bool HasAttrib<T>(object[] attribs) where T : Attribute { + for (int i = 0; i < attribs.Length; i++) { + if (attribs[i].GetType() == typeof(T)) { + return true; + } + } + return false; + } + + public static bool GetCachedAttrib<T>(Type classType, string fieldName, out T attribOut) where T : Attribute { + Dictionary<string, Dictionary<Type, Attribute>> typeFields; + if (!typeAttributes.TryGetValue(classType, out typeFields)) { + typeFields = new Dictionary<string, Dictionary<Type, Attribute>>(); + typeAttributes.Add(classType, typeFields); + } + + Dictionary<Type, Attribute> typeTypes; + if (!typeFields.TryGetValue(fieldName, out typeTypes)) { + typeTypes = new Dictionary<Type, Attribute>(); + typeFields.Add(fieldName, typeTypes); + } + + Attribute attr; + if (!typeTypes.TryGetValue(typeof(T), out attr)) { + if (GetAttrib<T>(classType, fieldName, out attribOut)) { + typeTypes.Add(typeof(T), attribOut); + return true; + } else typeTypes.Add(typeof(T), null); + } + + if (attr == null) { + attribOut = null; + return false; + } + + attribOut = attr as T; + return true; + } + + public static List<PropertyAttribute> GetCachedPropertyAttribs(Type classType, string fieldName) { + Dictionary<string, List<PropertyAttribute>> typeFields; + if (!typeOrderedPropertyAttributes.TryGetValue(classType, out typeFields)) { + typeFields = new Dictionary<string, List<PropertyAttribute>>(); + typeOrderedPropertyAttributes.Add(classType, typeFields); + } + + List<PropertyAttribute> typeAttributes; + if (!typeFields.TryGetValue(fieldName, out typeAttributes)) { + FieldInfo field = classType.GetFieldInfo(fieldName); + object[] attribs = field.GetCustomAttributes(typeof(PropertyAttribute), true); + typeAttributes = attribs.Cast<PropertyAttribute>().Reverse().ToList(); //Unity draws them in reverse + typeFields.Add(fieldName, typeAttributes); + } + + return typeAttributes; + } + + public static bool IsMac() { +#if UNITY_2017_1_OR_NEWER + return SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX; +#else + return SystemInfo.operatingSystem.StartsWith("Mac"); +#endif + } + + /// <summary> Returns true if this can be casted to <see cref="Type"/></summary> + public static bool IsCastableTo(this Type from, Type to) { + if (to.IsAssignableFrom(from)) return true; + var methods = from.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where( + m => m.ReturnType == to && + (m.Name == "op_Implicit" || + m.Name == "op_Explicit") + ); + return methods.Count() > 0; + } + + /// <summary> Return a prettiefied type name. </summary> + public static string PrettyName(this Type type) { + if (type == null) return "null"; + if (type == typeof(System.Object)) return "object"; + if (type == typeof(float)) return "float"; + else if (type == typeof(int)) return "int"; + else if (type == typeof(long)) return "long"; + else if (type == typeof(double)) return "double"; + else if (type == typeof(string)) return "string"; + else if (type == typeof(bool)) return "bool"; + else if (type.IsGenericType) { + string s = ""; + Type genericType = type.GetGenericTypeDefinition(); + if (genericType == typeof(List<>)) s = "List"; + else s = type.GetGenericTypeDefinition().ToString(); + + Type[] types = type.GetGenericArguments(); + string[] stypes = new string[types.Length]; + for (int i = 0; i < types.Length; i++) { + stypes[i] = types[i].PrettyName(); + } + return s + "<" + string.Join(", ", stypes) + ">"; + } else if (type.IsArray) { + string rank = ""; + for (int i = 1; i < type.GetArrayRank(); i++) { + rank += ","; + } + Type elementType = type.GetElementType(); + if (!elementType.IsArray) return elementType.PrettyName() + "[" + rank + "]"; + else { + string s = elementType.PrettyName(); + int i = s.IndexOf('['); + return s.Substring(0, i) + "[" + rank + "]" + s.Substring(i); + } + } else return type.ToString(); + } + + /// <summary> Returns the default name for the node type. </summary> + public static string NodeDefaultName(Type type) { + string typeName = type.Name; + // Automatically remove redundant 'Node' postfix + if (typeName.EndsWith("Node")) typeName = typeName.Substring(0, typeName.LastIndexOf("Node")); + typeName = UnityEditor.ObjectNames.NicifyVariableName(typeName); + return typeName; + } + + /// <summary> Returns the default creation path for the node type. </summary> + public static string NodeDefaultPath(Type type) { + string typePath = type.ToString().Replace('.', '/'); + // Automatically remove redundant 'Node' postfix + if (typePath.EndsWith("Node")) typePath = typePath.Substring(0, typePath.LastIndexOf("Node")); + typePath = UnityEditor.ObjectNames.NicifyVariableName(typePath); + return typePath; + } + + /// <summary>Creates a new C# Class.</summary> + [MenuItem("Assets/Create/xNode/Node C# Script", false, 89)] + private static void CreateNode() { + string[] guids = AssetDatabase.FindAssets("xNode_NodeTemplate.cs"); + if (guids.Length == 0) { + Debug.LogWarning("xNode_NodeTemplate.cs.txt not found in asset database"); + return; + } + string path = AssetDatabase.GUIDToAssetPath(guids[0]); + CreateFromTemplate( + "NewNode.cs", + path + ); + } + + /// <summary>Creates a new C# Class.</summary> + [MenuItem("Assets/Create/xNode/NodeGraph C# Script", false, 89)] + private static void CreateGraph() { + string[] guids = AssetDatabase.FindAssets("xNode_NodeGraphTemplate.cs"); + if (guids.Length == 0) { + Debug.LogWarning("xNode_NodeGraphTemplate.cs.txt not found in asset database"); + return; + } + string path = AssetDatabase.GUIDToAssetPath(guids[0]); + CreateFromTemplate( + "NewNodeGraph.cs", + path + ); + } + + public static void CreateFromTemplate(string initialName, string templatePath) { + ProjectWindowUtil.StartNameEditingIfProjectWindowExists( + 0, + ScriptableObject.CreateInstance<DoCreateCodeFile>(), + initialName, + scriptIcon, + templatePath + ); + } + + /// Inherits from EndNameAction, must override EndNameAction.Action + public class DoCreateCodeFile : UnityEditor.ProjectWindowCallback.EndNameEditAction { + public override void Action(int instanceId, string pathName, string resourceFile) { + Object o = CreateScript(pathName, resourceFile); + ProjectWindowUtil.ShowCreatedAsset(o); + } + } + + /// <summary>Creates Script from Template's path.</summary> + internal static UnityEngine.Object CreateScript(string pathName, string templatePath) { + string className = Path.GetFileNameWithoutExtension(pathName).Replace(" ", string.Empty); + string templateText = string.Empty; + + UTF8Encoding encoding = new UTF8Encoding(true, false); + + if (File.Exists(templatePath)) { + /// Read procedures. + StreamReader reader = new StreamReader(templatePath); + templateText = reader.ReadToEnd(); + reader.Close(); + + templateText = templateText.Replace("#SCRIPTNAME#", className); + templateText = templateText.Replace("#NOTRIM#", string.Empty); + /// You can replace as many tags you make on your templates, just repeat Replace function + /// e.g.: + /// templateText = templateText.Replace("#NEWTAG#", "MyText"); + + /// Write procedures. + + StreamWriter writer = new StreamWriter(Path.GetFullPath(pathName), false, encoding); + writer.Write(templateText); + writer.Close(); + + AssetDatabase.ImportAsset(pathName); + return AssetDatabase.LoadAssetAtPath(pathName, typeof(Object)); + } else { + Debug.LogError(string.Format("The template file was not found: {0}", templatePath)); + return null; + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs.meta new file mode 100644 index 00000000..a8988ef5 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorUtilities.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 120960fe5b50aba418a8e8ad3c4c4bc8 +timeCreated: 1506073499 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs new file mode 100644 index 00000000..f4b079d5 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs @@ -0,0 +1,216 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEngine; +using System; +using Object = UnityEngine.Object; + +namespace XNodeEditor { + [InitializeOnLoad] + public partial class NodeEditorWindow : EditorWindow { + public static NodeEditorWindow current; + + /// <summary> Stores node positions for all nodePorts. </summary> + public Dictionary<XNode.NodePort, Rect> portConnectionPoints { get { return _portConnectionPoints; } } + private Dictionary<XNode.NodePort, Rect> _portConnectionPoints = new Dictionary<XNode.NodePort, Rect>(); + [SerializeField] private NodePortReference[] _references = new NodePortReference[0]; + [SerializeField] private Rect[] _rects = new Rect[0]; + + private Func<bool> isDocked { + get { + if (_isDocked == null) _isDocked = this.GetIsDockedDelegate(); + return _isDocked; + } + } + private Func<bool> _isDocked; + + [System.Serializable] private class NodePortReference { + [SerializeField] private XNode.Node _node; + [SerializeField] private string _name; + + public NodePortReference(XNode.NodePort nodePort) { + _node = nodePort.node; + _name = nodePort.fieldName; + } + + public XNode.NodePort GetNodePort() { + if (_node == null) { + return null; + } + return _node.GetPort(_name); + } + } + + private void OnDisable() { + // Cache portConnectionPoints before serialization starts + int count = portConnectionPoints.Count; + _references = new NodePortReference[count]; + _rects = new Rect[count]; + int index = 0; + foreach (var portConnectionPoint in portConnectionPoints) { + _references[index] = new NodePortReference(portConnectionPoint.Key); + _rects[index] = portConnectionPoint.Value; + index++; + } + } + + private void OnEnable() { + // Reload portConnectionPoints if there are any + int length = _references.Length; + if (length == _rects.Length) { + for (int i = 0; i < length; i++) { + XNode.NodePort nodePort = _references[i].GetNodePort(); + if (nodePort != null) + _portConnectionPoints.Add(nodePort, _rects[i]); + } + } + } + + public Dictionary<XNode.Node, Vector2> nodeSizes { get { return _nodeSizes; } } + private Dictionary<XNode.Node, Vector2> _nodeSizes = new Dictionary<XNode.Node, Vector2>(); + public XNode.NodeGraph graph; + public Vector2 panOffset { get { return _panOffset; } set { _panOffset = value; Repaint(); } } + private Vector2 _panOffset; + public float zoom { get { return _zoom; } set { _zoom = Mathf.Clamp(value, NodeEditorPreferences.GetSettings().minZoom, NodeEditorPreferences.GetSettings().maxZoom); Repaint(); } } + private float _zoom = 1; + + void OnFocus() { + current = this; + ValidateGraphEditor(); + if (graphEditor != null) { + graphEditor.OnWindowFocus(); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + + dragThreshold = Math.Max(1f, Screen.width / 1000f); + } + + void OnLostFocus() { + if (graphEditor != null) graphEditor.OnWindowFocusLost(); + } + + [InitializeOnLoadMethod] + private static void OnLoad() { + Selection.selectionChanged -= OnSelectionChanged; + Selection.selectionChanged += OnSelectionChanged; + } + + /// <summary> Handle Selection Change events</summary> + private static void OnSelectionChanged() { + XNode.NodeGraph nodeGraph = Selection.activeObject as XNode.NodeGraph; + if (nodeGraph && !AssetDatabase.Contains(nodeGraph)) { + Open(nodeGraph); + } + } + + /// <summary> Make sure the graph editor is assigned and to the right object </summary> + private void ValidateGraphEditor() { + NodeGraphEditor graphEditor = NodeGraphEditor.GetEditor(graph, this); + if (this.graphEditor != graphEditor && graphEditor != null) { + this.graphEditor = graphEditor; + graphEditor.OnOpen(); + } + } + + /// <summary> Create editor window </summary> + public static NodeEditorWindow Init() { + NodeEditorWindow w = CreateInstance<NodeEditorWindow>(); + w.titleContent = new GUIContent("xNode"); + w.wantsMouseMove = true; + w.Show(); + return w; + } + + public void Save() { + if (AssetDatabase.Contains(graph)) { + EditorUtility.SetDirty(graph); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } else SaveAs(); + } + + public void SaveAs() { + string path = EditorUtility.SaveFilePanelInProject("Save NodeGraph", "NewNodeGraph", "asset", ""); + if (string.IsNullOrEmpty(path)) return; + else { + XNode.NodeGraph existingGraph = AssetDatabase.LoadAssetAtPath<XNode.NodeGraph>(path); + if (existingGraph != null) AssetDatabase.DeleteAsset(path); + AssetDatabase.CreateAsset(graph, path); + EditorUtility.SetDirty(graph); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + } + + private void DraggableWindow(int windowID) { + GUI.DragWindow(); + } + + public Vector2 WindowToGridPosition(Vector2 windowPosition) { + return (windowPosition - (position.size * 0.5f) - (panOffset / zoom)) * zoom; + } + + public Vector2 GridToWindowPosition(Vector2 gridPosition) { + return (position.size * 0.5f) + (panOffset / zoom) + (gridPosition / zoom); + } + + public Rect GridToWindowRectNoClipped(Rect gridRect) { + gridRect.position = GridToWindowPositionNoClipped(gridRect.position); + return gridRect; + } + + public Rect GridToWindowRect(Rect gridRect) { + gridRect.position = GridToWindowPosition(gridRect.position); + gridRect.size /= zoom; + return gridRect; + } + + public Vector2 GridToWindowPositionNoClipped(Vector2 gridPosition) { + Vector2 center = position.size * 0.5f; + // UI Sharpness complete fix - Round final offset not panOffset + float xOffset = Mathf.Round(center.x * zoom + (panOffset.x + gridPosition.x)); + float yOffset = Mathf.Round(center.y * zoom + (panOffset.y + gridPosition.y)); + return new Vector2(xOffset, yOffset); + } + + public void SelectNode(XNode.Node node, bool add) { + if (add) { + List<Object> selection = new List<Object>(Selection.objects); + selection.Add(node); + Selection.objects = selection.ToArray(); + } else Selection.objects = new Object[] { node }; + } + + public void DeselectNode(XNode.Node node) { + List<Object> selection = new List<Object>(Selection.objects); + selection.Remove(node); + Selection.objects = selection.ToArray(); + } + + [OnOpenAsset(0)] + public static bool OnOpen(int instanceID, int line) { + XNode.NodeGraph nodeGraph = EditorUtility.InstanceIDToObject(instanceID) as XNode.NodeGraph; + if (nodeGraph != null) { + Open(nodeGraph); + return true; + } + return false; + } + + /// <summary>Open the provided graph in the NodeEditor</summary> + public static NodeEditorWindow Open(XNode.NodeGraph graph) { + if (!graph) return null; + + NodeEditorWindow w = GetWindow(typeof(NodeEditorWindow), false, "xNode", true) as NodeEditorWindow; + w.wantsMouseMove = true; + w.graph = graph; + return w; + } + + /// <summary> Repaint all open NodeEditorWindows. </summary> + public static void RepaintAll() { + NodeEditorWindow[] windows = Resources.FindObjectsOfTypeAll<NodeEditorWindow>(); + for (int i = 0; i < windows.Length; i++) { + windows[i].Repaint(); + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs.meta new file mode 100644 index 00000000..541b5c75 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeEditorWindow.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5ce2bf59ec7a25c4ba691cad7819bf38 +timeCreated: 1505418450 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs new file mode 100644 index 00000000..01de70e4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs @@ -0,0 +1,237 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace XNodeEditor { + /// <summary> Base class to derive custom Node Graph editors from. Use this to override how graphs are drawn in the editor. </summary> + [CustomNodeGraphEditor(typeof(XNode.NodeGraph))] + public class NodeGraphEditor : XNodeEditor.Internal.NodeEditorBase<NodeGraphEditor, NodeGraphEditor.CustomNodeGraphEditorAttribute, XNode.NodeGraph> { + [Obsolete("Use window.position instead")] + public Rect position { get { return window.position; } set { window.position = value; } } + /// <summary> Are we currently renaming a node? </summary> + protected bool isRenaming; + + public virtual void OnGUI() { } + + /// <summary> Called when opened by NodeEditorWindow </summary> + public virtual void OnOpen() { } + + /// <summary> Called when NodeEditorWindow gains focus </summary> + public virtual void OnWindowFocus() { } + + /// <summary> Called when NodeEditorWindow loses focus </summary> + public virtual void OnWindowFocusLost() { } + + public virtual Texture2D GetGridTexture() { + return NodeEditorPreferences.GetSettings().gridTexture; + } + + public virtual Texture2D GetSecondaryGridTexture() { + return NodeEditorPreferences.GetSettings().crossTexture; + } + + /// <summary> Return default settings for this graph type. This is the settings the user will load if no previous settings have been saved. </summary> + public virtual NodeEditorPreferences.Settings GetDefaultPreferences() { + return new NodeEditorPreferences.Settings(); + } + + /// <summary> Returns context node menu path. Null or empty strings for hidden nodes. </summary> + public virtual string GetNodeMenuName(Type type) { + //Check if type has the CreateNodeMenuAttribute + XNode.Node.CreateNodeMenuAttribute attrib; + if (NodeEditorUtilities.GetAttrib(type, out attrib)) // Return custom path + return attrib.menuName; + else // Return generated path + return NodeEditorUtilities.NodeDefaultPath(type); + } + + /// <summary> The order by which the menu items are displayed. </summary> + public virtual int GetNodeMenuOrder(Type type) { + //Check if type has the CreateNodeMenuAttribute + XNode.Node.CreateNodeMenuAttribute attrib; + if (NodeEditorUtilities.GetAttrib(type, out attrib)) // Return custom path + return attrib.order; + else + return 0; + } + + /// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary> + public virtual void AddContextMenuItems(GenericMenu menu) { + Vector2 pos = NodeEditorWindow.current.WindowToGridPosition(Event.current.mousePosition); + var nodeTypes = NodeEditorReflection.nodeTypes.OrderBy(type => GetNodeMenuOrder(type)).ToArray(); + for (int i = 0; i < nodeTypes.Length; i++) { + Type type = nodeTypes[i]; + + //Get node context menu path + string path = GetNodeMenuName(type); + if (string.IsNullOrEmpty(path)) continue; + + // Check if user is allowed to add more of given node type + XNode.Node.DisallowMultipleNodesAttribute disallowAttrib; + bool disallowed = false; + if (NodeEditorUtilities.GetAttrib(type, out disallowAttrib)) { + int typeCount = target.nodes.Count(x => x.GetType() == type); + if (typeCount >= disallowAttrib.max) disallowed = true; + } + + // Add node entry to context menu + if (disallowed) menu.AddItem(new GUIContent(path), false, null); + else menu.AddItem(new GUIContent(path), false, () => { + XNode.Node node = CreateNode(type, pos); + NodeEditorWindow.current.AutoConnect(node); + }); + } + menu.AddSeparator(""); + if (NodeEditorWindow.copyBuffer != null && NodeEditorWindow.copyBuffer.Length > 0) menu.AddItem(new GUIContent("Paste"), false, () => NodeEditorWindow.current.PasteNodes(pos)); + else menu.AddDisabledItem(new GUIContent("Paste")); + menu.AddItem(new GUIContent("Preferences"), false, () => NodeEditorReflection.OpenPreferences()); + menu.AddCustomContextMenuItems(target); + } + + /// <summary> Returned gradient is used to color noodles </summary> + /// <param name="output"> The output this noodle comes from. Never null. </param> + /// <param name="input"> The output this noodle comes from. Can be null if we are dragging the noodle. </param> + public virtual Gradient GetNoodleGradient(XNode.NodePort output, XNode.NodePort input) { + Gradient grad = new Gradient(); + + // If dragging the noodle, draw solid, slightly transparent + if (input == null) { + Color a = GetTypeColor(output.ValueType); + grad.SetKeys( + new GradientColorKey[] { new GradientColorKey(a, 0f) }, + new GradientAlphaKey[] { new GradientAlphaKey(0.6f, 0f) } + ); + } + // If normal, draw gradient fading from one input color to the other + else { + Color a = GetTypeColor(output.ValueType); + Color b = GetTypeColor(input.ValueType); + // If any port is hovered, tint white + if (window.hoveredPort == output || window.hoveredPort == input) { + a = Color.Lerp(a, Color.white, 0.8f); + b = Color.Lerp(b, Color.white, 0.8f); + } + grad.SetKeys( + new GradientColorKey[] { new GradientColorKey(a, 0f), new GradientColorKey(b, 1f) }, + new GradientAlphaKey[] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(1f, 1f) } + ); + } + return grad; + } + + /// <summary> Returned float is used for noodle thickness </summary> + /// <param name="output"> The output this noodle comes from. Never null. </param> + /// <param name="input"> The output this noodle comes from. Can be null if we are dragging the noodle. </param> + public virtual float GetNoodleThickness(XNode.NodePort output, XNode.NodePort input) { + return 5f; + } + + public virtual NoodlePath GetNoodlePath(XNode.NodePort output, XNode.NodePort input) { + return NodeEditorPreferences.GetSettings().noodlePath; + } + + public virtual NoodleStroke GetNoodleStroke(XNode.NodePort output, XNode.NodePort input) { + return NodeEditorPreferences.GetSettings().noodleStroke; + } + + /// <summary> Returned color is used to color ports </summary> + public virtual Color GetPortColor(XNode.NodePort port) { + return GetTypeColor(port.ValueType); + } + + /// <summary> Returns generated color for a type. This color is editable in preferences </summary> + public virtual Color GetTypeColor(Type type) { + return NodeEditorPreferences.GetTypeColor(type); + } + + /// <summary> Override to display custom tooltips </summary> + public virtual string GetPortTooltip(XNode.NodePort port) { + Type portType = port.ValueType; + string tooltip = ""; + tooltip = portType.PrettyName(); + if (port.IsOutput) { + object obj = port.node.GetValue(port); + tooltip += " = " + (obj != null ? obj.ToString() : "null"); + } + return tooltip; + } + + /// <summary> Deal with objects dropped into the graph through DragAndDrop </summary> + public virtual void OnDropObjects(UnityEngine.Object[] objects) { + if (GetType() != typeof(NodeGraphEditor)) Debug.Log("No OnDropObjects override defined for " + GetType()); + } + + /// <summary> Create a node and save it in the graph asset </summary> + public virtual XNode.Node CreateNode(Type type, Vector2 position) { + Undo.RecordObject(target, "Create Node"); + XNode.Node node = target.AddNode(type); + Undo.RegisterCreatedObjectUndo(node, "Create Node"); + node.position = position; + if (node.name == null || node.name.Trim() == "") node.name = NodeEditorUtilities.NodeDefaultName(type); + if (!string.IsNullOrEmpty(AssetDatabase.GetAssetPath(target))) AssetDatabase.AddObjectToAsset(node, target); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + NodeEditorWindow.RepaintAll(); + return node; + } + + /// <summary> Creates a copy of the original node in the graph </summary> + public virtual XNode.Node CopyNode(XNode.Node original) { + Undo.RecordObject(target, "Duplicate Node"); + XNode.Node node = target.CopyNode(original); + Undo.RegisterCreatedObjectUndo(node, "Duplicate Node"); + node.name = original.name; + AssetDatabase.AddObjectToAsset(node, target); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + return node; + } + + /// <summary> Return false for nodes that can't be removed </summary> + public virtual bool CanRemove(XNode.Node node) { + // Check graph attributes to see if this node is required + Type graphType = target.GetType(); + XNode.NodeGraph.RequireNodeAttribute[] attribs = Array.ConvertAll( + graphType.GetCustomAttributes(typeof(XNode.NodeGraph.RequireNodeAttribute), true), x => x as XNode.NodeGraph.RequireNodeAttribute); + if (attribs.Any(x => x.Requires(node.GetType()))) { + if (target.nodes.Count(x => x.GetType() == node.GetType()) <= 1) { + return false; + } + } + return true; + } + + /// <summary> Safely remove a node and all its connections. </summary> + public virtual void RemoveNode(XNode.Node node) { + if (!CanRemove(node)) return; + + // Remove the node + Undo.RecordObject(node, "Delete Node"); + Undo.RecordObject(target, "Delete Node"); + foreach (var port in node.Ports) + foreach (var conn in port.GetConnections()) + Undo.RecordObject(conn.node, "Delete Node"); + target.RemoveNode(node); + Undo.DestroyObjectImmediate(node); + if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); + } + + [AttributeUsage(AttributeTargets.Class)] + public class CustomNodeGraphEditorAttribute : Attribute, + XNodeEditor.Internal.NodeEditorBase<NodeGraphEditor, NodeGraphEditor.CustomNodeGraphEditorAttribute, XNode.NodeGraph>.INodeEditorAttrib { + private Type inspectedType; + public string editorPrefsKey; + /// <summary> Tells a NodeGraphEditor which Graph type it is an editor for </summary> + /// <param name="inspectedType">Type that this editor can edit</param> + /// <param name="editorPrefsKey">Define unique key for unique layout settings instance</param> + public CustomNodeGraphEditorAttribute(Type inspectedType, string editorPrefsKey = "xNode.Settings") { + this.inspectedType = inspectedType; + this.editorPrefsKey = editorPrefsKey; + } + + public Type GetInspectedType() { + return inspectedType; + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs.meta new file mode 100644 index 00000000..bc1c1533 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ddcbb5432255d3247a0718b15a9c193c +timeCreated: 1505462176 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs new file mode 100644 index 00000000..3faf54fb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs @@ -0,0 +1,45 @@ +using System; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEditor.Experimental.AssetImporters; +using UnityEngine; +using XNode; + +namespace XNodeEditor { + /// <summary> Deals with modified assets </summary> + class NodeGraphImporter : AssetPostprocessor { + private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { + foreach (string path in importedAssets) { + // Skip processing anything without the .asset extension + if (Path.GetExtension(path) != ".asset") continue; + + // Get the object that is requested for deletion + NodeGraph graph = AssetDatabase.LoadAssetAtPath<NodeGraph>(path); + if (graph == null) continue; + + // Get attributes + Type graphType = graph.GetType(); + NodeGraph.RequireNodeAttribute[] attribs = Array.ConvertAll( + graphType.GetCustomAttributes(typeof(NodeGraph.RequireNodeAttribute), true), x => x as NodeGraph.RequireNodeAttribute); + + Vector2 position = Vector2.zero; + foreach (NodeGraph.RequireNodeAttribute attrib in attribs) { + if (attrib.type0 != null) AddRequired(graph, attrib.type0, ref position); + if (attrib.type1 != null) AddRequired(graph, attrib.type1, ref position); + if (attrib.type2 != null) AddRequired(graph, attrib.type2, ref position); + } + } + } + + private static void AddRequired(NodeGraph graph, Type type, ref Vector2 position) { + if (!graph.nodes.Any(x => x.GetType() == type)) { + XNode.Node node = graph.AddNode(type); + node.position = position; + position.x += 200; + if (node.name == null || node.name.Trim() == "") node.name = NodeEditorUtilities.NodeDefaultName(type); + if (!string.IsNullOrEmpty(AssetDatabase.GetAssetPath(graph))) AssetDatabase.AddObjectToAsset(node, graph); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs.meta new file mode 100644 index 00000000..b3dd1fee --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/NodeGraphImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a816f2790bf3da48a2d6d0035ebc9a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs new file mode 100644 index 00000000..a43837f0 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs @@ -0,0 +1,83 @@ +using UnityEditor; +using UnityEngine; + +namespace XNodeEditor { + /// <summary> Utility for renaming assets </summary> + public class RenamePopup : EditorWindow { + private const string inputControlName = "nameInput"; + + public static RenamePopup current { get; private set; } + public Object target; + public string input; + + private bool firstFrame = true; + + /// <summary> Show a rename popup for an asset at mouse position. Will trigger reimport of the asset on apply. + public static RenamePopup Show(Object target, float width = 200) { + RenamePopup window = EditorWindow.GetWindow<RenamePopup>(true, "Rename " + target.name, true); + if (current != null) current.Close(); + current = window; + window.target = target; + window.input = target.name; + window.minSize = new Vector2(100, 44); + window.position = new Rect(0, 0, width, 44); + window.UpdatePositionToMouse(); + return window; + } + + private void UpdatePositionToMouse() { + if (Event.current == null) return; + Vector3 mousePoint = GUIUtility.GUIToScreenPoint(Event.current.mousePosition); + Rect pos = position; + pos.x = mousePoint.x - position.width * 0.5f; + pos.y = mousePoint.y - 10; + position = pos; + } + + private void OnLostFocus() { + // Make the popup close on lose focus + Close(); + } + + private void OnGUI() { + if (firstFrame) { + UpdatePositionToMouse(); + firstFrame = false; + } + GUI.SetNextControlName(inputControlName); + input = EditorGUILayout.TextField(input); + EditorGUI.FocusTextInControl(inputControlName); + Event e = Event.current; + // If input is empty, revert name to default instead + if (input == null || input.Trim() == "") { + if (GUILayout.Button("Revert to default") || (e.isKey && e.keyCode == KeyCode.Return)) { + target.name = NodeEditorUtilities.NodeDefaultName(target.GetType()); + NodeEditor.GetEditor((XNode.Node)target, NodeEditorWindow.current).OnRename(); + AssetDatabase.SetMainObject((target as XNode.Node).graph, AssetDatabase.GetAssetPath(target)); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); + Close(); + target.TriggerOnValidate(); + } + } + // Rename asset to input text + else { + if (GUILayout.Button("Apply") || (e.isKey && e.keyCode == KeyCode.Return)) { + target.name = input; + NodeEditor.GetEditor((XNode.Node)target, NodeEditorWindow.current).OnRename(); + AssetDatabase.SetMainObject((target as XNode.Node).graph, AssetDatabase.GetAssetPath(target)); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); + Close(); + target.TriggerOnValidate(); + } + } + + if (e.isKey && e.keyCode == KeyCode.Escape) { + Close(); + } + } + + private void OnDestroy() { + EditorGUIUtility.editingTextField = false; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs.meta new file mode 100644 index 00000000..5c40a02b --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/RenamePopup.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 4ef3ddc25518318469bce838980c64be +timeCreated: 1552067957 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources.meta new file mode 100644 index 00000000..786ef41c --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 964fc201163fe884ca6a20094b6f3b49 +folderAsset: yes +timeCreated: 1506110871 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates.meta new file mode 100644 index 00000000..b2435e80 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 86b677955452bb5449f9f4dd47b6ddfe +folderAsset: yes +timeCreated: 1519049391 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt new file mode 100644 index 00000000..e3d7c367 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt @@ -0,0 +1,9 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode; + +[CreateAssetMenu] +public class #SCRIPTNAME# : NodeGraph { + #NOTRIM# +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt.meta new file mode 100644 index 00000000..b55bd754 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeGraphTemplate.cs.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8165767f64da7d94e925f61a38da668c +timeCreated: 1519049802 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt new file mode 100644 index 00000000..de791fcb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode; + +public class #SCRIPTNAME# : Node { + + // Use this for initialization + protected override void Init() { + base.Init(); + #NOTRIM# + } + + // Return the correct value of an output port when requested + public override object GetValue(NodePort port) { + return null; // Replace this + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt.meta new file mode 100644 index 00000000..455420a2 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/ScriptTemplates/xNode_NodeTemplate.cs.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85f6f570600a1a44d8e734cb111a8b89 +timeCreated: 1519049802 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png Binary files differnew file mode 100644 index 00000000..36c0ce93 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png.meta new file mode 100644 index 00000000..00c23bc4 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 75a1fe0b102226a418486ed823c9a7fb +timeCreated: 1506110357 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png Binary files differnew file mode 100644 index 00000000..538cc9fa --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png.meta new file mode 100644 index 00000000..0781a52f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_dot_outer.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 434ca8b4bdfa5574abb0002bbc9b65ad +timeCreated: 1506110357 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png Binary files differnew file mode 100644 index 00000000..6f0b42eb --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png.meta new file mode 100644 index 00000000..979e6f94 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 2fea1dcb24935ef4ca514d534eb6aa3d +timeCreated: 1507454532 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png Binary files differnew file mode 100644 index 00000000..f1bb27f7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png.meta new file mode 100644 index 00000000..21b60341 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_highlight.png.meta @@ -0,0 +1,87 @@ +fileFormatVersion: 2 +guid: 2ab2b92d7e1771b47bba0a46a6f0f6d5 +timeCreated: 1516610730 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd Binary files differnew file mode 100644 index 00000000..a578c46f --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd.meta new file mode 100644 index 00000000..3ca04379 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/Resources/xnode_node_workfile.psd.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 2267efa6e1e349348ae0b28fb659a6e2 +timeCreated: 1507454532 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs new file mode 100644 index 00000000..9fb1c673 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using XNode; + +namespace XNodeEditor { + [CustomEditor(typeof(SceneGraph), true)] + public class SceneGraphEditor : Editor { + private SceneGraph sceneGraph; + private bool removeSafely; + private Type graphType; + + public override void OnInspectorGUI() { + if (sceneGraph.graph == null) { + if (GUILayout.Button("New graph", GUILayout.Height(40))) { + if (graphType == null) { + Type[] graphTypes = NodeEditorReflection.GetDerivedTypes(typeof(NodeGraph)); + GenericMenu menu = new GenericMenu(); + for (int i = 0; i < graphTypes.Length; i++) { + Type graphType = graphTypes[i]; + menu.AddItem(new GUIContent(graphType.Name), false, () => CreateGraph(graphType)); + } + menu.ShowAsContext(); + } else { + CreateGraph(graphType); + } + } + } else { + if (GUILayout.Button("Open graph", GUILayout.Height(40))) { + NodeEditorWindow.Open(sceneGraph.graph); + } + if (removeSafely) { + GUILayout.BeginHorizontal(); + GUILayout.Label("Really remove graph?"); + GUI.color = new Color(1, 0.8f, 0.8f); + if (GUILayout.Button("Remove")) { + removeSafely = false; + Undo.RecordObject(sceneGraph, "Removed graph"); + sceneGraph.graph = null; + } + GUI.color = Color.white; + if (GUILayout.Button("Cancel")) { + removeSafely = false; + } + GUILayout.EndHorizontal(); + } else { + GUI.color = new Color(1, 0.8f, 0.8f); + if (GUILayout.Button("Remove graph")) { + removeSafely = true; + } + GUI.color = Color.white; + } + } + } + + private void OnEnable() { + sceneGraph = target as SceneGraph; + Type sceneGraphType = sceneGraph.GetType(); + if (sceneGraphType == typeof(SceneGraph)) { + graphType = null; + } else { + Type baseType = sceneGraphType.BaseType; + if (baseType.IsGenericType) { + graphType = sceneGraphType = baseType.GetGenericArguments() [0]; + } + } + } + + public void CreateGraph(Type type) { + Undo.RecordObject(sceneGraph, "Create graph"); + sceneGraph.graph = ScriptableObject.CreateInstance(type) as NodeGraph; + sceneGraph.graph.name = sceneGraph.name + "-graph"; + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs.meta new file mode 100644 index 00000000..e1bf0b29 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/SceneGraphEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aea725adabc311f44b5ea8161360a915 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef new file mode 100644 index 00000000..5fa1aabe --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef @@ -0,0 +1,17 @@ +{ + "name": "XNodeEditor", + "references": [ + "XNode" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef.meta new file mode 100644 index 00000000..7bff0749 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Editor/XNodeEditor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 002c1bbed08fa44d282ef34fd5edb138 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs new file mode 100644 index 00000000..8e7a20a1 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs @@ -0,0 +1,414 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace XNode { + /// <summary> + /// Base class for all nodes + /// </summary> + /// <example> + /// Classes extending this class will be considered as valid nodes by xNode. + /// <code> + /// [System.Serializable] + /// public class Adder : Node { + /// [Input] public float a; + /// [Input] public float b; + /// [Output] public float result; + /// + /// // GetValue should be overridden to return a value for any specified output port + /// public override object GetValue(NodePort port) { + /// return a + b; + /// } + /// } + /// </code> + /// </example> + [Serializable] + public abstract class Node : ScriptableObject { + /// <summary> Used by <see cref="InputAttribute"/> and <see cref="OutputAttribute"/> to determine when to display the field value associated with a <see cref="NodePort"/> </summary> + public enum ShowBackingValue { + /// <summary> Never show the backing value </summary> + Never, + /// <summary> Show the backing value only when the port does not have any active connections </summary> + Unconnected, + /// <summary> Always show the backing value </summary> + Always + } + + public enum ConnectionType { + /// <summary> Allow multiple connections</summary> + Multiple, + /// <summary> always override the current connection </summary> + Override, + } + + /// <summary> Tells which types of input to allow </summary> + public enum TypeConstraint { + /// <summary> Allow all types of input</summary> + None, + /// <summary> Allow connections where input value type is assignable from output value type (eg. ScriptableObject --> Object)</summary> + Inherited, + /// <summary> Allow only similar types </summary> + Strict, + /// <summary> Allow connections where output value type is assignable from input value type (eg. Object --> ScriptableObject)</summary> + InheritedInverse, + } + +#region Obsolete + [Obsolete("Use DynamicPorts instead")] + public IEnumerable<NodePort> InstancePorts { get { return DynamicPorts; } } + + [Obsolete("Use DynamicOutputs instead")] + public IEnumerable<NodePort> InstanceOutputs { get { return DynamicOutputs; } } + + [Obsolete("Use DynamicInputs instead")] + public IEnumerable<NodePort> InstanceInputs { get { return DynamicInputs; } } + + [Obsolete("Use AddDynamicInput instead")] + public NodePort AddInstanceInput(Type type, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + return AddDynamicInput(type, connectionType, typeConstraint, fieldName); + } + + [Obsolete("Use AddDynamicOutput instead")] + public NodePort AddInstanceOutput(Type type, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + return AddDynamicOutput(type, connectionType, typeConstraint, fieldName); + } + + [Obsolete("Use AddDynamicPort instead")] + private NodePort AddInstancePort(Type type, NodePort.IO direction, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + return AddDynamicPort(type, direction, connectionType, typeConstraint, fieldName); + } + + [Obsolete("Use RemoveDynamicPort instead")] + public void RemoveInstancePort(string fieldName) { + RemoveDynamicPort(fieldName); + } + + [Obsolete("Use RemoveDynamicPort instead")] + public void RemoveInstancePort(NodePort port) { + RemoveDynamicPort(port); + } + + [Obsolete("Use ClearDynamicPorts instead")] + public void ClearInstancePorts() { + ClearDynamicPorts(); + } +#endregion + + /// <summary> Iterate over all ports on this node. </summary> + public IEnumerable<NodePort> Ports { get { foreach (NodePort port in ports.Values) yield return port; } } + /// <summary> Iterate over all outputs on this node. </summary> + public IEnumerable<NodePort> Outputs { get { foreach (NodePort port in Ports) { if (port.IsOutput) yield return port; } } } + /// <summary> Iterate over all inputs on this node. </summary> + public IEnumerable<NodePort> Inputs { get { foreach (NodePort port in Ports) { if (port.IsInput) yield return port; } } } + /// <summary> Iterate over all dynamic ports on this node. </summary> + public IEnumerable<NodePort> DynamicPorts { get { foreach (NodePort port in Ports) { if (port.IsDynamic) yield return port; } } } + /// <summary> Iterate over all dynamic outputs on this node. </summary> + public IEnumerable<NodePort> DynamicOutputs { get { foreach (NodePort port in Ports) { if (port.IsDynamic && port.IsOutput) yield return port; } } } + /// <summary> Iterate over all dynamic inputs on this node. </summary> + public IEnumerable<NodePort> DynamicInputs { get { foreach (NodePort port in Ports) { if (port.IsDynamic && port.IsInput) yield return port; } } } + /// <summary> Parent <see cref="NodeGraph"/> </summary> + [SerializeField] public NodeGraph graph; + /// <summary> Position on the <see cref="NodeGraph"/> </summary> + [SerializeField] public Vector2 position; + /// <summary> It is recommended not to modify these at hand. Instead, see <see cref="InputAttribute"/> and <see cref="OutputAttribute"/> </summary> + [SerializeField] private NodePortDictionary ports = new NodePortDictionary(); + + /// <summary> Used during node instantiation to fix null/misconfigured graph during OnEnable/Init. Set it before instantiating a node. Will automatically be unset during OnEnable </summary> + public static NodeGraph graphHotfix; + + protected void OnEnable() { + if (graphHotfix != null) graph = graphHotfix; + graphHotfix = null; + UpdatePorts(); + Init(); + } + + /// <summary> Update static ports and dynamic ports managed by DynamicPortLists to reflect class fields. This happens automatically on enable or on redrawing a dynamic port list. </summary> + public void UpdatePorts() { + NodeDataCache.UpdatePorts(this, ports); + } + + /// <summary> Initialize node. Called on enable. </summary> + protected virtual void Init() { } + + /// <summary> Checks all connections for invalid references, and removes them. </summary> + public void VerifyConnections() { + foreach (NodePort port in Ports) port.VerifyConnections(); + } + +#region Dynamic Ports + /// <summary> Convenience function. </summary> + /// <seealso cref="AddInstancePort"/> + /// <seealso cref="AddInstanceOutput"/> + public NodePort AddDynamicInput(Type type, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + return AddDynamicPort(type, NodePort.IO.Input, connectionType, typeConstraint, fieldName); + } + + /// <summary> Convenience function. </summary> + /// <seealso cref="AddInstancePort"/> + /// <seealso cref="AddInstanceInput"/> + public NodePort AddDynamicOutput(Type type, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + return AddDynamicPort(type, NodePort.IO.Output, connectionType, typeConstraint, fieldName); + } + + /// <summary> Add a dynamic, serialized port to this node. </summary> + /// <seealso cref="AddDynamicInput"/> + /// <seealso cref="AddDynamicOutput"/> + private NodePort AddDynamicPort(Type type, NodePort.IO direction, Node.ConnectionType connectionType = Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = TypeConstraint.None, string fieldName = null) { + if (fieldName == null) { + fieldName = "dynamicInput_0"; + int i = 0; + while (HasPort(fieldName)) fieldName = "dynamicInput_" + (++i); + } else if (HasPort(fieldName)) { + Debug.LogWarning("Port '" + fieldName + "' already exists in " + name, this); + return ports[fieldName]; + } + NodePort port = new NodePort(fieldName, type, direction, connectionType, typeConstraint, this); + ports.Add(fieldName, port); + return port; + } + + /// <summary> Remove an dynamic port from the node </summary> + public void RemoveDynamicPort(string fieldName) { + NodePort dynamicPort = GetPort(fieldName); + if (dynamicPort == null) throw new ArgumentException("port " + fieldName + " doesn't exist"); + RemoveDynamicPort(GetPort(fieldName)); + } + + /// <summary> Remove an dynamic port from the node </summary> + public void RemoveDynamicPort(NodePort port) { + if (port == null) throw new ArgumentNullException("port"); + else if (port.IsStatic) throw new ArgumentException("cannot remove static port"); + port.ClearConnections(); + ports.Remove(port.fieldName); + } + + /// <summary> Removes all dynamic ports from the node </summary> + [ContextMenu("Clear Dynamic Ports")] + public void ClearDynamicPorts() { + List<NodePort> dynamicPorts = new List<NodePort>(DynamicPorts); + foreach (NodePort port in dynamicPorts) { + RemoveDynamicPort(port); + } + } +#endregion + +#region Ports + /// <summary> Returns output port which matches fieldName </summary> + public NodePort GetOutputPort(string fieldName) { + NodePort port = GetPort(fieldName); + if (port == null || port.direction != NodePort.IO.Output) return null; + else return port; + } + + /// <summary> Returns input port which matches fieldName </summary> + public NodePort GetInputPort(string fieldName) { + NodePort port = GetPort(fieldName); + if (port == null || port.direction != NodePort.IO.Input) return null; + else return port; + } + + /// <summary> Returns port which matches fieldName </summary> + public NodePort GetPort(string fieldName) { + NodePort port; + if (ports.TryGetValue(fieldName, out port)) return port; + else return null; + } + + public bool HasPort(string fieldName) { + return ports.ContainsKey(fieldName); + } +#endregion + +#region Inputs/Outputs + /// <summary> Return input value for a specified port. Returns fallback value if no ports are connected </summary> + /// <param name="fieldName">Field name of requested input port</param> + /// <param name="fallback">If no ports are connected, this value will be returned</param> + public T GetInputValue<T>(string fieldName, T fallback = default(T)) { + NodePort port = GetPort(fieldName); + if (port != null && port.IsConnected) return port.GetInputValue<T>(); + else return fallback; + } + + /// <summary> Return all input values for a specified port. Returns fallback value if no ports are connected </summary> + /// <param name="fieldName">Field name of requested input port</param> + /// <param name="fallback">If no ports are connected, this value will be returned</param> + public T[] GetInputValues<T>(string fieldName, params T[] fallback) { + NodePort port = GetPort(fieldName); + if (port != null && port.IsConnected) return port.GetInputValues<T>(); + else return fallback; + } + + /// <summary> Returns a value based on requested port output. Should be overridden in all derived nodes with outputs. </summary> + /// <param name="port">The requested port.</param> + public virtual object GetValue(NodePort port) { + Debug.LogWarning("No GetValue(NodePort port) override defined for " + GetType()); + return null; + } +#endregion + + /// <summary> Called after a connection between two <see cref="NodePort"/>s is created </summary> + /// <param name="from">Output</param> <param name="to">Input</param> + public virtual void OnCreateConnection(NodePort from, NodePort to) { } + + /// <summary> Called after a connection is removed from this port </summary> + /// <param name="port">Output or Input</param> + public virtual void OnRemoveConnection(NodePort port) { } + + /// <summary> Disconnect everything from this node </summary> + public void ClearConnections() { + foreach (NodePort port in Ports) port.ClearConnections(); + } + +#region Attributes + /// <summary> Mark a serializable field as an input port. You can access this through <see cref="GetInputPort(string)"/> </summary> + [AttributeUsage(AttributeTargets.Field)] + public class InputAttribute : Attribute { + public ShowBackingValue backingValue; + public ConnectionType connectionType; + [Obsolete("Use dynamicPortList instead")] + public bool instancePortList { get { return dynamicPortList; } set { dynamicPortList = value; } } + public bool dynamicPortList; + public TypeConstraint typeConstraint; + + /// <summary> Mark a serializable field as an input port. You can access this through <see cref="GetInputPort(string)"/> </summary> + /// <param name="backingValue">Should we display the backing value for this port as an editor field? </param> + /// <param name="connectionType">Should we allow multiple connections? </param> + /// <param name="typeConstraint">Constrains which input connections can be made to this port </param> + /// <param name="dynamicPortList">If true, will display a reorderable list of inputs instead of a single port. Will automatically add and display values for lists and arrays </param> + public InputAttribute(ShowBackingValue backingValue = ShowBackingValue.Unconnected, ConnectionType connectionType = ConnectionType.Multiple, TypeConstraint typeConstraint = TypeConstraint.None, bool dynamicPortList = false) { + this.backingValue = backingValue; + this.connectionType = connectionType; + this.dynamicPortList = dynamicPortList; + this.typeConstraint = typeConstraint; + } + } + + /// <summary> Mark a serializable field as an output port. You can access this through <see cref="GetOutputPort(string)"/> </summary> + [AttributeUsage(AttributeTargets.Field)] + public class OutputAttribute : Attribute { + public ShowBackingValue backingValue; + public ConnectionType connectionType; + [Obsolete("Use dynamicPortList instead")] + public bool instancePortList { get { return dynamicPortList; } set { dynamicPortList = value; } } + public bool dynamicPortList; + public TypeConstraint typeConstraint; + + /// <summary> Mark a serializable field as an output port. You can access this through <see cref="GetOutputPort(string)"/> </summary> + /// <param name="backingValue">Should we display the backing value for this port as an editor field? </param> + /// <param name="connectionType">Should we allow multiple connections? </param> + /// <param name="typeConstraint">Constrains which input connections can be made from this port </param> + /// <param name="dynamicPortList">If true, will display a reorderable list of outputs instead of a single port. Will automatically add and display values for lists and arrays </param> + public OutputAttribute(ShowBackingValue backingValue = ShowBackingValue.Never, ConnectionType connectionType = ConnectionType.Multiple, TypeConstraint typeConstraint = TypeConstraint.None, bool dynamicPortList = false) { + this.backingValue = backingValue; + this.connectionType = connectionType; + this.dynamicPortList = dynamicPortList; + this.typeConstraint = typeConstraint; + } + + /// <summary> Mark a serializable field as an output port. You can access this through <see cref="GetOutputPort(string)"/> </summary> + /// <param name="backingValue">Should we display the backing value for this port as an editor field? </param> + /// <param name="connectionType">Should we allow multiple connections? </param> + /// <param name="dynamicPortList">If true, will display a reorderable list of outputs instead of a single port. Will automatically add and display values for lists and arrays </param> + [Obsolete("Use constructor with TypeConstraint")] + public OutputAttribute(ShowBackingValue backingValue, ConnectionType connectionType, bool dynamicPortList) : this(backingValue, connectionType, TypeConstraint.None, dynamicPortList) { } + } + + /// <summary> Manually supply node class with a context menu path </summary> + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class CreateNodeMenuAttribute : Attribute { + public string menuName; + public int order; + /// <summary> Manually supply node class with a context menu path </summary> + /// <param name="menuName"> Path to this node in the context menu. Null or empty hides it. </param> + public CreateNodeMenuAttribute(string menuName) { + this.menuName = menuName; + this.order = 0; + } + + /// <summary> Manually supply node class with a context menu path </summary> + /// <param name="menuName"> Path to this node in the context menu. Null or empty hides it. </param> + /// <param name="order"> The order by which the menu items are displayed. </param> + public CreateNodeMenuAttribute(string menuName, int order) { + this.menuName = menuName; + this.order = order; + } + } + + /// <summary> Prevents Node of the same type to be added more than once (configurable) to a NodeGraph </summary> + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class DisallowMultipleNodesAttribute : Attribute { + // TODO: Make inheritance work in such a way that applying [DisallowMultipleNodes(1)] to type NodeBar : Node + // while type NodeFoo : NodeBar exists, will let you add *either one* of these nodes, but not both. + public int max; + /// <summary> Prevents Node of the same type to be added more than once (configurable) to a NodeGraph </summary> + /// <param name="max"> How many nodes to allow. Defaults to 1. </param> + public DisallowMultipleNodesAttribute(int max = 1) { + this.max = max; + } + } + + /// <summary> Specify a color for this node type </summary> + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class NodeTintAttribute : Attribute { + public Color color; + /// <summary> Specify a color for this node type </summary> + /// <param name="r"> Red [0.0f .. 1.0f] </param> + /// <param name="g"> Green [0.0f .. 1.0f] </param> + /// <param name="b"> Blue [0.0f .. 1.0f] </param> + public NodeTintAttribute(float r, float g, float b) { + color = new Color(r, g, b); + } + + /// <summary> Specify a color for this node type </summary> + /// <param name="hex"> HEX color value </param> + public NodeTintAttribute(string hex) { + ColorUtility.TryParseHtmlString(hex, out color); + } + + /// <summary> Specify a color for this node type </summary> + /// <param name="r"> Red [0 .. 255] </param> + /// <param name="g"> Green [0 .. 255] </param> + /// <param name="b"> Blue [0 .. 255] </param> + public NodeTintAttribute(byte r, byte g, byte b) { + color = new Color32(r, g, b, byte.MaxValue); + } + } + + /// <summary> Specify a width for this node type </summary> + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class NodeWidthAttribute : Attribute { + public int width; + /// <summary> Specify a width for this node type </summary> + /// <param name="width"> Width </param> + public NodeWidthAttribute(int width) { + this.width = width; + } + } +#endregion + + [Serializable] private class NodePortDictionary : Dictionary<string, NodePort>, ISerializationCallbackReceiver { + [SerializeField] private List<string> keys = new List<string>(); + [SerializeField] private List<NodePort> values = new List<NodePort>(); + + public void OnBeforeSerialize() { + keys.Clear(); + values.Clear(); + foreach (KeyValuePair<string, NodePort> pair in this) { + keys.Add(pair.Key); + values.Add(pair.Value); + } + } + + public void OnAfterDeserialize() { + this.Clear(); + + if (keys.Count != values.Count) + throw new System.Exception("there are " + keys.Count + " keys and " + values.Count + " values after deserialization. Make sure that both key and value types are serializable."); + + for (int i = 0; i < keys.Count; i++) + this.Add(keys[i], values[i]); + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs.meta new file mode 100644 index 00000000..a267e401 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/Node.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f26231e5ab9368746948d0ea49e8178a +timeCreated: 1505419984 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs new file mode 100644 index 00000000..ba52e1b6 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs @@ -0,0 +1,218 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; + +namespace XNode { + /// <summary> Precaches reflection data in editor so we won't have to do it runtime </summary> + public static class NodeDataCache { + private static PortDataCache portDataCache; + private static bool Initialized { get { return portDataCache != null; } } + + /// <summary> Update static ports and dynamic ports managed by DynamicPortLists to reflect class fields. </summary> + public static void UpdatePorts(Node node, Dictionary<string, NodePort> ports) { + if (!Initialized) BuildCache(); + + Dictionary<string, NodePort> staticPorts = new Dictionary<string, NodePort>(); + Dictionary<string, List<NodePort>> removedPorts = new Dictionary<string, List<NodePort>>(); + System.Type nodeType = node.GetType(); + + List<NodePort> dynamicListPorts = new List<NodePort>(); + + List<NodePort> typePortCache; + if (portDataCache.TryGetValue(nodeType, out typePortCache)) { + for (int i = 0; i < typePortCache.Count; i++) { + staticPorts.Add(typePortCache[i].fieldName, portDataCache[nodeType][i]); + } + } + + // Cleanup port dict - Remove nonexisting static ports - update static port types + // AND update dynamic ports (albeit only those in lists) too, in order to enforce proper serialisation. + // Loop through current node ports + foreach (NodePort port in ports.Values.ToList()) { + // If port still exists, check it it has been changed + NodePort staticPort; + if (staticPorts.TryGetValue(port.fieldName, out staticPort)) { + // If port exists but with wrong settings, remove it. Re-add it later. + if (port.IsDynamic || port.direction != staticPort.direction || port.connectionType != staticPort.connectionType || port.typeConstraint != staticPort.typeConstraint) { + // If port is not dynamic and direction hasn't changed, add it to the list so we can try reconnecting the ports connections. + if (!port.IsDynamic && port.direction == staticPort.direction) removedPorts.Add(port.fieldName, port.GetConnections()); + port.ClearConnections(); + ports.Remove(port.fieldName); + } else port.ValueType = staticPort.ValueType; + } + // If port doesn't exist anymore, remove it + else if (port.IsStatic) { + port.ClearConnections(); + ports.Remove(port.fieldName); + } + // If the port is dynamic and is managed by a dynamic port list, flag it for reference updates + else if (IsDynamicListPort(port)) { + dynamicListPorts.Add(port); + } + } + // Add missing ports + foreach (NodePort staticPort in staticPorts.Values) { + if (!ports.ContainsKey(staticPort.fieldName)) { + NodePort port = new NodePort(staticPort, node); + //If we just removed the port, try re-adding the connections + List<NodePort> reconnectConnections; + if (removedPorts.TryGetValue(staticPort.fieldName, out reconnectConnections)) { + for (int i = 0; i < reconnectConnections.Count; i++) { + NodePort connection = reconnectConnections[i]; + if (connection == null) continue; + if (port.CanConnectTo(connection)) port.Connect(connection); + } + } + ports.Add(staticPort.fieldName, port); + } + } + + // Finally, make sure dynamic list port settings correspond to the settings of their "backing port" + foreach (NodePort listPort in dynamicListPorts) { + // At this point we know that ports here are dynamic list ports + // which have passed name/"backing port" checks, ergo we can proceed more safely. + string backingPortName = listPort.fieldName.Split(' ')[0]; + NodePort backingPort = staticPorts[backingPortName]; + + // Update port constraints. Creating a new port instead will break the editor, mandating the need for setters. + listPort.ValueType = GetBackingValueType(backingPort.ValueType); + listPort.direction = backingPort.direction; + listPort.connectionType = backingPort.connectionType; + listPort.typeConstraint = backingPort.typeConstraint; + } + } + + /// <summary> + /// Extracts the underlying types from arrays and lists, the only collections for dynamic port lists + /// currently supported. If the given type is not applicable (i.e. if the dynamic list port was not + /// defined as an array or a list), returns the given type itself. + /// </summary> + private static System.Type GetBackingValueType(System.Type portValType) { + if (portValType.HasElementType) { + return portValType.GetElementType(); + } + if (portValType.IsGenericType && portValType.GetGenericTypeDefinition() == typeof(List<>)) { + return portValType.GetGenericArguments()[0]; + } + return portValType; + } + + /// <summary>Returns true if the given port is in a dynamic port list.</summary> + private static bool IsDynamicListPort(NodePort port) { + // Ports flagged as "dynamicPortList = true" end up having a "backing port" and a name with an index, but we have + // no guarantee that a dynamic port called "output 0" is an element in a list backed by a static "output" port. + // Thus, we need to check for attributes... (but at least we don't need to look at all fields this time) + string[] fieldNameParts = port.fieldName.Split(' '); + if (fieldNameParts.Length != 2) return false; + + FieldInfo backingPortInfo = port.node.GetType().GetField(fieldNameParts[0]); + if (backingPortInfo == null) return false; + + object[] attribs = backingPortInfo.GetCustomAttributes(true); + return attribs.Any(x => { + Node.InputAttribute inputAttribute = x as Node.InputAttribute; + Node.OutputAttribute outputAttribute = x as Node.OutputAttribute; + return inputAttribute != null && inputAttribute.dynamicPortList || + outputAttribute != null && outputAttribute.dynamicPortList; + }); + } + + /// <summary> Cache node types </summary> + private static void BuildCache() { + portDataCache = new PortDataCache(); + System.Type baseType = typeof(Node); + List<System.Type> nodeTypes = new List<System.Type>(); + System.Reflection.Assembly[] assemblies = System.AppDomain.CurrentDomain.GetAssemblies(); + + // Loop through assemblies and add node types to list + foreach (Assembly assembly in assemblies) { + // Skip certain dlls to improve performance + string assemblyName = assembly.GetName().Name; + int index = assemblyName.IndexOf('.'); + if (index != -1) assemblyName = assemblyName.Substring(0, index); + switch (assemblyName) { + // The following assemblies, and sub-assemblies (eg. UnityEngine.UI) are skipped + case "UnityEditor": + case "UnityEngine": + case "System": + case "mscorlib": + case "Microsoft": + continue; + default: + nodeTypes.AddRange(assembly.GetTypes().Where(t => !t.IsAbstract && baseType.IsAssignableFrom(t)).ToArray()); + break; + } + } + + for (int i = 0; i < nodeTypes.Count; i++) { + CachePorts(nodeTypes[i]); + } + } + + public static List<FieldInfo> GetNodeFields(System.Type nodeType) { + List<System.Reflection.FieldInfo> fieldInfo = new List<System.Reflection.FieldInfo>(nodeType.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)); + + // GetFields doesnt return inherited private fields, so walk through base types and pick those up + System.Type tempType = nodeType; + while ((tempType = tempType.BaseType) != typeof(XNode.Node)) { + FieldInfo[] parentFields = tempType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance); + for (int i = 0; i < parentFields.Length; i++) { + // Ensure that we do not already have a member with this type and name + FieldInfo parentField = parentFields[i]; + if (fieldInfo.TrueForAll(x => x.Name != parentField.Name)) { + fieldInfo.Add(parentField); + } + } + } + return fieldInfo; + } + + private static void CachePorts(System.Type nodeType) { + List<System.Reflection.FieldInfo> fieldInfo = GetNodeFields(nodeType); + + for (int i = 0; i < fieldInfo.Count; i++) { + + //Get InputAttribute and OutputAttribute + object[] attribs = fieldInfo[i].GetCustomAttributes(true); + Node.InputAttribute inputAttrib = attribs.FirstOrDefault(x => x is Node.InputAttribute) as Node.InputAttribute; + Node.OutputAttribute outputAttrib = attribs.FirstOrDefault(x => x is Node.OutputAttribute) as Node.OutputAttribute; + + if (inputAttrib == null && outputAttrib == null) continue; + + if (inputAttrib != null && outputAttrib != null) Debug.LogError("Field " + fieldInfo[i].Name + " of type " + nodeType.FullName + " cannot be both input and output."); + else { + if (!portDataCache.ContainsKey(nodeType)) portDataCache.Add(nodeType, new List<NodePort>()); + portDataCache[nodeType].Add(new NodePort(fieldInfo[i])); + } + } + } + + [System.Serializable] + private class PortDataCache : Dictionary<System.Type, List<NodePort>>, ISerializationCallbackReceiver { + [SerializeField] private List<System.Type> keys = new List<System.Type>(); + [SerializeField] private List<List<NodePort>> values = new List<List<NodePort>>(); + + // save the dictionary to lists + public void OnBeforeSerialize() { + keys.Clear(); + values.Clear(); + foreach (var pair in this) { + keys.Add(pair.Key); + values.Add(pair.Value); + } + } + + // load dictionary from lists + public void OnAfterDeserialize() { + this.Clear(); + + if (keys.Count != values.Count) + throw new System.Exception(string.Format("there are {0} keys and {1} values after deserialization. Make sure that both key and value types are serializable.")); + + for (int i = 0; i < keys.Count; i++) + this.Add(keys[i], values[i]); + } + } + } +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs.meta new file mode 100644 index 00000000..34482f25 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeDataCache.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 64ea6af1e195d024d8df0ead1921e517 +timeCreated: 1507566823 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs new file mode 100644 index 00000000..efea4213 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace XNode { + /// <summary> Base class for all node graphs </summary> + [Serializable] + public abstract class NodeGraph : ScriptableObject { + + /// <summary> All nodes in the graph. <para/> + /// See: <see cref="AddNode{T}"/> </summary> + [SerializeField] public List<Node> nodes = new List<Node>(); + + /// <summary> Add a node to the graph by type (convenience method - will call the System.Type version) </summary> + public T AddNode<T>() where T : Node { + return AddNode(typeof(T)) as T; + } + + /// <summary> Add a node to the graph by type </summary> + public virtual Node AddNode(Type type) { + Node.graphHotfix = this; + Node node = ScriptableObject.CreateInstance(type) as Node; + node.graph = this; + nodes.Add(node); + return node; + } + + /// <summary> Creates a copy of the original node in the graph </summary> + public virtual Node CopyNode(Node original) { + Node.graphHotfix = this; + Node node = ScriptableObject.Instantiate(original); + node.graph = this; + node.ClearConnections(); + nodes.Add(node); + return node; + } + + /// <summary> Safely remove a node and all its connections </summary> + /// <param name="node"> The node to remove </param> + public virtual void RemoveNode(Node node) { + node.ClearConnections(); + nodes.Remove(node); + if (Application.isPlaying) Destroy(node); + } + + /// <summary> Remove all nodes and connections from the graph </summary> + public virtual void Clear() { + if (Application.isPlaying) { + for (int i = 0; i < nodes.Count; i++) { + Destroy(nodes[i]); + } + } + nodes.Clear(); + } + + /// <summary> Create a new deep copy of this graph </summary> + public virtual XNode.NodeGraph Copy() { + // Instantiate a new nodegraph instance + NodeGraph graph = Instantiate(this); + // Instantiate all nodes inside the graph + for (int i = 0; i < nodes.Count; i++) { + if (nodes[i] == null) continue; + Node.graphHotfix = graph; + Node node = Instantiate(nodes[i]) as Node; + node.graph = graph; + graph.nodes[i] = node; + } + + // Redirect all connections + for (int i = 0; i < graph.nodes.Count; i++) { + if (graph.nodes[i] == null) continue; + foreach (NodePort port in graph.nodes[i].Ports) { + port.Redirect(nodes, graph.nodes); + } + } + + return graph; + } + + protected virtual void OnDestroy() { + // Remove all nodes prior to graph destruction + Clear(); + } + +#region Attributes + /// <summary> Automatically ensures the existance of a certain node type, and prevents it from being deleted. </summary> + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] + public class RequireNodeAttribute : Attribute { + public Type type0; + public Type type1; + public Type type2; + + /// <summary> Automatically ensures the existance of a certain node type, and prevents it from being deleted </summary> + public RequireNodeAttribute(Type type) { + this.type0 = type; + this.type1 = null; + this.type2 = null; + } + + /// <summary> Automatically ensures the existance of a certain node type, and prevents it from being deleted </summary> + public RequireNodeAttribute(Type type, Type type2) { + this.type0 = type; + this.type1 = type2; + this.type2 = null; + } + + /// <summary> Automatically ensures the existance of a certain node type, and prevents it from being deleted </summary> + public RequireNodeAttribute(Type type, Type type2, Type type3) { + this.type0 = type; + this.type1 = type2; + this.type2 = type3; + } + + public bool Requires(Type type) { + if (type == null) return false; + if (type == type0) return true; + else if (type == type1) return true; + else if (type == type2) return true; + return false; + } + } +#endregion + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs.meta new file mode 100644 index 00000000..b2e12647 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodeGraph.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 093f68ef2455d544fa2d14b80c811322 +timeCreated: 1505461376 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs new file mode 100644 index 00000000..b03a3212 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs @@ -0,0 +1,418 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine; + +namespace XNode { + [Serializable] + public class NodePort { + public enum IO { Input, Output } + + public int ConnectionCount { get { return connections.Count; } } + /// <summary> Return the first non-null connection </summary> + public NodePort Connection { + get { + for (int i = 0; i < connections.Count; i++) { + if (connections[i] != null) return connections[i].Port; + } + return null; + } + } + + public IO direction { + get { return _direction; } + internal set { _direction = value; } + } + public Node.ConnectionType connectionType { + get { return _connectionType; } + internal set { _connectionType = value; } + } + public Node.TypeConstraint typeConstraint { + get { return _typeConstraint; } + internal set { _typeConstraint = value; } + } + + /// <summary> Is this port connected to anytihng? </summary> + public bool IsConnected { get { return connections.Count != 0; } } + public bool IsInput { get { return direction == IO.Input; } } + public bool IsOutput { get { return direction == IO.Output; } } + + public string fieldName { get { return _fieldName; } } + public Node node { get { return _node; } } + public bool IsDynamic { get { return _dynamic; } } + public bool IsStatic { get { return !_dynamic; } } + public Type ValueType { + get { + if (valueType == null && !string.IsNullOrEmpty(_typeQualifiedName)) valueType = Type.GetType(_typeQualifiedName, false); + return valueType; + } + set { + valueType = value; + if (value != null) _typeQualifiedName = value.AssemblyQualifiedName; + } + } + private Type valueType; + + [SerializeField] private string _fieldName; + [SerializeField] private Node _node; + [SerializeField] private string _typeQualifiedName; + [SerializeField] private List<PortConnection> connections = new List<PortConnection>(); + [SerializeField] private IO _direction; + [SerializeField] private Node.ConnectionType _connectionType; + [SerializeField] private Node.TypeConstraint _typeConstraint; + [SerializeField] private bool _dynamic; + + /// <summary> Construct a static targetless nodeport. Used as a template. </summary> + public NodePort(FieldInfo fieldInfo) { + _fieldName = fieldInfo.Name; + ValueType = fieldInfo.FieldType; + _dynamic = false; + var attribs = fieldInfo.GetCustomAttributes(false); + for (int i = 0; i < attribs.Length; i++) { + if (attribs[i] is Node.InputAttribute) { + _direction = IO.Input; + _connectionType = (attribs[i] as Node.InputAttribute).connectionType; + _typeConstraint = (attribs[i] as Node.InputAttribute).typeConstraint; + } else if (attribs[i] is Node.OutputAttribute) { + _direction = IO.Output; + _connectionType = (attribs[i] as Node.OutputAttribute).connectionType; + _typeConstraint = (attribs[i] as Node.OutputAttribute).typeConstraint; + } + } + } + + /// <summary> Copy a nodePort but assign it to another node. </summary> + public NodePort(NodePort nodePort, Node node) { + _fieldName = nodePort._fieldName; + ValueType = nodePort.valueType; + _direction = nodePort.direction; + _dynamic = nodePort._dynamic; + _connectionType = nodePort._connectionType; + _typeConstraint = nodePort._typeConstraint; + _node = node; + } + + /// <summary> Construct a dynamic port. Dynamic ports are not forgotten on reimport, and is ideal for runtime-created ports. </summary> + public NodePort(string fieldName, Type type, IO direction, Node.ConnectionType connectionType, Node.TypeConstraint typeConstraint, Node node) { + _fieldName = fieldName; + this.ValueType = type; + _direction = direction; + _node = node; + _dynamic = true; + _connectionType = connectionType; + _typeConstraint = typeConstraint; + } + + /// <summary> Checks all connections for invalid references, and removes them. </summary> + public void VerifyConnections() { + for (int i = connections.Count - 1; i >= 0; i--) { + if (connections[i].node != null && + !string.IsNullOrEmpty(connections[i].fieldName) && + connections[i].node.GetPort(connections[i].fieldName) != null) + continue; + connections.RemoveAt(i); + } + } + + /// <summary> Return the output value of this node through its parent nodes GetValue override method. </summary> + /// <returns> <see cref="Node.GetValue(NodePort)"/> </returns> + public object GetOutputValue() { + if (direction == IO.Input) return null; + return node.GetValue(this); + } + + /// <summary> Return the output value of the first connected port. Returns null if none found or invalid.</summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public object GetInputValue() { + NodePort connectedPort = Connection; + if (connectedPort == null) return null; + return connectedPort.GetOutputValue(); + } + + /// <summary> Return the output values of all connected ports. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public object[] GetInputValues() { + object[] objs = new object[ConnectionCount]; + for (int i = 0; i < ConnectionCount; i++) { + NodePort connectedPort = connections[i].Port; + if (connectedPort == null) { // if we happen to find a null port, remove it and look again + connections.RemoveAt(i); + i--; + continue; + } + objs[i] = connectedPort.GetOutputValue(); + } + return objs; + } + + /// <summary> Return the output value of the first connected port. Returns null if none found or invalid. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public T GetInputValue<T>() { + object obj = GetInputValue(); + return obj is T ? (T) obj : default(T); + } + + /// <summary> Return the output values of all connected ports. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public T[] GetInputValues<T>() { + object[] objs = GetInputValues(); + T[] ts = new T[objs.Length]; + for (int i = 0; i < objs.Length; i++) { + if (objs[i] is T) ts[i] = (T) objs[i]; + } + return ts; + } + + /// <summary> Return true if port is connected and has a valid input. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public bool TryGetInputValue<T>(out T value) { + object obj = GetInputValue(); + if (obj is T) { + value = (T) obj; + return true; + } else { + value = default(T); + return false; + } + } + + /// <summary> Return the sum of all inputs. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public float GetInputSum(float fallback) { + object[] objs = GetInputValues(); + if (objs.Length == 0) return fallback; + float result = 0; + for (int i = 0; i < objs.Length; i++) { + if (objs[i] is float) result += (float) objs[i]; + } + return result; + } + + /// <summary> Return the sum of all inputs. </summary> + /// <returns> <see cref="NodePort.GetOutputValue"/> </returns> + public int GetInputSum(int fallback) { + object[] objs = GetInputValues(); + if (objs.Length == 0) return fallback; + int result = 0; + for (int i = 0; i < objs.Length; i++) { + if (objs[i] is int) result += (int) objs[i]; + } + return result; + } + + /// <summary> Connect this <see cref="NodePort"/> to another </summary> + /// <param name="port">The <see cref="NodePort"/> to connect to</param> + public void Connect(NodePort port) { + if (connections == null) connections = new List<PortConnection>(); + if (port == null) { Debug.LogWarning("Cannot connect to null port"); return; } + if (port == this) { Debug.LogWarning("Cannot connect port to self."); return; } + if (IsConnectedTo(port)) { Debug.LogWarning("Port already connected. "); return; } + if (direction == port.direction) { Debug.LogWarning("Cannot connect two " + (direction == IO.Input ? "input" : "output") + " connections"); return; } +#if UNITY_EDITOR + UnityEditor.Undo.RecordObject(node, "Connect Port"); + UnityEditor.Undo.RecordObject(port.node, "Connect Port"); +#endif + if (port.connectionType == Node.ConnectionType.Override && port.ConnectionCount != 0) { port.ClearConnections(); } + if (connectionType == Node.ConnectionType.Override && ConnectionCount != 0) { ClearConnections(); } + connections.Add(new PortConnection(port)); + if (port.connections == null) port.connections = new List<PortConnection>(); + if (!port.IsConnectedTo(this)) port.connections.Add(new PortConnection(this)); + node.OnCreateConnection(this, port); + port.node.OnCreateConnection(this, port); + } + + public List<NodePort> GetConnections() { + List<NodePort> result = new List<NodePort>(); + for (int i = 0; i < connections.Count; i++) { + NodePort port = GetConnection(i); + if (port != null) result.Add(port); + } + return result; + } + + public NodePort GetConnection(int i) { + //If the connection is broken for some reason, remove it. + if (connections[i].node == null || string.IsNullOrEmpty(connections[i].fieldName)) { + connections.RemoveAt(i); + return null; + } + NodePort port = connections[i].node.GetPort(connections[i].fieldName); + if (port == null) { + connections.RemoveAt(i); + return null; + } + return port; + } + + /// <summary> Get index of the connection connecting this and specified ports </summary> + public int GetConnectionIndex(NodePort port) { + for (int i = 0; i < ConnectionCount; i++) { + if (connections[i].Port == port) return i; + } + return -1; + } + + public bool IsConnectedTo(NodePort port) { + for (int i = 0; i < connections.Count; i++) { + if (connections[i].Port == port) return true; + } + return false; + } + + /// <summary> Returns true if this port can connect to specified port </summary> + public bool CanConnectTo(NodePort port) { + // Figure out which is input and which is output + NodePort input = null, output = null; + if (IsInput) input = this; + else output = this; + if (port.IsInput) input = port; + else output = port; + // If there isn't one of each, they can't connect + if (input == null || output == null) return false; + // Check input type constraints + if (input.typeConstraint == XNode.Node.TypeConstraint.Inherited && !input.ValueType.IsAssignableFrom(output.ValueType)) return false; + if (input.typeConstraint == XNode.Node.TypeConstraint.Strict && input.ValueType != output.ValueType) return false; + if (input.typeConstraint == XNode.Node.TypeConstraint.InheritedInverse && !output.ValueType.IsAssignableFrom(input.ValueType)) return false; + // Check output type constraints + if (output.typeConstraint == XNode.Node.TypeConstraint.Inherited && !input.ValueType.IsAssignableFrom(output.ValueType)) return false; + if (output.typeConstraint == XNode.Node.TypeConstraint.Strict && input.ValueType != output.ValueType) return false; + if (output.typeConstraint == XNode.Node.TypeConstraint.InheritedInverse && !output.ValueType.IsAssignableFrom(input.ValueType)) return false; + // Success + return true; + } + + /// <summary> Disconnect this port from another port </summary> + public void Disconnect(NodePort port) { + // Remove this ports connection to the other + for (int i = connections.Count - 1; i >= 0; i--) { + if (connections[i].Port == port) { + connections.RemoveAt(i); + } + } + if (port != null) { + // Remove the other ports connection to this port + for (int i = 0; i < port.connections.Count; i++) { + if (port.connections[i].Port == this) { + port.connections.RemoveAt(i); + } + } + } + // Trigger OnRemoveConnection + node.OnRemoveConnection(this); + if (port != null) port.node.OnRemoveConnection(port); + } + + /// <summary> Disconnect this port from another port </summary> + public void Disconnect(int i) { + // Remove the other ports connection to this port + NodePort otherPort = connections[i].Port; + if (otherPort != null) { + for (int k = 0; k < otherPort.connections.Count; k++) { + if (otherPort.connections[k].Port == this) { + otherPort.connections.RemoveAt(i); + } + } + } + // Remove this ports connection to the other + connections.RemoveAt(i); + + // Trigger OnRemoveConnection + node.OnRemoveConnection(this); + if (otherPort != null) otherPort.node.OnRemoveConnection(otherPort); + } + + public void ClearConnections() { + while (connections.Count > 0) { + Disconnect(connections[0].Port); + } + } + + /// <summary> Get reroute points for a given connection. This is used for organization </summary> + public List<Vector2> GetReroutePoints(int index) { + return connections[index].reroutePoints; + } + + /// <summary> Swap connections with another node </summary> + public void SwapConnections(NodePort targetPort) { + int aConnectionCount = connections.Count; + int bConnectionCount = targetPort.connections.Count; + + List<NodePort> portConnections = new List<NodePort>(); + List<NodePort> targetPortConnections = new List<NodePort>(); + + // Cache port connections + for (int i = 0; i < aConnectionCount; i++) + portConnections.Add(connections[i].Port); + + // Cache target port connections + for (int i = 0; i < bConnectionCount; i++) + targetPortConnections.Add(targetPort.connections[i].Port); + + ClearConnections(); + targetPort.ClearConnections(); + + // Add port connections to targetPort + for (int i = 0; i < portConnections.Count; i++) + targetPort.Connect(portConnections[i]); + + // Add target port connections to this one + for (int i = 0; i < targetPortConnections.Count; i++) + Connect(targetPortConnections[i]); + + } + + /// <summary> Copy all connections pointing to a node and add them to this one </summary> + public void AddConnections(NodePort targetPort) { + int connectionCount = targetPort.ConnectionCount; + for (int i = 0; i < connectionCount; i++) { + PortConnection connection = targetPort.connections[i]; + NodePort otherPort = connection.Port; + Connect(otherPort); + } + } + + /// <summary> Move all connections pointing to this node, to another node </summary> + public void MoveConnections(NodePort targetPort) { + int connectionCount = connections.Count; + + // Add connections to target port + for (int i = 0; i < connectionCount; i++) { + PortConnection connection = targetPort.connections[i]; + NodePort otherPort = connection.Port; + Connect(otherPort); + } + ClearConnections(); + } + + /// <summary> Swap connected nodes from the old list with nodes from the new list </summary> + public void Redirect(List<Node> oldNodes, List<Node> newNodes) { + foreach (PortConnection connection in connections) { + int index = oldNodes.IndexOf(connection.node); + if (index >= 0) connection.node = newNodes[index]; + } + } + + [Serializable] + private class PortConnection { + [SerializeField] public string fieldName; + [SerializeField] public Node node; + public NodePort Port { get { return port != null ? port : port = GetPort(); } } + + [NonSerialized] private NodePort port; + /// <summary> Extra connection path points for organization </summary> + [SerializeField] public List<Vector2> reroutePoints = new List<Vector2>(); + + public PortConnection(NodePort port) { + this.port = port; + node = port.node; + fieldName = port.fieldName; + } + + /// <summary> Returns the port that this <see cref="PortConnection"/> points to </summary> + private NodePort GetPort() { + if (node == null || string.IsNullOrEmpty(fieldName)) return null; + return node.GetPort(fieldName); + } + } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs.meta new file mode 100644 index 00000000..3863705e --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/NodePort.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7dd2f76ac25c6f44c9426dff3e7491a3 +timeCreated: 1505734054 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs new file mode 100644 index 00000000..bb2774f7 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using XNode; + +namespace XNode { + /// <summary> Lets you instantiate a node graph in the scene. This allows you to reference in-scene objects. </summary> + public class SceneGraph : MonoBehaviour { + public NodeGraph graph; + } + + /// <summary> Derive from this class to create a SceneGraph with a specific graph type. </summary> + /// <example> + /// <code> + /// public class MySceneGraph : SceneGraph<MyGraph> { + /// + /// } + /// </code> + /// </example> + public class SceneGraph<T> : SceneGraph where T : NodeGraph { + public new T graph { get { return base.graph as T; } set { base.graph = value; } } + } +}
\ No newline at end of file diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs.meta new file mode 100644 index 00000000..c7978b69 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/SceneGraph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7915171fc13472a40a0162003052d2db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef new file mode 100644 index 00000000..eb644934 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef @@ -0,0 +1,13 @@ +{ + "name": "XNode", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef.meta b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef.meta new file mode 100644 index 00000000..8479d758 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Scripts/XNode.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b8e24fd1eb19b4226afebb2810e3c19b +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/package.json b/Other/NodeEditorExamples/Assets/xNode-examples/package.json new file mode 100644 index 00000000..9c1ec7d9 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/package.json @@ -0,0 +1,7 @@ +{ + "name": "com.github.siccity.xnode", + "description": "xNode provides a set of APIs and an editor interface for creating and editing custom node graphs.", + "version": "1.8.0", + "unity": "2018.1", + "displayName": "xNode" +} diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/package.json.meta b/Other/NodeEditorExamples/Assets/xNode-examples/package.json.meta new file mode 100644 index 00000000..c8f1dc43 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e9869d68f06b74538a01e9b8e406159e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: |