Hi,
I have this class
public class MyClass<T> : Node
{
}
How I can add this constraint?
where T : new()
I tried:
public class MyClass<T> :Node , where T : new() {}
or
public class MyClass<T> where T : new() {}
Both attempt give me this error:
E 0:00:00.647 start: Script does not inherit a Node: res://MyClass.cs
<C++ Error> Condition "!valid_type" is true. Continuing.
<C++ Source> main/main.cpp:1693 @ start()
Thank you