How to Designate Level Actor as BP Node Target in Function Library?
I have extended the Level Actor class to add custom C++ code and nodes to the Level BP. Now, I want to move some of the Level BP functions to a Function Library.
The custom function nodes require a target. In the Level BP the target was 'Self'. Now, in the Function Library, I need to give the pin something other than 'Self'. Ideally, a reference to the extended Level Actor.
It seems that I could use an event and delegate for this, but in the interest of efficiency, I would prefer just to make a function call.
How can I do this?
asked May 14 '19 at 06:27 PM in Blueprint Scripting
You need to pass some form of "Context" object on which that function will run or from which you can get access to your extended LevelBP class, or pass it directly as an argument of your function. It might be wise to cast it to your LevelBP class before using it and trying to call function on. Your "Self" was actually pointer to itself, in C++ it would translate roughly to "this" keyword.
answered May 15 '19 at 08:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here