custom widget size

Does the actor move? Does the screen move? if it does, use a component to simplify it so you do not need to project 3d to 2d coords every frame.

Again, it’s unclear what you mean. What is the struggle, exactly? You are free to place any widget anywhere, any time, be it 2d or 3d.

maybe a stupid question
my mind will sooner or later catch up
but will a canvas always be full screen or can you set the size of a canvas
i tried to see if you can change the size of the canvas but did not see anything relevant to that

No.

can you set the size of a canvas

There is no such thing as Size of Canvas. There is only Desired Size of a widget. This dropdown is a preview size and has nothing to do with widget size or canvas, have a look:

I am merely emulating a 256x128 workspace. If I add it to the viewport, it will be full screen. Whether it has canvas does not matter:

Canvas is not special in that sense, it’s just a widget that is really good at working with widgets that are inside of it. It can anchor them, for example - but something else still has to tell the canvas how large it should be. Unless told otherwise, container widgets will take all the space they can. Lets say you make a Size Box:

If you add it to the viewport, it will also be full screen:

Note the green frame :point_up:. The Size Box just tells any widget inside of it to be of Desired Size 64x64. Something outer has to tell the Size Box what size it itself can become.

The Desired Size is a constant battle of Children wanting one thing and their Parents wanting something else for them.
Just like in real life :two_hearts:


The outer size of the final widget is always up to you. When you create a 2d widget you can simply tell it what Desired Size you want it to be:

Since this widget has no outer to rely on for desired size, it will use the Viewport as the parent.

That Set Desired Size in Viewport is the equivalent of (in a way - we need to get Desired Size somehow):

Note that we’re no longer in screenspace. These are not pixels, they are Unreal Units - centimetres. If you switch to screenspace, you get the pixels back.

1 Like

also found setdesiredsizeinviewport now