Download

How to check which Sub level does an Actor belong?

Hello, I am trying to figure out how could I safely despawn my AI when the current level its on has been unloaded. I was thinking of Line Tracing the floor and checking which Sub level does the floor belongs to and feed the data back to the AI. I tried “GetCurrentLevel()” but it only returned my Persistent Level

actor->GetLevel()

Oh wow, Should’ve seen that coming. Lmao. I will try that out.

I tried using Actor->GetLevel() apparently it still returns my Persistent Level. I already doubled check if my actors that were placed on the scene were in the sub-level not on the persistent.

Edit:
I was using GetLevel()->GetName() for checking. I tried using GetPathName() did the trick. Thank you! :slight_smile: