Unreal Engine 4.x Scripting with C++ Cookbook
上QQ阅读APP看书,第一时间看更新

How to do it...

  1. To blueprint your UserProfile class, first ensure that UCLASS has the Blueprintable tag in the UCLASS macro. This should look as follows:
UCLASS( Blueprintable ) 
class CHAPTER2_API UUserProfile : public UObject 
  1. Compile your code.
  1. Find the UserProfile C++ class in the Class Viewer (Window | Developer Tools | Class Viewer). Since the previously created UCLASS does not derive from Actor, to find your custom UCLASS, you must turn off Filters | Actors Only in the Class Viewer (which is checked by default):

 If you don't do this, then your custom C++ class may not show!

Keep in mind that you can use the small search box inside the  Class Viewer  to easily find the  UserProfile  class by starting to type it in:


  1. Find your UserProfile class in the Class Viewer, right-click on it, and create a blueprint from it by selecting Create Blueprint....
  2. Name your blueprint. Some prefer to prefix the blueprint class name with BP_.
    You may choose to follow this convention; just be sure to be consistent.
  3. You will be able to edit any fields that are created for each UserProfile blueprint instance you create.
If the blueprint editor does not open automatically, you can open it by double-clicking on the file in the Content Browser.