Hi,
-
I’ve searched the forums and haven’t found an answer that works…
-
I have a custom data type
Foo
which does stuff and has member variables. -
I’ve created a
GH_Foo
object, which inheritsGH_Goo<Foo>
,IGH_PreviewData
, andGH_ISerializable
. -
This
GH_Foo
overrides thepublic override bool Write(GH_IWriter writer)
andpublic override bool Read(GH_IReader reader)
to serialize it’s valueFoo
object. -
I have then created a
FooParameter
which inheritsGH_PersistentParam<GH_Foo>
.
All of this works great and lets me pass Foo
around the canvas and through various components, and also make a FooParameter
component.
However, when copy / pasting across definitions, or when saving / loading, the internalized data is lost, and I’m left with an empty parameter. Something either isn’t serializing right, or I’m missing a trick when it comes to internalizing the data in the parameter.
Following the answer in this, all should be well if I’ve overridden the Read
/ Write
functions in GH_Foo
, however it appears that all is not, in fact, well.
Am I missing something obvious or are there other functions that need to be overridden or other interfaces that need interfacing?