Check if actor placed from the editor

I have tried this way and it didn’t work well for me. I’m trying to set actor before spawning it from the code.