Custom Data Type + Casting fails

I have a custom node data type (inside a compiled .gha assembly) with associated GeometricGoo Wrapper class and Parameter class. NodeGoo has casting methods to “GH_Point” and “Point3d”.

If the node object is created inside a component inside the .gha the casting to Point works fine.

If the node object is created inside a C# script (with the .gha as referenced assembly) the casting fails (“Data conversion failed from Goo to Point”). If I plug the node into a node parameter and then into a point it works. All the C# script in the picture does is A = new Node();


Am I missing the casting to a specific type?

A = new NodeGoo (new Node());

You’re not missing anything, the type conversions that are applied to data coming out of script components are limited. You’ll need to output the actual goo instance like @Dani_Abalde said.

OK, understood.

The same issue however also happens if in the C# only something generic happens (easiest case: A = x; with x left as object). But also if the C# script only work on list of objects. Any way to improve the behaviour of my custom goo/parameter class here?