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

Method Internal_ScreenToGameViewport

Source/Editor/Editor.cs:1556–1568  ·  view source on GitHub ↗
(ref Float2 pos)

Source from the content-addressed store, hash-verified

1554 }
1555
1556 internal void Internal_ScreenToGameViewport(ref Float2 pos)
1557 {
1558 var win = Windows.GameWin?.Root;
1559 if (win?.RootWindow is WindowRootControl root)
1560 {
1561 pos = Windows.GameWin.Viewport.PointFromScreen(pos);
1562 pos = Float2.Round(pos);
1563 }
1564 else
1565 {
1566 pos = Float2.Minimum;
1567 }
1568 }
1569
1570 internal void Internal_GameViewportToScreen(ref Float2 pos)
1571 {

Callers

nothing calls this directly

Calls 2

PointFromScreenMethod · 0.45
RoundMethod · 0.45

Tested by

no test coverage detected