How do you change a Document member value? I am writing to write/overwrite a String member
in a document class. I see JsonTools has a function to read a member but I am unsure how to write a specific value to the document using the member name.
I would use SetData(StringView)
to modify asset data (it will reload the runtime Instance object too). In c# we have utility method to set value via custom instance which serializes it to string, maybe we could do sth similar for C++ too:
rapidjson_flax::StringBuffer buffer;
PrettyJsonWriter writerObj(buffer);
JsonWriter& writer = writerObj;
myObject->Serialize(writer);
myAsset->SetData(StringView((const char*)buffer.GetString(), (int32)buffer.GetSize());