UserGameSettings

非推奨を表示

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

作成できません
ユーザー設定
複製されていません

ユーザーゲーム設定は、UserSettings シングルトン内で見つかった単一クラスです。ユーザーがカメラとキャラクターを制御したい方法に関するさまざまな永続設定を保持します。

このオブジェクトにアクセスするには、LocalScript を介して:


UserSettings():GetService("UserGameSettings")

このオブジェクトは、サーバーでは目的がないため、クライアント専用で使用することを目的としています。Roblox Studio でテストするときに自分の設定も反映されます。

コードサンプル

A basic example that shows how you can listen to changes in the user's settings. With this code pasted into a LocalScript running in the StarterPlayerScripts, you can change settings in Roblox's game menu, and see their values appear in the output as detected changes.

UserGameSettings Listener

local gameSettings = UserSettings().GameSettings
local function onGameSettingChanged(nameOfSetting)
-- Fetch the value of this setting through a pcall to make sure we can retrieve it.
-- Sometimes the event fires with properties that LocalScripts can't access.
local canGetSetting, setting = pcall(function()
return gameSettings[nameOfSetting]
end)
if canGetSetting then
print("Your " .. nameOfSetting .. " has changed to: " .. tostring(setting))
end
end
gameSettings.Changed:Connect(onGameSettingChanged)

概要

プロパティ

方法

イベント

  • ユーザーのフルスクリーンモードが変更された場合に発火します。

  • ユーザーのクライアントがスタジオモードとゲームモードの間で切り替わるときに発射されます。これは、セッションが開始するときに Roblox Studio で定期的に発射されます。

プロパティ

AllTutorialsDisabled

Robloxのスクリプトセキュリティ
並列読み取り
Robloxのスクリプトセキュリティ
並列読み取り

ChatVisible

Robloxのスクリプトセキュリティ
並列読み取り

ComputerCameraMovementMode

並列読み取り

ComputerMovementMode

並列読み取り

ControlMode

並列読み取り

Fullscreen

Robloxのスクリプトセキュリティ
並列読み取り

GamepadCameraSensitivity

並列読み取り

GraphicsOptimizationMode

Robloxのスクリプトセキュリティ
並列読み取り

GraphicsQualityLevel

Robloxのスクリプトセキュリティ
並列読み取り

HasEverUsedVR

Robloxのスクリプトセキュリティ
並列読み取り

MasterVolume

Robloxのスクリプトセキュリティ
並列読み取り

MasterVolumeStudio

Robloxのスクリプトセキュリティ
並列読み取り

MaxQualityEnabled

Robloxのスクリプトセキュリティ
並列読み取り

MouseSensitivity

並列読み取り

OnboardingsCompleted

Robloxのスクリプトセキュリティ
並列読み取り

PartyVoiceVolume

Robloxのスクリプトセキュリティ
並列読み取り

RCCProfilerRecordFrameRate

並列読み取り

RCCProfilerRecordTimeFrame

並列読み取り

RotationType

並列読み取り

SavedQualityLevel

並列読み取り

StartMaximized

複製されていません
スクリプト作成できません
Robloxのスクリプトセキュリティ
並列読み取り

StartScreenPosition

複製されていません
スクリプト作成できません
Robloxのスクリプトセキュリティ
並列読み取り

StartScreenSize

複製されていません
スクリプト作成できません
Robloxのスクリプトセキュリティ
並列読み取り

TouchCameraMovementMode

並列読み取り

TouchMovementMode

並列読み取り

UsedCoreGuiIsVisibleToggle

Robloxのスクリプトセキュリティ
並列読み取り

UsedCustomGuiIsVisibleToggle

Robloxのスクリプトセキュリティ
並列読み取り

UsedHideHudShortcut

Robloxのスクリプトセキュリティ
並列読み取り

VREnabled

Robloxのスクリプトセキュリティ
並列読み取り

VRRotationIntensity

Robloxのスクリプトセキュリティ
並列読み取り

VRSmoothRotationEnabled

Robloxのスクリプトセキュリティ
並列読み取り

VignetteEnabled

Robloxのスクリプトセキュリティ
並列読み取り

方法

GetCameraYInvertValue


戻り値

GetOnboardingCompleted

パラメータ

onboardingId: string
既定値: ""

戻り値

InFullScreen


戻り値

InStudioMode


戻り値

SetCameraYInvertVisible

()

戻り値

()

SetGamepadCameraSensitivityVisible

()

戻り値

()

SetOnboardingCompleted

()

パラメータ

onboardingId: string
既定値: ""

戻り値

()

イベント

FullscreenChanged

パラメータ

isFullscreen: boolean

コードサンプル

Full Screen Mode Detection

local gameSettings = UserSettings().GameSettings
local function checkFullScreenMode()
local inFullscreen = gameSettings:InFullScreen()
if inFullscreen then
print("Full Screen mode enabled!")
else
print("Full Screen mode disabled!")
end
end
checkFullScreenMode()
gameSettings.FullscreenChanged:Connect(checkFullScreenMode)

StudioModeChanged

パラメータ

isStudioMode: boolean