文档

Unity Engine

Unity Engine

GetTitle()

Gets the title of the window.
阅读时间1 分钟最后更新于 1 个月前

Definition

public string GetTitle()

Returns

Type

Description

stringThe title of the window as a string.

Examples

using UnityEngine;using UnityEngine.Windowing;public class WindowTitleExample : MonoBehaviour{ void Start() { var window = GameWindow.Main; string title = window.GetTitle(); Debug.Log($"Window title: {title}"); }}