Home › Forums › Unity SDK › Can I get gaze position in full screen coordinates? › Reply To: Can I get gaze position in full screen coordinates?
_(repeating this as the reply appears to have disappeared)_
Digging around the internals a bit, I found a solution, albeit a bit of a dirty one.
First, in ScreenHelpers.cs, I added a new GameViewBoundsProvider:
internal class FullScreenGameViewBoundsProvider : GameViewBoundsProvider
{
public override Rect GetGameViewClientAreaNormalizedBounds()
{
return new Rect(0, 0, 1, 1);
}
}
Then in TobiiHost.Awake(), I commented out the code initialising _gameViewBoundsProvider and replaced it with my own:
void Awake()
{
// Stubbed the game view bounds provider to get full screen always.
_gameViewBoundsProvider = new FullScreenGameViewBoundsProvider();
// …
This _appears_ to work. I can minimise the editor window, switch to OBS and see the output of the capture from Unity, and it appears to behave the same as if the game window was full screen. The only bad thing about it is that it did require modifying the internal code.
I did find another way, which is to get the GameViewInfo and try to calculate it from that, but the values I was getting out of that didn’t seem like it was reflecting the true position of the window, and I figured that it is more elegant to just have the host think that the window is taking up the full screen at all times.