기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


displayFocusChanged

Event sent when XR display focus changes.
읽는 시간 1분최근 업데이트: 23일 전

Definition

  • Type: Event
  • Namespace: UnityEngine.XR
  • Assembly: UnityEngine.XRModule
public event Action<bool> displayFocusChanged

Remarks

This event is sent on the main thread.

Examples

using UnityEngine;using UnityEngine.XR;public class ExampleClass : MonoBehaviour{ public XRDisplaySubsystem display; void OnEnable() { display.displayFocusChanged += HandleFocusChanged; } void OnDisable() { display.displayFocusChanged -= HandleFocusChanged; } void HandleFocusChanged(bool focus) { }}