PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

AddNewAction

Parameters

Name Type Default Description

Must be a unique string that identifies this PluginAction from others

The text to be displayed

The icon to be displayed

Returns

Return Type Summary

The created PluginAction


Code Samples


Creating a PluginMenu and PluginMenuAction

This code sample visualizes how PluginMenu|PluginMenus and PluginAction|PluginActions behave when created for a Plugin. Outside of this example, you should not parent the plugin or its functional components to the game’s workspace.

In order to work as expected, the code block must but pasted into the command bar, but only once. Consecutive attempts at executing the code in the command bar will result in an error because a plugin cannot create more than one PluginMenu with the same id.

After executing the code, changing the created BoolValue in the game’s workspace via the Explorer window opens the plugin’s menus. Selecting an action from the menus the function connected to the trigger signal.

Example Plugin in Studio Explorer Window