[SFS DEBUG] Cannot serialize field of object: com.insightng.platform.model.Group, field: nodeIds, type: MonoField -- unsupported type!
The list is part of an object called Group and I'm putting the group into an SFSObject and sending it to the server with an ExtensionRequest.
All the other variables in the object serialize just fine.
Here is the object I'm trying to send:
Code: Select all
public class Group : SerializableSFSType
{
private string id;
private string label;
private List<string> nodeIds;
private string color;
public string getLabel() {
return label;
}
public void setLabel(string label) {
this.label = label;
}
public List<string> getNodeIds() {
return nodeIds;
}
public void setNodeIds(List<string> nodeIds) {
this.nodeIds = nodeIds;
}
public string getColor() {
return color;
}
public void setColor(string color) {
this.color = color;
}
public string getID() {
return id;
}
public void setID(string id) {
this.id = id;
}
}
The object on the server is identical to this one.
I call this function to send the Group to the server:
Code: Select all
// Send the passed group to the server
public void SendGroup(ContextGroup newGrp)
{
Group grp = new Group();
grp.setLabel(newGrp.name);
Debug.LogWarning("Group name: " + grp.getLabel());
Debug.LogWarning(newGrp.knowledgeUnits.Count + " nodes in the remote group");
// If there are knowledge units in the ContextGroup, add them to the remote Group
if (newGrp.knowledgeUnits.Count != 0)
{
List<string> nodeIDs = new List<string>();
for(int i=0; i < newGrp.knowledgeUnits.Count; i++)
{
nodeIDs.Add(currentCanvas.getNodes()[newGrp.knowledgeUnits[i].canvasID].getID());
Debug.LogWarning("Node ID " + i + ": " + currentCanvas.getNodes()[newGrp.knowledgeUnits[i].canvasID].getID());
}
Debug.LogWarning(nodeIDs.Count + " nodes in the remote group");
grp.setNodeIds((List<string>)nodeIDs);
}
Debug.LogError(newGrp.color);
// Convert the color of the group to a string
if (newGrp.color == Color.cyan)
grp.setColor("cyan");
else if (newGrp.color == Color.blue)
grp.setColor("blue");
else if (newGrp.color == Color.green)
grp.setColor("green");
else if (newGrp.color == Color.yellow)
grp.setColor("yellow");
else if (newGrp.color == Color.magenta)
grp.setColor("magenta");
else if (newGrp.color == Color.red)
grp.setColor("red");
else if (newGrp.color == Color.white)
grp.setColor("white");
else if (newGrp.color == Color.black)
grp.setColor("black");
else if (newGrp.color == Color.gray)
grp.setColor("gray");
SFSObject sfso = new SFSObject();
sfso.PutClass("group", grp);
Debug.LogWarning("Sending group ...");
sfs.Send(new ExtensionRequest("group.add", sfso));
groupQueue.Enqueue(grp);
}
Any help or insight on this would be much appreciated.
Thanks.