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

Method Deserialize

Source/Engine/UI/UICanvas.cpp:105–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void UICanvas::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
106{
107 // Base
108 Actor::Deserialize(stream, modifier);
109
110#if !COMPILE_WITHOUT_CSHARP
111 // Handle C# object data serialization
112 const auto dataMember = stream.FindMember("V");
113 if (dataMember != stream.MemberEnd())
114 {
115 PROFILE_MEM(UI);
116 rapidjson_flax::StringBuffer buffer;
117 rapidjson_flax::Writer<rapidjson_flax::StringBuffer> writer(buffer);
118 dataMember->value.Accept(writer);
119 void* args[1];
120 args[0] = MUtils::ToString(StringAnsiView(buffer.GetString(), (int32)buffer.GetSize()));
121 MObject* exception = nullptr;
122 UICanvas_Deserialize->Invoke(GetOrCreateManagedInstance(), args, &exception);
123 if (exception)
124 {
125 MException ex(exception);
126 ex.Log(LogType::Error, TEXT("UICanvas::Deserialize"));
127 }
128 if (IsDuringPlay())
129 {
130 UICANVAS_INVOKE(PostDeserialize);
131 }
132 }
133#endif
134}
135
136void UICanvas::OnBeginPlay()
137{

Callers 2

DeepCloneMethod · 0.45
ReadVariantMethod · 0.45

Calls 11

FindMemberMethod · 0.80
MemberEndMethod · 0.80
DeserializeFunction · 0.50
ToStringFunction · 0.50
StringAnsiViewClass · 0.50
AcceptMethod · 0.45
GetStringMethod · 0.45
GetSizeMethod · 0.45
InvokeMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected