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

Method SetData

Source/Engine/Content/JsonAsset.cpp:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void JsonAssetBase::SetData(const StringView& value)
50{
51 if (!IsLoaded())
52 return;
53 PROFILE_CPU_NAMED("JsonAsset.SetData");
54 PROFILE_MEM(ContentAssets);
55 const StringAnsi dataJson(value);
56 ScopeLock lock(Locker);
57 const StringView dataTypeName = DataTypeName;
58 if (Init(dataTypeName, dataJson))
59 {
60 LOG(Error, "Failed to set Json asset data.");
61 }
62}
63
64bool JsonAssetBase::Init(const StringView& dataTypeName, const StringAnsiView& dataJson)
65{

Callers 2

CacheDebugLinesMethod · 0.45
DrawPhysicsDebugMethod · 0.45

Calls 2

IsLoadedFunction · 0.70
InitFunction · 0.50

Tested by

no test coverage detected