Merge pull request #45 from taoria/work-in-progress

fix:add an extension and asmdef
main
taoria 3 years ago committed by GitHub
commit f18222105e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      TNodeCore/Extensions.meta
  2. 9
      TNodeCore/Extensions/ArrayExtensions.cs
  3. 3
      TNodeCore/Extensions/ArrayExtensions.cs.meta
  4. 18
      TNodeCore/Extensions/SerializedPropertyExtensions.cs
  5. 3
      TNodeCore/Extensions/SerializedPropertyExtensions.cs.meta
  6. 4
      TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs
  7. 16
      TNodeGraphViewImpl/TNodeGraphView.asmdef
  8. 7
      TNodeGraphViewImpl/TNodeGraphView.asmdef.meta

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 20063ba2edb04382add4c050abc43ab6
timeCreated: 1659881788

@ -0,0 +1,9 @@
namespace TilemapGenerator.ThirdParty.Extensions{
public static class ArrayExtensions {
public static void Fill<T>(this T[] originalArray, T with) {
for(int i = 0; i < originalArray.Length; i++){
originalArray[i] = with;
}
}
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a348068fc78d4244b387a2205a0b0741
timeCreated: 1659881796

@ -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;
}
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b9676c6d87984b0a930b41a479f6f962
timeCreated: 1659882181

@ -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;

@ -0,0 +1,16 @@
{
"name": "TNodeGraphView",
"rootNamespace": "",
"references": [
"GUID:d9d6b4f0cdce23345bf2e956f8041ca2"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9930bfbc90ffc294ba99500b2a29dff7
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save