Programming

1.what is diffrent between
void AMyActor::CalledFromCpp_Implementation() and
void AMyActor::CalledFromCpp().
i can’t understand purpose of _implementation()

  1. if(world)
    why do i have to test of validity of world?
    i need to know what is world is and role in unreal.

thanks a lot!

For using _Implementation() you need to make your function a “BlueprintNativeEvent”. You can do it like this:

UFUNCTION(BlueprintNativeEvent)
void CalledFromCpp();

That means, by calling your function in code you fire an event. You then can use a blueprint node to do further things when the event is fired. If you don’t use the blueprint node the function is just called like any other function, so the code that’s in the function is the default code that can be overwritten by your blueprints.

if i don’t use blueprint, then don’t have to use _implementation right?

No, you don’t have to. But then making it a BlueprintNativeEvent wouldn’t make much sense either, I guess.