documili.blogg.se

Ue4 ai actions
Ue4 ai actions









ue4 ai actions
  1. #Ue4 ai actions how to
  2. #Ue4 ai actions install

Each time the user right-clicks on a set of Assets or Actors, this function is called to get the class type supported by the AssetActionUtility or ActorAssetUtility class. This function determines the class of objects that need to be selected in order for the Scripted Actions in your Blueprint class to appear in the context menu. The AssetActionUtility and ActorAssetUtility base classes both offer a built-in function named GetSupportedClass. In this case, you might want that action to only appear when the user right-clicks on Static Mesh Actors, but not when the user right-clicks on Light Actors or Blueprints. Restricting an Action to a Specific Classĭepending on the work you need your Scripted Actions to carry out, you may want them to appear in the context menu only for specific types of objects.įor example, say you create a Scripted Action that changes Materials on selected Actors. You can create as many different Scripted Actions as you need within a single Blueprint class, or you can create multiple Blueprint classes and distribute your Scripted Actions across those classes. Or when you right-click one or more Actors in the Level Viewport or World Outliner:Įach function and Custom Event that you set up on your AssetActionUtility or ActorActionUtility class becomes available as a separate option in the context menu.

ue4 ai actions

This sub-menu contains each of the functions or Custom Events that you set up in your Blueprint class.įor example, when you right-click one or more Assets in the Content Browser: Once your Blueprint class is saved and compiled, you should see a new Scripted Actions sub-menu in the context menu for either Assets or Actors, depending on the parent class you chose for your Blueprint class.

ue4 ai actions

#Ue4 ai actions install

You also will want to install the Editor Scripting Utilities Plugin, if you haven't already, to get access to additional function libraries for working with Assets and Level Actors. You'll find some useful Blueprint nodes for your Scripted Actions under the Development > Editor category, including the nodes shown in the examples above that return a list of the objects selected at the time your Scripted Action is run: Get Selected Assets, which returns an array of references to all the Assets selected in the Content Browser, and Get Selection Set, which returns an array of Actors that are currently selected in the Level. Give your new class a descriptive name in the Content Browser. If you want your Scripted Action to operate on Actors, choose ActorActionUtility as the parent class, then press Select. If you want your Scripted Action to operate on Assets, choose AssetActionUtility as the parent class, then press Select. In the Content Browser, right-click the folder where you want to create your new class, and choose Editor Utilities > Editor Utility Blueprint from the context menu.ĭecide whether you want your Scripted Action to operate on Assets that you select in the Content Browser, or on Actors that you select in the Level Viewport or World Outliner. In this procedure, we'll create a new Editor Utility Blueprint class from one of the parent classes that support Scripted Actions, and we'll set up a new event graph for that class that will show up as a Scripted Action.

#Ue4 ai actions how to

The instructions on this page show you how to create and launch these kinds of Editor Utility Blueprints, and how you can customize them to apply only to specific types of Assets or Actors. Typically, a Scripted Action gets the list of Assets or Actors that are selected at the time you run the action, then modifies those objects or otherwise takes them into consideration in its graph. This kind of workflow is especially useful any time you need your Blueprint logic to have contextual awareness about a certain set of Assets or Actors. Scripted Actions are Editor Utility Blueprints that you launch in the Unreal Editor by right-clicking Assets in the Content Browser, or by right-clicking Actors either in the Level Viewport (shown above) or in the World Outliner.











Ue4 ai actions