Possible to spawn an actor inside the canvas?


I have the UI setup consisting of different buttons. These are part of a panel and this panel also has slots. I want to display a 3D mesh inside this slot when a button is clicked. I’m not sure if its possible to do this. I first checked out SpawnActor but I guess this can be done only in world space. I wanted to know if its possible to spawn an actor inside the canvas.

No. The only thing you can do is capturing the pawn in a tiny world and using “SceneCapture2D”.


Combining this with an image that you draw (or better use UMG for this) and you can have a similar effect.

Here is a short forum thread where Kris posted a picture of the result:

You can’t spawn actors in anything other then world instace. Also canvas is only 2D it’s not even 3D/GPU accelerated so you can’t do anything other on it then drawing lines, shapes, text and rendering texture. UMG or Slate would maybe give more option, as i know it can’t render mesh on 2D but i think closest thing that may help you is viewport widget:

Also in this kind of problems where you hit some visual inability in engine, think out of the box, it does not matter how thing is done and what you see in code and in editor, what matters is what player see, the final reasult, think of yourself as illusionist.

Thanks for the assist! I’m new to the engine and I’m learning it and complete tasks at the same time. So, I wasn’t exactly sure if I was missing something or its not possible at all.

Thanks for the assist!