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

Method ScreenToGameViewport

Source/Editor/Managed/ManagedEditor.cpp:418–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418Float2 ManagedEditor::ScreenToGameViewport(const Float2& screenPos) const
419{
420 Float2 result = screenPos;
421 if (HasManagedInstance())
422 {
423 if (Internal_ScreenToGameViewport == nullptr)
424 {
425 Internal_ScreenToGameViewport = GetClass()->GetMethod("Internal_ScreenToGameViewport", 1);
426 ASSERT(Internal_ScreenToGameViewport);
427 }
428 void* params[1];
429 params[0] = &result;
430 Internal_ScreenToGameViewport->Invoke(GetManagedInstance(), params, nullptr);
431 }
432 return result;
433}
434
435Float2 ManagedEditor::GameViewportToScreen(const Float2& viewportPos) const
436{

Callers

nothing calls this directly

Calls 5

HasManagedInstanceFunction · 0.50
GetClassFunction · 0.50
GetManagedInstanceFunction · 0.50
GetMethodMethod · 0.45
InvokeMethod · 0.45

Tested by

no test coverage detected