diff --git a/TNodeCore/Extensions.meta b/TNodeCore/Extensions.meta new file mode 100644 index 0000000..95e2601 --- /dev/null +++ b/TNodeCore/Extensions.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 20063ba2edb04382add4c050abc43ab6 +timeCreated: 1659881788 \ No newline at end of file diff --git a/TNodeCore/Extensions/ArrayExtensions.cs b/TNodeCore/Extensions/ArrayExtensions.cs new file mode 100644 index 0000000..1b0ea96 --- /dev/null +++ b/TNodeCore/Extensions/ArrayExtensions.cs @@ -0,0 +1,9 @@ +namespace TilemapGenerator.ThirdParty.Extensions{ + public static class ArrayExtensions { + public static void Fill(this T[] originalArray, T with) { + for(int i = 0; i < originalArray.Length; i++){ + originalArray[i] = with; + } + } + } +} \ No newline at end of file diff --git a/TNodeCore/Extensions/ArrayExtensions.cs.meta b/TNodeCore/Extensions/ArrayExtensions.cs.meta new file mode 100644 index 0000000..698b4c3 --- /dev/null +++ b/TNodeCore/Extensions/ArrayExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a348068fc78d4244b387a2205a0b0741 +timeCreated: 1659881796 \ No newline at end of file diff --git a/TNodeCore/Extensions/SerializedPropertyExtensions.cs b/TNodeCore/Extensions/SerializedPropertyExtensions.cs new file mode 100644 index 0000000..c9d78ed --- /dev/null +++ b/TNodeCore/Extensions/SerializedPropertyExtensions.cs @@ -0,0 +1,18 @@ +using UnityEditor; + +namespace TNodeCore.Extensions{ + public static class SerializedPropertyExtensions{ + public static object BoxedValue(this SerializedProperty serializedProperty){ + var targetObject = serializedProperty.serializedObject.targetObject; + var targetObjectClassType = targetObject.GetType(); + var field = targetObjectClassType.GetField(serializedProperty.propertyPath); + if (field != null) + { + var value = field.GetValue(targetObject); + return value; + } + + return null; + } + } +} \ No newline at end of file diff --git a/TNodeCore/Extensions/SerializedPropertyExtensions.cs.meta b/TNodeCore/Extensions/SerializedPropertyExtensions.cs.meta new file mode 100644 index 0000000..9abc3c5 --- /dev/null +++ b/TNodeCore/Extensions/SerializedPropertyExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b9676c6d87984b0a930b41a479f6f962 +timeCreated: 1659882181 \ No newline at end of file diff --git a/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs b/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs index 9102505..2781420 100644 --- a/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs +++ b/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs @@ -1,5 +1,5 @@ -using TilemapGenerator.ThirdParty.Extensions; -using TNode.TNodeCore.Editor.Serialization; +using TNode.TNodeCore.Editor.Serialization; +using TNodeCore.Extensions; using TNodeCore.Runtime.Attributes; using TNodeCore.Runtime.Models; using UnityEditor; diff --git a/TNodeGraphViewImpl/TNodeGraphView.asmdef b/TNodeGraphViewImpl/TNodeGraphView.asmdef new file mode 100644 index 0000000..66bcd19 --- /dev/null +++ b/TNodeGraphViewImpl/TNodeGraphView.asmdef @@ -0,0 +1,16 @@ +{ + "name": "TNodeGraphView", + "rootNamespace": "", + "references": [ + "GUID:d9d6b4f0cdce23345bf2e956f8041ca2" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/TNodeGraphViewImpl/TNodeGraphView.asmdef.meta b/TNodeGraphViewImpl/TNodeGraphView.asmdef.meta new file mode 100644 index 0000000..c5adf47 --- /dev/null +++ b/TNodeGraphViewImpl/TNodeGraphView.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9930bfbc90ffc294ba99500b2a29dff7 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: