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

Method Serialize

Source/Engine/UI/UICanvas.cpp:74–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72#endif
73
74void UICanvas::Serialize(SerializeStream& stream, const void* otherObj)
75{
76 // Base
77 Actor::Serialize(stream, otherObj);
78
79 SERIALIZE_GET_OTHER_OBJ(UICanvas);
80
81#if !COMPILE_WITHOUT_CSHARP
82 PROFILE_MEM(UI);
83 stream.JKEY("V");
84 void* params[1];
85 params[0] = other ? other->GetOrCreateManagedInstance() : nullptr;
86 MObject* exception = nullptr;
87 auto invokeResultStr = (MString*)UICanvas_Serialize->Invoke(GetOrCreateManagedInstance(), params, &exception);
88 if (exception)
89 {
90 MException ex(exception);
91 ex.Log(LogType::Error, TEXT("UICanvas::Serialize"));
92
93 // Empty object
94 stream.StartObject();
95 stream.EndObject();
96 }
97 else
98 {
99 // Write result data
100 stream.RawValue(MCore::String::GetChars(invokeResultStr));
101 }
102#endif
103}
104
105void UICanvas::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
106{

Callers 2

DeepCloneMethod · 0.45
WriteVariantMethod · 0.45

Calls 8

SerializeFunction · 0.50
InvokeMethod · 0.45
LogMethod · 0.45
StartObjectMethod · 0.45
EndObjectMethod · 0.45
RawValueMethod · 0.45

Tested by

no test coverage detected