- Implemented very basic support for method override nodes
- Cleanup
This commit is contained in:
@@ -744,6 +744,16 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
|
|
||||||
base.OnDestroy();
|
base.OnDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static bool IsInputCompatible(NodeArchetype nodeArch, ScriptType outputType, ConnectionsHint hint)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static bool IsOutputCompatible(NodeArchetype nodeArch, ScriptType inputType, ConnectionsHint hint)
|
||||||
|
{
|
||||||
|
return inputType.IsVoid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class InvokeMethodNode : SurfaceNode
|
private sealed class InvokeMethodNode : SurfaceNode
|
||||||
@@ -2460,6 +2470,8 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
Title = string.Empty,
|
Title = string.Empty,
|
||||||
Description = "Overrides the base class method with custom implementation",
|
Description = "Overrides the base class method with custom implementation",
|
||||||
Flags = NodeFlags.VisualScriptGraph | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste,
|
Flags = NodeFlags.VisualScriptGraph | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste,
|
||||||
|
IsInputCompatible = MethodOverrideNode.IsInputCompatible,
|
||||||
|
IsOutputCompatible = MethodOverrideNode.IsOutputCompatible,
|
||||||
Size = new Float2(240, 60),
|
Size = new Float2(240, 60),
|
||||||
DefaultValues = new object[]
|
DefaultValues = new object[]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -589,7 +589,6 @@ namespace FlaxEditor.Surface
|
|||||||
node.DefaultValues[0] = name;
|
node.DefaultValues[0] = name;
|
||||||
node.DefaultValues[1] = parameters.Length;
|
node.DefaultValues[1] = parameters.Length;
|
||||||
node.Title = "Override " + name;
|
node.Title = "Override " + name;
|
||||||
node.Tag = member;
|
|
||||||
nodes.Add(node);
|
nodes.Add(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user