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

Function SerializeValue

Source/Engine/Content/Assets/VisualScript.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 bool SerializeValue(const Variant& a, const Variant& b)
50 {
51 bool result = a != b;
52 if (result)
53 {
54 // Special case for scene objects to handle prefab object references
55 auto* aSceneObject = ScriptingObject::Cast<SceneObject>((ScriptingObject*)a);
56 auto* bSceneObject = ScriptingObject::Cast<SceneObject>((ScriptingObject*)b);
57 if (aSceneObject && bSceneObject)
58 {
59 result = Serialization::ShouldSerialize(aSceneObject, bSceneObject);
60 }
61 }
62 return result;
63 }
64}
65
66#if VISUAL_SCRIPT_DEBUGGING

Callers 1

SerializeObjectMethod · 0.85

Calls 1

ShouldSerializeFunction · 0.50

Tested by

no test coverage detected