Z
Z
Zimaell2020-12-25 13:41:43
Unity
Zimaell, 2020-12-25 13:41:43

How to get panel size in pixels?

How to get panel size in pixels?
That is, there is a panel, on each device it has different pixel sizes, so how to recognize it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GFX Data, 2020-12-25
@Zimaell

RectTransform.sizeDelta
True, not exactly in screen pixels, but in the panel's coordinate system. And only if you bind the CanvasScaler to Size with Screen size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question