Pluginクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

Pluginは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):The main object responsible for creating custom Studio widgets, toolbars, buttons, and other plugin UI elements.

クラスの関係

受け継いでいるクラス:Object → Instance → Plugin

プロパティ(2)

名前と書き方説明
CollisionEnabled
Plugin.CollisionEnabled: boolean
Returns whether the user has enabled **Collisions** in Studio's toolbar.
GridSize
Plugin.GridSize: float
Returns the grid snapping size the user has set in Studio.

メソッド(26)

名前と書き方説明
Activate
Plugin:Activate(exclusiveMouse: boolean): ()
Sets the state of the calling plugin to activated.
CreateDockWidgetPluginGuiAsync
Plugin:CreateDockWidgetPluginGuiAsync(pluginGuiId: string, dockWidgetPluginGuiInfo: DockWidgetPluginGuiInfo): DockWidgetPluginGui
Creates a DockWidgetPluginGui given a DockWidgetPluginGuiInfo.
CreatePluginAction
Plugin:CreatePluginAction(actionId: string, text: string, statusTip: string, iconName: string, allowBinding: boolean): PluginAction
Creates a PluginAction which represents a generic performable action in Studio with no directly‑associated PluginToolbarButton.
CreatePluginMenu
Plugin:CreatePluginMenu(id: string, title: string, icon: string): PluginMenu
Creates a new plugin menu.
CreateToolbar
Plugin:CreateToolbar(name: string): PluginToolbar
Creates a new PluginToolbar with the given name.
Deactivate
Plugin:Deactivate(): ()
Deactivates the plugin.
GetJoinMode
Plugin:GetJoinMode(): JointCreationMode
Returns the JointCreationMode the user has set in Studio's toolbar.
GetMouse
Plugin:GetMouse(): PluginMouse
Returns a Mouse that can be used while the plugin is active.
GetSelectedRibbonTool
Plugin:GetSelectedRibbonTool(): RibbonTool
Returns the currently selected RibbonTool.
GetSetting
Plugin:GetSetting(key: string): Variant
Retrieves a previously stored value with the given key, or nil if the given key doesn't exist.
ImportFbxAnimationAsync
Plugin:ImportFbxAnimationAsync(rigModel: Instance, isR15: boolean): Instance
Prompts the user to open a .fbx animation file that can be loaded onto the rigModel, then proceeds to insert the animation as a KeyframeSequence in the Workspace.
ImportFbxRigAsync
Plugin:ImportFbxRigAsync(isR15: boolean): Instance
Prompts the user to open a .fbx file, uploads the individual components of the model as meshes, and generates a character rig for use in animation, which is loaded into the Workspace.
Intersect
Plugin:Intersect(objects: Instances): Instance
Intersects the given parts and returns the resulting IntersectOperation.
IsActivated
Plugin:IsActivated(): boolean
Returns true if this plugin is currently active, after having been activated via the Class.Plugin:Activate()|Activate() function.
IsActivatedWithExclusiveMouse
Plugin:IsActivatedWithExclusiveMouse(): boolean
Returns true if this plugin is currently active with an exclusive mouse.
Negate
Plugin:Negate(objects: Instances): Instances
Negates the given parts and returns the resulting Class.NegateOperation|NegateOperations.
OpenWikiPage
Plugin:OpenWikiPage(url: string): ()
Opens the context help window to the wiki page that url links to.
PromptForExistingAssetId
Plugin:PromptForExistingAssetId(assetType: string): int64
Opens a window in Roblox Studio that prompts the user to select an existing AssetType.Animation asset. The assetType parameter must be Animation; other values are not supported and cause an error.
PromptForExistingAssetIdAsync
Plugin:PromptForExistingAssetIdAsync(assetType: string): int64
Opens a window in Roblox Studio that prompts the user to select an existing AssetType.Animation asset. The assetType parameter must be Animation; other values are not supported and cause an error.
PromptSaveSelectionAsync
Plugin:PromptSaveSelectionAsync(suggestedFileName: string): boolean
Prompts the user to save their current selection with the specified file name.
SaveSelectedToRoblox
Plugin:SaveSelectedToRoblox(): ()
Opens an upload window for the user's current selection.
SelectRibbonTool
Plugin:SelectRibbonTool(tool: RibbonTool, position: UDim2): ()
Activates the specified Roblox Studio tool.
Separate
Plugin:Separate(objects: Instances): Instances
Separates the given Class.UnionOperation|UnionOperations and returns the resulting parts.
SetSetting
Plugin:SetSetting(key: string, value: Variant): ()
Stores a given value for later use under the given key. The value will persist even after Studio is closed.
StartDrag
Plugin:StartDrag(dragData: Dictionary): ()
Starts a drag action given a dictionary of parameters.
Union
Plugin:Union(objects: Instances): Instance
Unions the given parts and returns the resulting UnionOperation.

イベント(2)

名前と書き方説明
Deactivation
Plugin.Deactivation()
Fired when the plugin is deactivated.
Unloading
Plugin.Unloading()
Fires immediately before the Plugin stops running.

受け継いでいるメンバー

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(Plugin)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む