Rama's LevelScriptActor tutorial - OnRemoveFromWorld() "override"?

Hi All

Anyone who has done Rama’s levelscriptactor tutorial- do you know why it says “OnRemoveFromWorld override”? LevelScriptActor has no such member to override. But it says to use instead of begin destroy, when RemoveFromWorld is being called on the level. I’m confused! Anyway, the code, as it is in the tutorial, doesn’t compile…

Thanks!

#Solution

Sorry that was for 4.2-ish, they changed it in 4.3, forgot to update the wiki :slight_smile:

//ON REMOVE FROM WORLD - USE INSTEAD OF BEGIN DESTROY
/** Called when this actor is in a level which is being removed from the world (e.g. my level is getting UWorld::RemoveFromWorld called on it) */
/*
virtual void OnRemoveFromWorld() override;
*/
//THIS GOT REPLACED BY

virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

#Wiki Updated

#:)

Rama

Great, thanks Rama!