Studio 物件是一個僅限於 Roblox Studio 的設定物件。 它 可以在 Roblox Studio 的設定中於 Studio 標籤下找到。
概要
屬性
如果設為 true,Roblox Studio 會嘗試將在 Play Solo 會話中進行的腳本更改傳輸到打開的地方。
如果設為 true,當滑鼠懸停在可選擇的物件上時,在 Workspace 中顯示的懸停選擇框將根據 Hover Animate Speed 在 Hover Over Color 和 Select Color 之間閃爍。
指定 Roblox Studio 腳本編輯器的背景顏色。
設置 Roblox Studio 中 Advanced Objects 標籤的滾動模式。
設置腳本編輯器中內置函數和關鍵字的顏色。
設置使用滑鼠滾輪時相機前進或後退的步驟數。
設置在持住 Shift 鍵和移動鍵時,相機移動的速度(步數/秒)。
設置在按下移動鍵時,相機移動的速度(步數/秒)。
如果設為 true,當切換遊戲會話時,輸出將自動清除。
指定 Roblox Studio 腳本編輯器中註解的顏色。
如果設為 true,過時的物件將顯示在進階物件窗口以及物件瀏覽器中。
當設為 true 時,腳本編輯器和命令列將在編寫時顯示自動完成功能菜單。
指定當在腳本編輯器中檢測到錯誤代碼時顯示的波浪下劃線的顏色。
設置腳本編輯器的查找選擇操作 (Ctrl+F) 中匹配項的高亮顏色。
指定腳本編輯器使用的字體。
指定當滑鼠懸停在 Workspace 中的一個可選物件時,懸停動畫閃爍的頻率。
指定懸停選擇框所使用的顏色。
設置內置 Luau 關鍵字的文字顏色。
設置 Model.PrimaryPart 選擇裝飾的厚度。此值限制在 0 和 0.05 之間。
指定 Lua 調試器功能是否啟用。
設置在腳本編輯器中雙擊的變數的高亮顏色。
輸出的最大行數。
指定 Roblox Studio 腳本編輯器中數字的顏色。
如果設為 true,播放的音頻僅在遊戲窗口獲得焦點時才能聽到。
設置腳本編輯器中運算符字符的文字顏色。
指定輸出使用的字體。
設置輸出的佈局模式。
設置 API 在物件瀏覽器中顯示所需的最高權限級別。詳情請見 Enum.PermissionLevelShown。
本地插件存儲的目錄。
當設為 true 時,Roblox Studio 快捷方式將優先於在遊戲窗口中捕獲的輸入。
腳本可以等待重新啟動的時間(以秒為單位),在超時之前。
在 Workspace 中用於物件選擇的選擇框的顏色。
設置 Model.PrimaryPart 選擇框的顏色。
設置腳本編輯器中選擇文本的背景顏色。
設置腳本編輯器中選擇文本的文字顏色。
如果設為 true,則在遊戲運行時,CoreGui 將在資源管理器中可見。
如果設為 true,則基本診斷信息將顯示在右下角。
如果設為 true,則在 Workspace 中懸停在物件上時將顯示選擇框。
當設為 true 時,PathfindingService 使用的導航網格將可視化。
當設為 true 時,PluginGuiService 將在 Roblox Studio 的資源管理器中顯示。
指定腳本編輯器中字符串的顏色。
指定在腳本編輯器中用於表示制表符的空格數。
指定腳本編輯器中普通文本的顏色。
如果設為 true,則腳本編輯器中的文本將進行換行。
用於獲取/設置 Studio 使用的當前 theme。
指定當腳本分析器檢測到應在腳本編輯器中解決的問題時顯示的波浪下劃線的顏色。
屬性
"TODO" Color
"function" Color
"local" Color
"nil" Color
"self" Color
ActionOnAutoResumeSync
ActionOnStopSync
Active Color
Active Hover Over Color
Animate Hover Over
如果設為 true,當滑鼠懸停在可選擇的物件上時,在 Workspace 中顯示的懸停選擇框將根據 Hover Animate Speed 在 Hover Over Color 和 Select Color 之間閃爍。
Auto Clean Empty Line
Auto Closing Brackets
Auto Closing Quotes
Auto Delete Closing Brackets and Quotes
Auto Indent Rule
Auto-Recovery Enabled
Auto-Recovery Interval (Minutes)
AutoResumeSyncOnPlaceOpen
AutocompleteAcceptanceBehavior
Automatically trigger AI Code Completion
Bool Color
Bracket Color
Camera Pan Speed
Camera Speed Adjust Binding
Camera Zoom to Mouse Position
CameraAdaptiveSpeed
CameraOrbitSensitivity
CameraPanSensitivity
CameraShiftFactor
CameraSpeedLockDefault
CameraTweenFocus
CameraZoomSpeed
CommandBarLocalState
Current Line Highlight Color
Debugger Current Line Color
Debugger Error Line Color
DisplayLanguage
DraggerActiveColor
DraggerMajorGridIncrement
DraggerMaxSoftSnaps
DraggerPassiveColor
DraggerShowHoverRuler
DraggerShowMeasurement
DraggerShowTargetSnap
DraggerSoftSnapMarginFactor
DraggerSummonMarginFactor
DraggerTiltRotateDuration
Enable Autocomplete Doc View
Enable CoreScript Debugger
Enable Http Sandboxing
Enable Internal Beta Features
Enable Internal Features
Enable Script Analysis
Enable Scrollbar Markers
Enable Signature Help
Enable Signature Help Doc View
Enable Temporary Tabs
Enable Temporary Tabs In Explorer
Enable Type Hover
EnableCodeAssist
EnableIndentationRulers
EnableSelectionTooltips
Font
指定腳本編輯器使用的字體。
Format On Paste
Format On Type
Function Name Color
Highlight Current Line
Highlight Occurances
HintColor
Hover Box Thickness
Hover Line Thickness
IconOverrideDir
Indent Using Spaces
IndentationRulerColor
InformationColor
LargeFileLineCountThreshold
LargeFileThreshold
LoadAllBuiltinPluginsInRunModes
LoadUserPluginsInRunModes
LocalAssetsFolder
LuaDebuggerEnabledAtStartup
Luau Keyword Color
Main Volume
Menu Item Background Color
Method Color
Output Font
指定輸出使用的字體。
Physical Draggers Select Scope By Default
Pivot Snap To Geometry Color
PluginDebuggingEnabled
PluginsDir
本地插件存儲的目錄。
Primary Text Color
Property Color
ReloadBuiltinPluginsOnChange
ReloadLocalPluginsOnChange
Ruler Color
Rulers
RuntimeUndoBehavior
Script Editor Color Preset
Script Editor Scrollbar Background Color
Script Editor Scrollbar Handle Color
Scroll Past Last Line
Secondary Text Color
Selected Menu Item Background Color
Selected Text Color
Selection Box Thickness
Selection Line Thickness
Set Pivot of Imported Parts
Show FileSyncService
Show Hidden Objects in Explorer
Show Light Guides
Show Navigation Labels
Show Pathfinding Links
Show Singly Selected Attachment Parent Frame
Show Whitespace
Show plus button on hover in Explorer
ShowCorePackagesInExplorer
Skip Closing Brackets and Quotes
Theme
Theme 屬性用於獲取/設置 Studio 使用的當前 StudioTheme。
這是專門為 Plugins 內部使用,但也可以在命令行中執行。你可以通過以下方式訪問該函數:
settings().Studio.Theme
例如,如果你想打印當前的 Studio 主題:
print("The current Studio theme is:", settings().Studio.Theme)
Use Bounding Box Move Handles
Whitespace Color
方法
GetAvailableThemes
GetAvailableThemes() 函數返回可用於 Studio 的 StudioThemes 列表。你可以通過以下方式訪問該函數:
settings().Studio:GetAvailableThemes()
返回
Studio 中可用的主題列表。
範例程式碼
以下代碼檢索所有可用主題的陣列,然後遍歷它們。
-- 獲取可用的工作室主題
local themes = settings().Studio:GetAvailableThemes()
for _, theme in pairs(themes) do
print(theme) -- 輸出主題名稱
end