学ぶ
エンジンクラス
StudioDeviceSimulatorService
作成できません
サービス
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。



APIリファレンス
方法
CreateDeviceAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:CreateDeviceAsync(config:Dictionary):string
パラメータ
config:Dictionary
戻り値
コードサンプル
デバイス作成の例
local id = Simulator:CreateDeviceAsync({
Name = "私のカスタムタブレット",
Width = 2560,
Height = 1600,
PixelDensity = 300,
DeviceForm = Enum.DeviceForm.Tablet,
})

GetDeviceAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetDeviceAsync():string
戻り値

GetDeviceInfoAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetDeviceInfoAsync(deviceId:string):Dictionary
パラメータ
deviceId:string
戻り値

GetDeviceListAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetDeviceListAsync():{any}
戻り値
コードサンプル
デバイスリストの例
local Simulator = game:GetService("StudioDeviceSimulatorService")
local devices = Simulator:GetDeviceListAsync()
for _, deviceId in devices do
print(deviceId)
end

GetOrientationAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetOrientationAsync():Enum.ScreenOrientation

GetPixelDensityAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetPixelDensityAsync():number
戻り値

GetResolutionAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetResolutionAsync():Vector2
戻り値

GetScalingModeAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:GetScalingModeAsync():Enum.DeviceSimulatorScalingMode

RemoveDeviceAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:RemoveDeviceAsync(deviceId:string):()
パラメータ
deviceId:string
戻り値
()

SetDeviceAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:SetDeviceAsync(deviceId:string):()
パラメータ
deviceId:string
戻り値
()

SetOrientationAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:SetOrientationAsync(orientation:Enum.ScreenOrientation):()
パラメータ
戻り値
()

SetPixelDensityAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:SetPixelDensityAsync(density:number):()
パラメータ
density:number
戻り値
()

SetResolutionAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:SetResolutionAsync(
width:number, height:number
):()
パラメータ
width:number
height:number
戻り値
()

SetScalingModeAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:SetScalingModeAsync(mode:Enum.DeviceSimulatorScalingMode):()
戻り値
()

StopSimulationAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:StopSimulationAsync():()
戻り値
()

UpdateDeviceAsync
イールド
プラグインのセキュリティ
StudioDeviceSimulatorService:UpdateDeviceAsync(
deviceId:string, config:Dictionary
):()
パラメータ
deviceId:string
config:Dictionary
戻り値
()
コードサンプル
デバイス更新の例
Simulator:UpdateDeviceAsync(id, {
Name = "私のカスタムタブレット",
Width = 2732,
Height = 2048,
PixelDensity = 264,
DeviceForm = Enum.DeviceForm.Tablet,
})

イベント
ConfigurationChanged
プラグインのセキュリティ
StudioDeviceSimulatorService.ConfigurationChanged():RBXScriptSignal
コードサンプル
設定変更の例
Simulator.ConfigurationChanged:Connect(function()
local deviceId = Simulator:GetDeviceAsync()
if deviceId ~= "default" then
local res = Simulator:GetResolutionAsync()
print(string.format("アクティブ: %s @ %dx%d", deviceId, res.X, res.Y))
end
end)

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。