Meer informatie
Engine-klasse
StudioDeviceSimulatorService
Niet maakbaar
Service
Niet gerepliceerd

*Deze inhoud is vertaald met behulp van AI (bèta) en kan fouten bevatten. Klik hier om deze pagina in het Engels te bekijken.



API-referentie
Methoden
CreateDeviceAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:CreateDeviceAsync(config:Dictionary):string
Parameters
config:Dictionary
Teruggaves
Codevoorbeelden
Voorbeeld van een apparaat maken
local id = Simulator:CreateDeviceAsync({
Name = "Mijn Aangepaste Tablet",
Width = 2560,
Height = 1600,
PixelDensity = 300,
DeviceForm = Enum.DeviceForm.Tablet,
})

GetDeviceAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetDeviceAsync():string
Teruggaves

GetDeviceInfoAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetDeviceInfoAsync(deviceId:string):Dictionary
Parameters
deviceId:string
Teruggaves

GetDeviceListAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetDeviceListAsync():{any}
Teruggaves
Codevoorbeelden
Voorbeeld van apparaatlijst ophalen
local Simulator = game:GetService("StudioDeviceSimulatorService")
local devices = Simulator:GetDeviceListAsync()
for _, deviceId in devices do
print(deviceId)
end

GetOrientationAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetOrientationAsync():Enum.ScreenOrientation

GetPixelDensityAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetPixelDensityAsync():number
Teruggaves

GetResolutionAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetResolutionAsync():Vector2
Teruggaves

GetScalingModeAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:GetScalingModeAsync():Enum.DeviceSimulatorScalingMode

RemoveDeviceAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:RemoveDeviceAsync(deviceId:string):()
Parameters
deviceId:string
Teruggaves
()

SetDeviceAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:SetDeviceAsync(deviceId:string):()
Parameters
deviceId:string
Teruggaves
()

SetOrientationAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:SetOrientationAsync(orientation:Enum.ScreenOrientation):()
Parameters
Teruggaves
()

SetPixelDensityAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:SetPixelDensityAsync(density:number):()
Parameters
density:number
Teruggaves
()

SetResolutionAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:SetResolutionAsync(
width:number, height:number
):()
Parameters
width:number
height:number
Teruggaves
()

SetScalingModeAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:SetScalingModeAsync(mode:Enum.DeviceSimulatorScalingMode):()
Teruggaves
()

StopSimulationAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:StopSimulationAsync():()
Teruggaves
()

UpdateDeviceAsync
Opbrengst
Plugin-beveiliging
StudioDeviceSimulatorService:UpdateDeviceAsync(
deviceId:string, config:Dictionary
):()
Parameters
deviceId:string
config:Dictionary
Teruggaves
()
Codevoorbeelden
Voorbeeld van Update Device
Simulator:UpdateDeviceAsync(id, {
Name = "Mijn Aangepaste Tablet",
Width = 2732,
Height = 2048,
PixelDensity = 264,
DeviceForm = Enum.DeviceForm.Tablet,
})

Evenementen
ConfigurationChanged
Plugin-beveiliging
StudioDeviceSimulatorService.ConfigurationChanged():RBXScriptSignal
Codevoorbeelden
Voorbeeld van gewijzigde configuratie
Simulator.ConfigurationChanged:Connect(function()
local deviceId = Simulator:GetDeviceAsync()
if deviceId ~= "default" then
local res = Simulator:GetResolutionAsync()
print(string.format("Actief: %s @ %dx%d", deviceId, res.X, res.Y))
end
end)

©2026 Roblox Corporation. Roblox, het Roblox-logo en Powering Imagination behoren tot onze geregistreerde en niet-geregistreerde handelsmerken in de VS en andere landen.