In this post I'm going to show you how you can profile your code blocks…
Creating a C++ Level Blueprint
In this post we’re going to create a level blueprint which is based on a C++ class.
(For this post, I’m using Unreal Engine 4.12.5)
Creating a C++ Level Blueprint
Fortunately, Epic has provided a straightforward way to create a Level Blueprint (which is based on a C++ class):
- Add a new C++ class which inherits the LevelScriptActor class
- Open up your level blueprint and reparent it to your C++ class
In my case, I’ve created a C++ class named CustomLevelScriptActor (which inherits the LevelScriptActor class). In order to find this class, click on the “Show All Classes” option in the C++ wizard menu.
Then, inside the header file type in a dummy function like the following one:
1 2 3 4 5 6 |
protected: UFUNCTION(BlueprintCallable, Category = LevelBlueprint) void DoSomething() { GLog->Log("Does something"); } |
Save and compile your code.
Switch to UE4 Editor and open up your Level Blueprint. Then, click on Class Settings and reparent your Blueprint to your CustomLevelScriptActor class:
This Post Has 0 Comments