User Game Settings
概要
プロパティ
方法
GetOnboardingCompleted(onboardingId: string):boolean |
SetOnboardingCompleted(onboardingId: string):() |
イベント
FullscreenChanged(isFullscreen: boolean):RBXScriptSignal |
StudioModeChanged(isStudioMode: boolean):RBXScriptSignal |
コードサンプル
ユーザーゲーム設定リスナー
local gameSettings = UserSettings().GameSettings
local function onGameSettingChanged(nameOfSetting)
-- この設定の値を取得するためにpcallを使用して、確実に取得できるようにします。
-- 時々、イベントはLocalScriptsがアクセスできないプロパティで発火します。
local canGetSetting, setting = pcall(function()
return gameSettings[nameOfSetting]
end)
if canGetSetting then
print("あなたの " .. nameOfSetting .. " が変更されました: " .. tostring(setting))
end
end
gameSettings.Changed:Connect(onGameSettingChanged)APIリファレンス
プロパティ
Computer Camera Movement Mode
Control Mode
方法
Get Onboarding Completed
Set Camera Y Invert Visible
User Game Settings: Set Camera Y Invert Visible():()
戻り値
()
Set Gamepad Camera Sensitivity Visible
User Game Settings: Set Gamepad Camera Sensitivity Visible():()
戻り値
()
イベント
Fullscreen Changed
パラメータ
コードサンプル
フルスクリーンモードの検出
local gameSettings = UserSettings().GameSettings
local function checkFullScreenMode()
local inFullscreen = gameSettings:InFullScreen()
if inFullscreen then
print("フルスクリーンモードが有効です!")
else
print("フルスクリーンモードが無効です!")
end
end
checkFullScreenMode()
gameSettings.FullscreenChanged:Connect(checkFullScreenMode)Studio Mode Changed
パラメータ