Version: 2021.1
Device Simulator introduction
Simulated classes

The Simulator view

The Simulator view displays your application on a simulated mobile device. Use it to see how your application appears with the screen shape, resolution, and orientation of that device.

A screenshot of the Simulator view.
A screenshot of the Simulator view.

Using the Simulator view

To open the Simulator view, do one of the following:

  • In the Game view, in the top left corner, use the drop-down menu to switch between the Game view and the Simulator view.
  • In the menu: Window > General > Device Simulator

Unity simulates the device in the Simulator view. To control the simulation, use the toolbar and the Control Panel.

Toolbar

The toolbar is at the top of the Simulator view and contains options that, along with the Control Panel, control the simulation.

The toolbar at the top of the Simulator view.
The toolbar at the top of the Simulator view.
控件 描述
Game/Simulator view Use this drop-down menu to switch between the Simulator view and the Game view.
Device selection drop-down menu Choose the device to simulate from the available device definitions.
Scale Zoom in or out on the simulated screen.
Fit to Screen Scale the display to fit inside the window.
Rotate Simulates the physical rotation of the device. The image on the device screen rotates together with the device if you enable auto-rotation and if the device supports rotation. Otherwise, if you rotate the device it causes the image to be sideways or upside down. Note: The Device Simulator doesn’t support gyroscope simulation.
Safe Area Indicates whether the view draws a line around the SafeArea of the current device screen.
Play Mode Behaviour Choose what to do when the Editor enters Play mode. The options are:
Play Focused: Focuses the Simulator view on Play.
Play Maximized: Focuses and maximizes the Simulator view on Play.
Play Unfocused: doesn’t focus the Simulator view on Play. Note: This option doesn’t create a Simulator view if you disable the Create Game View On Play Editor preference.
Control Panel Displays and hides the Control Panel.

Control Panel

To open the Control Panel, click Control Panel in the top-right corner of the Toolbar. By default, the Control Panel contains settings for the Application simulated class.

The Device Simulator Control Panel.
The Device Simulator Control Panel.
属性 描述
System Language Specifies the value to receive from Device.Application.systemLanguage.
Internet Reachability Specifies the value to receive from Device.Application.internetReachability.
On Low Memory Calls the lowMemory event.

Device Simulator plugins can change the appearance of the control panel and add content and controls. Some packages, like the Adaptive Performance package, contain Device Simulator plugins. Their UI appears in the Control Panel if you install the package. For more information, see Device Simulator plugins.

Device Simulator introduction
Simulated classes
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961