Due to duplication, my UObject
is copied and instantiated again as entering PIE.
In the UObject
constructor, I use (this)->IsPlayInEditor() but it keeps return false
Do you know inside the constructor of an actor or component, how could we determine whether it is being placed into the level or being instantiated due to duplication in PIE?
I actually tried ()->IsPlayInEditor()
but it just returns false
.
I also found out about GIsPlayInEditorWorld
and GEditor->PlayWorld && (!GEditor->bIsSimulatingInEditor)
. Are those checks are reliable?
Thanks!