godot/modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs
Ignacio Roldán Etcheverry 0c30c678f0 C#: Re-introduce generic Godot Array and Dictionary
This new version does not support the following type arguments:

- Generic types
- Array of Godot Object (Godot.Object[]) or derived types

The new implementation uses delegate pointers to call the Variant
conversion methods. We do type checking only once in the static
constructor to get the conversion delegates.
Now, we no longer need to do type checking every time, and we no
longer have to box value types.
This is the best implementation I could come up with, as C# generics
don't support anything similar to C++ template specializations.
2022-08-22 03:36:52 +02:00

63 lines
1.1 KiB
C#

// meta-description: Visual shader's node plugin template
using _BINDINGS_NAMESPACE_;
using System;
public partial class VisualShaderNode_CLASS_ : _BASE_
{
public override string _GetName()
{
return "_CLASS_";
}
public override string _GetCategory()
{
return "";
}
public override string _GetDescription()
{
return "";
}
public override int _GetReturnIconType()
{
return 0;
}
public override int _GetInputPortCount()
{
return 0;
}
public override string _GetInputPortName(int port)
{
return "";
}
public override int _GetInputPortType(int port)
{
return 0;
}
public override int _GetOutputPortCount()
{
return 1;
}
public override string _GetOutputPortName(int port)
{
return "result";
}
public override int _GetOutputPortType(int port)
{
return 0;
}
public override string _GetCode(Godot.Collections.Array<string> inputVars, Godot.Collections.Array<string> outputVars, Shader.Mode mode, VisualShader.Type type)
{
return "";
}
}