Skip to content

Commit 42eebe3

Browse files
committed
Fixed custom port type behavior initialization
1 parent c363fb9 commit 42eebe3

File tree

1 file changed

+2
-6
lines changed
  • Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements

1 file changed

+2
-6
lines changed

Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements/BaseNode.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public static BaseNode CreateFromType(Type nodeType, Vector2 position)
190190
public void Initialize(BaseGraph graph)
191191
{
192192
this.graph = graph;
193-
InitializeCustomPortTypeMethods();
194193

195194
ExceptionToLog.Call(() => Enable());
196195

@@ -199,11 +198,6 @@ public void Initialize(BaseGraph graph)
199198

200199
void InitializeCustomPortTypeMethods()
201200
{
202-
// var methods = GetType().GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);
203-
204-
// if (GetType().Name.Contains("Distance"))
205-
// Debug.Log(GetType().GetMethod("GetTypeFromTextureDim", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy));
206-
207201
MethodInfo[] methods = new MethodInfo[0];
208202
Type baseType = GetType();
209203
while (true)
@@ -243,6 +237,8 @@ void InitializeCustomPortTypeMethods()
243237
/// </summary>
244238
public virtual void InitializePorts()
245239
{
240+
InitializeCustomPortTypeMethods();
241+
246242
foreach (var nodeFieldKP in nodeFields.ToList().OrderByDescending(kp => kp.Value.info.MetadataToken))
247243
{
248244
var nodeField = nodeFieldKP.Value;

0 commit comments

Comments
 (0)