Hi Kehel18, and thanks for your time, since BlueprintImplementableEvent cannot have a static function, and I want to trigger that event from a static function, I wanted to create an object of the class inside the static function and then call the non-static function using that object, for that I first writed:
static EdsError EDSCALLBACK handleObjectEvent(EdsObjectEvent event,
EdsBaseRef object,
EdsVoid* context) {
ACameraNikon Camera; //Triggers the error: UE4Editor.exe has triggered a breakpoint.
static ACameraNikon* Cam=GetInstance();
if (event == kEdsObjectEvent_DirItemCreated) {
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Orange, ("DirItemCreated"));
Camera.ShutterDown();
}
// Object must be released
if (object)
{
EdsRelease(object);
}
return EDS_ERR_OK;
}
But, since it triggers the error: “UE4Editor.exe has triggered a breakpoint”, I was not able to make it work. Then I was trying to get an instance of the class as static and then use that instance to invoke my non-static ShutterDown function, but it still don’t work. I found the code for that instance from this discussion:
So the main thing is that I want to generate an event that can be used as blueprint and can be triggered from a static function.