Unity's prefab in Unreal Engine 4

hey there!
you mean you want to spawn every time that pawn with the same location/rotation and scale?

Hello guys,

is there a way to save blueprint’s transform so that whenever we spawn them to have the exact same transform we gave them? (spawn them without hard-coding the transform). I have only thought of using a child component and saving there the transform, is there any other way?

Thanks in advance.

In Unity, we can edit the transform (translate,rotate,scale) of a prefab/blueprint and then save the transform. Thus, when we spawn it, it will have this exact transform. You cal also edit the Transform of a prefab/blueprint from the content browser is unity, but i think UE4 doesnt have this feature.

Well, the best fit for this need at the moment I believe is just save that as a level, and just use load level instance to stream that level in.

Can you show a bit of code or a picture? I did not understand the load level thing and the stream.

hey there. level streaming is a method that can dynamicly open / close levels winthin a persistent level.
you can see more info here :

in your case, here is what you should do :

  1. place your actor in your level, and set it s transform as you want it.
  2. create a level (name it myprefabactor (or whatever :slight_smile: )
  3. in your levels, open the level tab (window / levels)
  4. drag and drop myprefabactor in the level window. (it should appear as a sublevel now). double click it to select it (name will become blue)
  5. in the world outliner, selecte the actor you want to do as “prefab”, right click : LEvel / move selection to current level.
  6. back in the level tab, check that your level is not set as initiany loaded or visible (in the level detail sub panel. and hide your level.

now when you want to spawn it, you just have to calle the level :

313787-spawnlevel.png

I must be misunderstanding something, it sounds like you want to achieve the same result as hard coding the transform but for some reason you don’t want to hard code it. What am I missing?

oh noo… oh noo… Something more easier and light to use?

you can do something a bit dumb,
in your event begin play, you store the transform in a variable, then teleport your actor far away from the level (like and offset of -10000 in transform) and instead of spawning it, you do a function that gives him back his transform