StudioDeviceSimulatorService¶
Service allowing you to control Studio's Device Simulator.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
Description¶
Provides programmatic control over Studio's Device Simulator. Use this service to switch between device presets, override resolution and pixel density, control orientation and scaling, and manage custom device profiles from a plugin or from an external tool connected through the MCP server.
All methods are asynchronous and yield the calling coroutine. The service is available in Edit mode and Play Client. Methods that modify the active simulation state are blocked in PlayServer mode.
Limitations¶
- All methods are asynchronous and yield the calling coroutine.
- Methods that modify the active simulation state (
SetDeviceAsync,StopSimulationAsync,SetOrientationAsync,SetResolutionAsync,SetPixelDensityAsync,SetScalingModeAsync) error in PlayServer mode. They work in Edit mode and Play Client. UpdateDeviceAsyncandRemoveDeviceAsyncerror when called on built-in presets.- Resolution, DPI, and scaling mode methods require an active device and error
when
GetDeviceAsync()returns "default". - Resolution and DPI overrides are session-level. They are not persisted and
are cleared on
SetDeviceAsync. - Built-in presets are immutable.
Inheritance¶
Object โ Instance โ StudioDeviceSimulatorService
Methods¶
| Member | Signature | Summary |
|---|---|---|
CreateDeviceAsync |
StudioDeviceSimulatorService:CreateDeviceAsync(config: Dictionary): string |
Creates a custom device preset and returns its ID. |
GetDeviceAsync |
StudioDeviceSimulatorService:GetDeviceAsync(): string |
Returns the ID of the currently active device, or "default" if none is active. |
GetDeviceInfoAsync |
StudioDeviceSimulatorService:GetDeviceInfoAsync(deviceId: string): Dictionary |
Returns the configuration dictionary for the specified device. |
GetDeviceListAsync |
StudioDeviceSimulatorService:GetDeviceListAsync(): Array |
Returns an array of all available device IDs. |
GetOrientationAsync |
StudioDeviceSimulatorService:GetOrientationAsync(): ScreenOrientation |
Returns the current simulated screen orientation. |
GetPixelDensityAsync |
StudioDeviceSimulatorService:GetPixelDensityAsync(): float |
Returns the current simulated pixel density in DPI. |
GetResolutionAsync |
StudioDeviceSimulatorService:GetResolutionAsync(): Vector2 |
Returns the current simulated viewport resolution. |
GetScalingModeAsync |
StudioDeviceSimulatorService:GetScalingModeAsync(): DeviceSimulatorScalingMode |
Returns how the simulated resolution currently maps to the Studio viewport. |
RemoveDeviceAsync |
StudioDeviceSimulatorService:RemoveDeviceAsync(deviceId: string): null |
Removes a custom device from the catalog. |
SetDeviceAsync |
StudioDeviceSimulatorService:SetDeviceAsync(deviceId: string): null |
Activates the specified device or stops simulation if "default" is passed. |
SetOrientationAsync |
StudioDeviceSimulatorService:SetOrientationAsync(orientation: ScreenOrientation): null |
Sets the simulated screen orientation. |
SetPixelDensityAsync |
StudioDeviceSimulatorService:SetPixelDensityAsync(density: float): null |
Overrides the simulated pixel density in DPI for the current session. |
SetResolutionAsync |
StudioDeviceSimulatorService:SetResolutionAsync(width: int, height: int): null |
Overrides the simulated viewport resolution for the current session. |
SetScalingModeAsync |
StudioDeviceSimulatorService:SetScalingModeAsync(mode: DeviceSimulatorScalingMode): null |
Sets how the simulated resolution maps to the Studio viewport. |
StopSimulationAsync |
StudioDeviceSimulatorService:StopSimulationAsync(): null |
Stops the active device simulation. |
UpdateDeviceAsync |
StudioDeviceSimulatorService:UpdateDeviceAsync(deviceId: string, config: Dictionary): null |
Updates the configuration of an existing custom device. |
Events¶
| Member | Signature | Summary |
|---|---|---|
ConfigurationChanged |
ConfigurationChanged() |
Fires when the active simulation state changes. |
Roblox reference: StudioDeviceSimulatorService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.