반응형

 

다음 처럼 fn 함수를 만들고 Call in Eidtor(에디터에서 호출) 을 체크해놓으면

 

 

 

아래 그림처럼 Default 부분에 fn 버튼이 만들어지고 클릭하면 해당 함수가 바로 실행되는 것을 볼수가 있다

 

 

 

 

===========================================================

 

 

 

 

 

You can call Blueprint events and functions on demand in the Unreal Editor. This can be especially useful any time you need to run the same Blueprint graph both at runtime and in the editor. For example, you can test or preview your runtime gameplay within the editor UI. However, it can also be a simple way to trigger Blueprints within the editor that require an Actor or a location in 3D space as a context.

Supported Blueprint Classes

Not all Blueprint classes allow their Custom Events and Functions to run in the Unreal Editor.

  • The steps described below work for any Blueprint class that you can place in a Level—that is, any class that derives directly or indirectly from Actor.

  • If you need access to editor-only features like working with Assets in the Content Browser, you can derive your Blueprint class from a placeable editor-only base class, such as EditorUtilityActor. However, keep in mind that you won't be able to trigger your Blueprint at runtime when you use an editor-only base class, because editor-only classes are not included in packaged Unreal Engine applications.

Editor Utility Blueprint classes that derive from the Actor base class don't expose buttons in the Details panel for any Functions or Custom Events that are marked as callable in the editor. If you absolutely need to use a button in the Details panel to drive your Blueprint logic, create your graphs in a normal Blueprint class and not in an Editor Utility Blueprint class. However, for a much more flexible and powerful approach to creating a custom UI to drive Blueprint logic in the Unreal Editor, consider using an Editor Utility Widget instead.

Steps

  1. Any time you use a Custom Event node in the Event Graph of your Blueprint class, you can set the Graph > Call in Editor option in the Details panel:

    Similarly, when you create a new function on your Blueprint class, you can select the node for your new function and set the same option in the Details panel:

  2. Add an instance of your Blueprint class into your Level if you haven't already.

  3. Select the Blueprint Actor in the Level Viewport or in the World Outliner. The Details panel shows a button for each of the Call in Editor events and functions you've set up. You'll typically find them in the Default section, where Blueprint classes also expose variables that are marked as Instance Editable.

    If your Custom Event or function has any inputs, it will not be shown in the Details panel.

  4. Click these buttons to trigger execution of the Event Graphs starting from your Custom Event nodes, or to trigger your custom functions.

https://docs.unrealengine.com/ko/Engine/Editor/ScriptingAndAutomation/Blueprints/CallInEditor/index.html

반응형

+ Recent posts