| 72 | #endif |
| 73 | |
| 74 | void 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 | |
| 105 | void UICanvas::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) |
| 106 | { |
no test coverage detected