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"

Can an abstract class automatically add methods in blueprint

I'm trying to create an abstract AActor classe(called ADisturbance) that could then be use has the parent class in my blueprints (for exemple BP_FireDisturbance). In ADisturbance, I want to have an abstract "StartDisturbance()" method. That method would then automatically appear in BP_FireDisturbance. Is that actually doable?

Product Version: UE 4.20
more ▼

asked Mar 12 '19 at 04:36 PM in C++ Programming

avatar image

Kévin D.

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

1 answer: sort voted first

Absolutely, it's totally doable. (Perhaps depending a bit on what you mean exactly by "automatically appear in [blueprint]")

Are you familiar with Blueprint Native Events? If not, have a look at this UE4 wiki page for starters: Blueprints, Empower Your Entire Team With BlueprintNativeEvents

These allow you to define functions with default behavior in C++, which then allow you to override that behavior in derived Blueprints.

I know the 'event' part of the name can be confusing, but try not to let that deter you; they can be used just like regular ol' virtual functions.

If you want your default function behavior to do nothing, with all the functionality being implemented in the derived blueprints, that's easy to do: just don't add any behavior to the definition in your .cpp file.

If you still have questions after looking over that wiki page (and other resources, if needed), I'll do my best to help.

more ▼

answered Mar 12 '19 at 05:54 PM

avatar image

1.2k 4 5 8

(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