| 734 | }; |
| 735 | |
| 736 | void 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 |
nothing calls this directly
no test coverage detected