Experimental: this API is experimental and might be changed or removed in the future.

XRDisplaySubsystem.displayFocusChanged

Parameters

valueDelegate method to call when the event is sent.

Description

Event sent when XR display focus changes.

This event is sent on the main thread.

using UnityEngine;
using UnityEngine.Experimental.XR;

public class ExampleClass : MonoBehaviour { void OnEnable() { XRDisplaySubsystem.displayFocusChanged += HandleFocusChanged; }

void OnDisable() { XRDisplaySubsystem.displayFocusChanged -= HandleFocusChanged; }

void HandleFocusChanged(bool focus) { } }

Did you find this page useful? Please give it a rating: