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

Method ScriptsReloadRegisterObject

Source/Engine/Level/Level.cpp:736–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734};
735
736void Level::ScriptsReloadRegisterObject(ScriptingObject*& obj)
737{
738 if (!obj)
739 return;
740 auto& e = ScriptsReloadObjects.AddOne();
741 e.Object = &obj;
742 e.TypeName = obj->GetType().Fullname;
743 if (auto* serializable = ScriptingObject::ToInterface<ISerializable>(obj))
744 e.Data = JsonSerializer::SaveToBytes(serializable);
745 ScriptingObject* o = obj;
746 obj = nullptr;
747 o->DeleteObjectNow();
748}
749
750#endif
751

Callers

nothing calls this directly

Calls 3

AddOneMethod · 0.80
DeleteObjectNowMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected