Dear Friends at Epic,
I extended LevelScriptActor,
and I have been happily using and setting custom values for my levels which are re-parented to use this new ScriptActor
I am doing this to facilitate the tracking of level streaming.
I have an issue though.
My extended level blueprint has variables with important data that I want to save
- when the level is about to be unstreamed
- before it is deleted, so that its member values are still filled with data
I’ve tried using different events in C++, and it is not working
In the code below, the name always shows up as none, and other member var data is also now invalid
how can I get the member var data after unstreaming begins, before the level is deleted and member var data lost?
//LevelScriptActor.h BeginDestroy()
void AVictoryLevelScriptActor::BeginDestroy()
{
Super::BeginDestroy();
//~~~~~~~~~~
UE_LOG(Victory,Error,TEXT("STREAMING LEVEL UNLOADED (name is expected to be none) %s"), *GetName());
}
The member variables are already null/filled with default data by the time I know the level is about to be unstreamed
In the level blueprint graph, the event destroy node never seems to be called.
#My Question
What is the way I can know within the level script actor itself, that it is about to be unstreamed, before it is unstreamed, and its member vars are still filled with correct data?
#Request
if this is not yet possible please make it possible, to facilitate management of levels streaming in and out and enabling me to follow the object oriented model of keeping level-specific data within the level bluepirnt class
Thanks!
RAma