Overriding


#1

Has method overriding been implemented yet? I can’t get on_begin_play or receive_begin_play to be called on startup.


#2

Yes/no. The begin play calls are not wired up, you’ll need to create a manual call from blueprint’s BeginPlay and call a method in your :sk:. Note to self: this should just work.

As far as overrides go, yes, method overriding works as expected. In this case, the reason why it doesn’t just work for receive_begin_play is more complicated, I think because it is a BlueprintImplementableEvent and doesn’t go through the normal C++ Class/Super class call routing.


#3

Is it possible that BP functions cannot be overridden? Every time I try, I get the following error message:

The following file cannot be edited because the overlay ‘Project-Generated-BP’ is specified as a read-only overlay:


#4

Can you give an example of what you’re trying to do?


#5

In the first picture you see a function in a Blueprint:

BP_Selected

The next picture is of the :sk: editor with the error message:

Sk_Select

As soon as I try to add brackets, I get the error.


#6

Got it. Those entries are indeed read only. What you should do is create a blueprint callable :sk: function and call that from your blueprint node. Subclasses can override :sk: and C++ methods but not BP defined methods. So the general strategy is to call into :sk: from BP and then override the :sk: method in subclasses as needed.


#7

So, if I understand correctly, the BP function is just a facade for the :sk: one.


#8

Yep, that’s correct.