diff --git a/Source/Editor/Surface/Archetypes/Parameters.cs b/Source/Editor/Surface/Archetypes/Parameters.cs
index a06ef769e..10d4337bd 100644
--- a/Source/Editor/Surface/Archetypes/Parameters.cs
+++ b/Source/Editor/Surface/Archetypes/Parameters.cs
@@ -427,13 +427,13 @@ namespace FlaxEditor.Surface.Archetypes
}
///
- public bool IsParamreferenced(SurfaceParameter param, VisjectSurface surface)
+ public bool IsParamreferenced(SurfaceParameter param)
{
- for (int i = 0; i < surface.Nodes.Count; i++)
+ for (int i = 0; i < Surface.Nodes.Count; i++)
{
- if (surface.Nodes[i] is IParametersDependantNode node)
+ if (Surface.Nodes[i] is IParametersDependantNode node)
{
- return (Guid)surface.Nodes[i].Values[0] == param.ID && surface.Nodes[i].GetBoxes().Any(b => b.Connections.Count > 0);
+ return (Guid)Values[0] == param.ID;
}
}
@@ -958,13 +958,13 @@ namespace FlaxEditor.Surface.Archetypes
}
///
- public bool IsParamreferenced(SurfaceParameter param, VisjectSurface surface)
+ public bool IsParamreferenced(SurfaceParameter param)
{
- for (int i = 0; i < surface.Nodes.Count; i++)
+ for (int i = 0; i < Surface.Nodes.Count; i++)
{
- if (surface.Nodes[i] is IParametersDependantNode node)
+ if (Surface.Nodes[i] is IParametersDependantNode node)
{
- return (Guid)surface.Nodes[i].Values[0] == param.ID && surface.Nodes[i].GetBoxes().Any(b => b.Connections.Count > 0);
+ return (Guid)Values[0] == param.ID;
}
}
diff --git a/Source/Editor/Surface/IParametersDependantNode.cs b/Source/Editor/Surface/IParametersDependantNode.cs
index 650dff545..0148682f1 100644
--- a/Source/Editor/Surface/IParametersDependantNode.cs
+++ b/Source/Editor/Surface/IParametersDependantNode.cs
@@ -38,8 +38,7 @@ namespace FlaxEditor.Surface
/// Get if the parameter is referenced in a graph. Referenced in this case means in a graph and at least one node in-/output connected to another node.
///
/// The parameter.
- /// The visject surface.
/// If the parameter is referenced.
- bool IsParamreferenced(SurfaceParameter param, VisjectSurface surface);
+ bool IsParamreferenced(SurfaceParameter param);
}
}
diff --git a/Source/Editor/Surface/VisjectSurfaceWindow.cs b/Source/Editor/Surface/VisjectSurfaceWindow.cs
index 5f6e95a0a..5d6a050a6 100644
--- a/Source/Editor/Surface/VisjectSurfaceWindow.cs
+++ b/Source/Editor/Surface/VisjectSurfaceWindow.cs
@@ -788,7 +788,7 @@ namespace FlaxEditor.Surface
{
if (nodes[i] is IParametersDependantNode node)
{
- if (displayWarning && node.IsParamreferenced(param, window.VisjectSurface))
+ if (displayWarning && node.IsParamreferenced(param))
connectedParameterNodeCount++;
}
}