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

Method Update

Source/Editor/Managed/ManagedEditor.cpp:278–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278void ManagedEditor::Update()
279{
280 // Skip if managed object is missing
281 const auto instance = GetManagedInstance();
282 if (instance == nullptr)
283 return;
284
285 // Cache update method pointer
286 if (UpdateMethod == nullptr)
287 {
288 UpdateMethod = GetClass()->GetMethod("Update");
289 if (UpdateMethod == nullptr)
290 {
291 LOG(Fatal, "Invalid Editor assembly!");
292 }
293 }
294
295 // Call update
296 MObject* exception = nullptr;
297 UpdateMethod->Invoke(instance, nullptr, &exception);
298 if (exception)
299 {
300 MException ex(exception);
301 ex.Log(LogType::Warning, TEXT("ManagedEditor::Update"));
302 }
303}
304
305void ManagedEditor::Exit()
306{

Calls 5

GetManagedInstanceFunction · 0.50
GetClassFunction · 0.50
GetMethodMethod · 0.45
InvokeMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected