x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Cannot create Blueprint class based on C++ UActorComponent

I have a custom UActorComponent written in C++ and wanted to extend that in the BP editor, but when I tried to create a Blueprint class based on my C++ class I couldn't find it in the class list. And, going through the C++ object in the editor I noticed that "Create Blueprint class" is disabled: alt text

I've compared the code to other classes which I can create Blueprint classes for, and not much is different other than the class their parent class. Is there something I could be doing wrong? Here is the header file for this class:

 UCLASS()
 class RH_API URHTriggerComponent : public USceneComponent
 {
     GENERATED_BODY()
 
 public:    
     class USphereComponent* Collider;
 
     // Sets default values for this component's properties
     URHTriggerComponent();
 
     // Called when the game starts
     virtual void BeginPlay() override;
     
     // Called every frame
     virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;
 
     virtual void Use(APawn* User);
 
     UFUNCTION(BlueprintImplementableEvent)
     virtual void OnUse(APawn* User);
 };
 

Thanks!

Product Version: UE 4.8
Tags:
more ▼

asked Aug 13 '15 at 01:30 PM in Blueprint Scripting

avatar image

tosslogic
88 8 10 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Declare with UCLASS(Blueprintable) instead of UCLASS()

more ▼

answered Aug 14 '15 at 02:38 AM

avatar image

kurtrussellfanclub
431 19 14 36

avatar image tosslogic Aug 14 '15 at 01:45 PM

Oh, interesting. So is the reason I don't have to do this with some classes because the parent (in most of these cases AActor) is already defined to be Blueprintable?

avatar image kurtrussellfanclub Aug 15 '15 at 12:10 PM

Yep, that's why! Blueprintable is an inherited property

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question