# StudioDeviceSimulatorService(ロブロックス クラス) > Service allowing you to control Studio's Device Simulator. - URL:https://roblox.minecraft-okinawa.com/reference/classes/StudioDeviceSimulatorService/ - 公式:https://create.roblox.com/docs/reference/engine/classes/StudioDeviceSimulatorService - 受け継いでいるクラス:Instance ## メソッド - `StudioDeviceSimulatorService:CreateDeviceAsync(config: Dictionary): string`:Creates a custom device preset and returns its ID. - `StudioDeviceSimulatorService:GetDeviceAsync(): string`:Returns the ID of the currently active device, or "default" if none is active. - `StudioDeviceSimulatorService:GetDeviceInfoAsync(deviceId: string): Dictionary`:Returns the configuration dictionary for the specified device. - `StudioDeviceSimulatorService:GetDeviceListAsync(): Array`:Returns an array of all available device IDs. - `StudioDeviceSimulatorService:GetOrientationAsync(): ScreenOrientation`:Returns the current simulated screen orientation. - `StudioDeviceSimulatorService:GetPixelDensityAsync(): float`:Returns the current simulated pixel density in DPI. - `StudioDeviceSimulatorService:GetResolutionAsync(): Vector2`:Returns the current simulated viewport resolution. - `StudioDeviceSimulatorService:GetScalingModeAsync(): DeviceSimulatorScalingMode`:Returns how the simulated resolution currently maps to the Studio viewport. - `StudioDeviceSimulatorService:RemoveDeviceAsync(deviceId: string): ()`:Removes a custom device from the catalog. - `StudioDeviceSimulatorService:SetDeviceAsync(deviceId: string): ()`:Activates the specified device or stops simulation if "default" is passed. - `StudioDeviceSimulatorService:SetOrientationAsync(orientation: ScreenOrientation): ()`:Sets the simulated screen orientation. - `StudioDeviceSimulatorService:SetPixelDensityAsync(density: float): ()`:Overrides the simulated pixel density in DPI for the current session. - `StudioDeviceSimulatorService:SetResolutionAsync(width: int, height: int): ()`:Overrides the simulated viewport resolution for the current session. - `StudioDeviceSimulatorService:SetScalingModeAsync(mode: DeviceSimulatorScalingMode): ()`:Sets how the simulated resolution maps to the Studio viewport. - `StudioDeviceSimulatorService:StopSimulationAsync(): ()`:Stops the active device simulation. - `StudioDeviceSimulatorService:UpdateDeviceAsync(deviceId: string, config: Dictionary): ()`:Updates the configuration of an existing custom device. ## イベント - `StudioDeviceSimulatorService.ConfigurationChanged()`:Fires when the active simulation state changes. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)