Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

GameWindowExtensions.SetWindowClass

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static AsyncOperation SetWindowClass(GameWindow window, string windowClass);

Parameters

Parameter Description
window The GameWindow instance this extension method is implicitly called on.
windowClass The QNX Screen window class string. Must not be null or empty.

Returns

AsyncOperation An AsyncOperation that you can use to track the completion of the window class update operation.

Description

Sets the QNX Screen window class for the specified window.

The QNX Screen window class string used to categorize and identify the window for Screen configuration and policy handling. Valid class names are system-defined and typically configured in the target device's graphics.conf. Throws an ArgumentException if the window class is null or empty.

Notes:

  • This method is asynchronous and returns an AsyncOperation that you can use to track the completion of the operation.
  • This method is available only on QNX platforms.
using UnityEngine;
using UnityEngine.Windowing;
using UnityEngine.Windowing.QNX;

public class SetWindowClassExample : MonoBehaviour { void Start() { AsyncOperation op = GameWindow.Main.SetWindowClass("unity");

op.completed += _ => { Debug.Log($"Window class set for {GameWindow.Main.GetTitle()}"); }; } }