Skip to content
Roblox API Reference

StudioDeviceSimulatorService

Service allowing you to control Studio's Device Simulator.
  • Not creatable
  • Not replicated
  • Service
Memory category
Instances
Own members
17
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods58

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byStudioDeviceSimulatorService16
  • StudioDeviceSimulatorService:CreateDeviceAsync(config: { [string]: any }): string
    Creates a custom device preset and returns its ID.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    config: { [string]: any }
    A dictionary describing the new device. Required fields: Name (string, 1-200 characters, cannot be "default"), Width (int, 1-7680 pixels), Height (int, 1-4320 pixels), PixelDensity (int, 72-10000 DPI). Optional fields: DeviceForm (DeviceForm, default Phone), ResolutionScale (float, default 1.0, max 10.0), PortraitKeyboardHeight (int, default 0), LandscapeKeyboardHeight (int, default 0).
    Returns
    TypeDescription
    string
    string
  • StudioDeviceSimulatorService:GetDeviceAsync(): string
    Returns the ID of the currently active device, or "default" if none is active.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    string
    string
  • StudioDeviceSimulatorService:GetDeviceInfoAsync(deviceId: string): { [string]: any }
    Returns the configuration dictionary for the specified device.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    deviceId: string
    The unique identifier of the device to query. Must be a valid ID from GetDeviceListAsync(); cannot be "default".
    Returns
    TypeDescription
    { [string]: any }
    A dictionary containing the device configuration and passed to CreateDeviceAsync and UpdateDeviceAsync.
  • StudioDeviceSimulatorService:GetDeviceListAsync(): { any }
    Returns an array of all available device IDs.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    { any }
    An array of device IDs.
  • StudioDeviceSimulatorService:GetOrientationAsync(): Enum.ScreenOrientation
    Returns the current simulated screen orientation.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    Enum.ScreenOrientation
    ScreenOrientation
  • StudioDeviceSimulatorService:GetPixelDensityAsync(): number
    Returns the current simulated pixel density in DPI.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    number
    number
  • StudioDeviceSimulatorService:GetResolutionAsync(): Vector2
    Returns the current simulated viewport resolution.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    Vector2
    Vector2
  • StudioDeviceSimulatorService:GetScalingModeAsync(): Enum.DeviceSimulatorScalingMode
    Returns how the simulated resolution currently maps to the Studio viewport.
    • Yields
    • Plugin security
    Returns
    TypeDescription
    Enum.DeviceSimulatorScalingMode
    The current DeviceSimulatorScalingMode.
  • StudioDeviceSimulatorService:RemoveDeviceAsync(deviceId: string)
    Removes a custom device from the catalog.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    deviceId: string
    The unique identifier of the custom device to remove.
  • StudioDeviceSimulatorService:SetDeviceAsync(deviceId: string)
    Activates the specified device or stops simulation if "default" is passed.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    deviceId: string
    The unique identifier of the device to activate, or "default" to stop simulation.
  • StudioDeviceSimulatorService:SetOrientationAsync(orientation: Enum.ScreenOrientation)
    Sets the simulated screen orientation.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    orientation: Enum.ScreenOrientation
    The target screen orientation. Accepted values are ScreenOrientation.Portrait, ScreenOrientation.LandscapeLeft, or ScreenOrientation.LandscapeRight.
  • StudioDeviceSimulatorService:SetPixelDensityAsync(density: number)
    Overrides the simulated pixel density in DPI for the current session.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    density: number
    The pixel density override in DPI. Must be between 72 and 10000.
  • StudioDeviceSimulatorService:SetResolutionAsync(width: number, height: number)
    Overrides the simulated viewport resolution for the current session.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    width: number
    The viewport width in pixels (horizontal axis in landscape orientation). Range: 1 to 7680.
    height: number
    The viewport height in pixels (vertical axis in landscape orientation). Range: 1 to 4320.
  • StudioDeviceSimulatorService:SetScalingModeAsync(mode: Enum.DeviceSimulatorScalingMode)
    Sets how the simulated resolution maps to the Studio viewport.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    mode: Enum.DeviceSimulatorScalingMode
    The scaling mode to apply. One of DeviceSimulatorScalingMode.ScaleToPhysicalSize, DeviceSimulatorScalingMode.ActualResolution, or DeviceSimulatorScalingMode.FitToWindow.
  • StudioDeviceSimulatorService:StopSimulationAsync()
    Stops the active device simulation.
    • Yields
    • Plugin security
  • StudioDeviceSimulatorService:UpdateDeviceAsync(deviceId: string,config: { [string]: any },)
    Updates the configuration of an existing custom device.
    • Yields
    • Plugin security
    Parameters
    ParameterDescription
    deviceId: string
    The unique identifier of the custom device to update.
    config: { [string]: any }
    A dictionary of device fields to apply. Uses patch semantics: omitted optional fields retain their current values. Same schema as CreateDeviceAsync().

Events11

Inherited fromObject1
Inherited fromInstance9
Defined byStudioDeviceSimulatorService1
  • StudioDeviceSimulatorService.ConfigurationChanged: RBXScriptSignal<()>
    Fires when the active simulation state changes.
    • Plugin security