Download

PIE/Editor: How to change a variable value without resetting the Actor

Even in a very basic test with a simple Actor with a Static Mesh with physics enabled, if I add a variable and change its value during PIE, the Actor seems to be reset to its initial state (with physics, for example, it goes back to the original position).

Is there a way to edit Actor’s variables values during PIE without resetting the Actor’s state?
I don’t understand what exactly happens when I change a variable with the editor during PIE.

Might be a very noob question but thanks for your help in advance!

You can change all sorts of things during run time, and everything will be set back to default once you stop.

Technically, it is possible to ( for example ) move a cube during gameplay, and when you exit the cube stays in it’s new position. But to do this you would have to update the level map file, and it would involve a lot of fiddling about in C++.

It’s easier to go with the way the engine works, which is that the level stays the same as it was before play because, the level actor has in fact not changed since then.