void InsertMeshCommand::serialize(Lumix::JsonSerializer& serializer) { serializer.serialize("path", m_mesh_path.c_str()); serializer.beginArray("pos"); serializer.serializeArrayItem(m_position.x); serializer.serializeArrayItem(m_position.y); serializer.serializeArrayItem(m_position.z); serializer.endArray(); }
void InsertMeshCommand::deserialize(Lumix::JsonSerializer& serializer) { char path[Lumix::MAX_PATH_LENGTH]; serializer.deserialize("path", path, sizeof(path), ""); m_mesh_path = path; serializer.deserializeArrayBegin("pos"); serializer.deserializeArrayItem(m_position.x, 0); serializer.deserializeArrayItem(m_position.y, 0); serializer.deserializeArrayItem(m_position.z, 0); serializer.deserializeArrayEnd(); }
virtual void deserialize(Lumix::JsonSerializer& serializer) { serializer.deserialize("parent", m_new_parent, 0); serializer.deserialize("child", m_child, 0); m_old_parent = m_hierarchy.getParent(m_child); }
virtual void serialize(Lumix::JsonSerializer& serializer) { serializer.serialize("parent", m_new_parent); serializer.serialize("child", m_child); }