Version: 1.7
LanguageEnglish
  • C#

Display.Deactivate

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 void Deactivate();

Description

Deactivates an external display to skip rendering. For example, a secondary monitor connected to the system.

Displays have the following indices in the Display.displays array:

  • The primary display is 0.
  • Secondary displays are 1 to 7.

Deativating the primary display has no effect.

This method works only on HMIAndroid platforms.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Check the number of monitors connected. if (Display.displays.Length > 1) { // Deactivate the display 1 (second monitor connected to the system). Display.displays[1].Deactivate(); } } }