Another way that C++ can be more tightly integrated with Blueprint is through the creation of functions that can have Blueprint implementations in native code. This allows a programmer to specify an event and invoke it, without needing to know anything about the implementation. The class can then be subclassed in Blueprint, and another member of the production team can implement a handler for the event without ever having to go near a line of C++.
Creating events that can be implemented in Blueprints
How to do it...
- Create a new StaticMeshActor class called Spotter. Remember to use the Show All Classes button to select StaticMeshActor as the parent class.
- Make sure that the following functions are defined and overridden in...