Home Forums XR Discussions Check manually if an object is in focus Reply To: Check manually if an object is in focus

#9163
Henke Andersson
Participant

Hi.
If you want to know if the object has gaze focus at any time, you can just store the hasFocus in a field every time its changed, like:

public void GazeFocusChanged(bool hasFocus)
{
_hasFocus = hasFocus;
}

void Update()
{
if(_hasFocus)……
}
Hope it helps.
/H