I’m developing a C# plugin, and I’ve been struggling to understand why the Read() method is never called on my custom UserData class. I finally discovered the culprit–I had overriden the Description property with something like:
public override string Description
{
get { return String.Format("Member: {0}", this.Name); }
}
I’m assuming the Description is used as a unique identifier for custom UserData types on file open (isn’t this what the GUID attribute is for?), and without a compile-time constant string as the Description it is unable to be found, so Read() is never called. If I change it to something like
public override string Description => "MemberUserData";
then it works fine.
This seems to me like a bug, or a need for better documentation. In any case, I’m describing the issue here in case other developers run into it.