MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / saveInternal

Method saveInternal

Source/Engine/Content/JsonAsset.cpp:200–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool JsonAssetBase::saveInternal(JsonWriter& writer) const
201{
202 ScopeLock lock(Locker);
203
204 writer.StartObject();
205 {
206 // Json resource header
207 writer.JKEY("ID");
208 writer.Guid(GetID());
209 writer.JKEY("TypeName");
210 writer.String(DataTypeName);
211 writer.JKEY("EngineBuild");
212 writer.Int(FLAXENGINE_VERSION_BUILD);
213
214 // Json resource data
215 rapidjson_flax::StringBuffer dataBuffer;
216 OnGetData(dataBuffer);
217 writer.JKEY("Data");
218 writer.RawValue(dataBuffer.GetString(), (int32)dataBuffer.GetSize());
219 }
220 writer.EndObject();
221
222 return false;
223}
224
225void JsonAssetBase::GetReferences(Array<Guid>& assets, Array<String>& files) const
226{

Callers

nothing calls this directly

Calls 9

GetIDFunction · 0.85
GuidMethod · 0.80
StartObjectMethod · 0.45
StringMethod · 0.45
IntMethod · 0.45
RawValueMethod · 0.45
GetStringMethod · 0.45
GetSizeMethod · 0.45
EndObjectMethod · 0.45

Tested by

no test coverage detected