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

Function OnScriptsReloading

Source/Engine/Networking/NetworkReplicator.cpp:264–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262
263#if USE_EDITOR
264 void OnScriptsReloading()
265 {
266 ScopeLock lock(ObjectsLock);
267 if (Objects.HasItems())
268 LOG(Warning, "Hot-reloading scripts with network objects active.");
269 if (Hierarchy)
270 {
271 Delete(Hierarchy);
272 Hierarchy = nullptr;
273 }
274
275 // Clear any references to non-engine scripts before code hot-reload
276 BinaryModule* flaxModule = GetBinaryModuleFlaxEngine();
277 for (auto i = SerializersTable.Begin(); i.IsNotEnd(); ++i)
278 {
279 if (i->Key.Module != flaxModule)
280 SerializersTable.Remove(i);
281 }
282 for (auto i = NetworkRpcInfo::RPCsTable.Begin(); i.IsNotEnd(); ++i)
283 {
284 if (i->Key.First.Module != flaxModule)
285 NetworkRpcInfo::RPCsTable.Remove(i);
286 }
287 }
288#endif
289}
290

Callers

nothing calls this directly

Calls 5

DeleteFunction · 0.85
HasItemsMethod · 0.45
BeginMethod · 0.45
IsNotEndMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected