# MobileDMAController.cs

## Fields & Properties

### HologramCamera Camera

The `HologramCamera` instance used when a second display is connected. The camera is deactivated until a second display is detected.

### int Width2D

Width of the 2D screen resolution on the mobile device. Default value is 600 pixels — if set to 0, it will use the device's native resolution width.

### int Height2D

Height of the 2D screen resolution on the mobile device. Default value is 1000 pixels — if set to 0, it will use the device's native resolution height.

### string LoadedVisualJsonPath

Path to the calibration JSON file. Setting this property triggers a display refresh.

### static string VisualJsonFilePath

Static property that provides the path to the persistent calibration JSON file.

### UnityAction onCalibrationLoaded

Invoked when a calibration file is successfully loaded.

## Methods

### private void Set2DScreenResolution(int width, int height)

Sets the screen resolution for the 2D display (on the iPhone or mobile device).

* `int width`: Desired screen width.
* `int height`: Desired screen height.

### public void RefreshDisplays()

Refreshes display connections and activates the `HologramCamera` for the second display if detected.

### private Task CheckToSetRotatedScreen()

Checks if the display should be rotated based on the calibration and applies the appropriate shader.

Returns Task `true` if the shader was applied successfully, otherwise `false`.

### private void RefreshDisplaysMobile()

Copies the calibration file to local storage if necessary, reads it, and applies the calibration settings to the `HologramCamera`.
