# What are Slate Units?

**URL:** <https://forums.unrealengine.com/t/what-are-slate-units/310703>\
**Category:** UI\
**Tags:** User-Interface, unreal-engine, slate, Widget, question, UMG\
**Created:** [March 12, 2015, 7:15pm UTC](https://forums.unrealengine.com/t/what-are-slate-units/310703 "2015-03-12T19:15:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiskislod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fiskislod](https://forums.unrealengine.com/u/Fiskislod)\
**Post date:** [March 12, 2015, 7:15pm UTC](https://forums.unrealengine.com/t/what-are-slate-units/310703/1 "2015-03-12T19:15:57Z")

</div>

Why does Slate use `Slate Units` for padding and sizes? What are Slate Units? Are they pixels?

---

<div class="post-metadata">

**Author:** ![Fiskislod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fiskislod](https://forums.unrealengine.com/u/Fiskislod)\
**Post date:** [March 12, 2015, 7:27pm UTC](https://forums.unrealengine.com/t/what-are-slate-units/310703/2 "2015-03-12T19:27:58Z")

</div>

Slate Units are a way for us to make UI that is independent of pixels ( more precisely: independent of the pixel density of your monitor). A brief motivation is needed: building a UI where you specify everything in pixels just wouldn’t work across multiple platforms these days. The size of a pixel and number of pixels packed into a a single square centimeter of a display varies dramatically. Check out this site for some info: [http://dpi.lv/](http://dpi.lv/).

So, a single Slate Unit does not have a size per-se. By default it was convenient to set it to `1 Slate Unit` is `1 pixel`. However, if you bring up the widget reflector you can use the App Scale to play with how big you want a single `Slate Unit` to be. This applies to the entire application (e.g. the whole editor, game, etc.)

Another trick is that we can scale Slate Units dynamically for different parts of the widget hierarchy. This is where things get interesting and somewhat complicated. One example of this is the `SNodePanel` (it powers Blueprints, Material Editor, and other graph-based UIs.). The `SNodePanel` scales the SlateUnit to pixel ratio for its own content to make its contents appear bigger or smaller when you zoom in/out.

Finally, we attempt to provide an automated heuristic for scaling your game based on the size of the monitor. Because we do not have reliable information about the pixel density of various platforms we cannot always do the right thing. At the moment we provide a simple setting: a curve function found in `Edit->Project Settings->User Interface`. You can use that to define how your in-game UIs will scale. For example, a flat line with y == 1 means you always want each Slate Unit to be 1 pixel. If you want your game to be `1:1` at `720p` and linearly scale as your window size increases, you can express that by putting a point down a `x=720, y=1` and another point at `x=1440,y=2`. This isn’t perfect, but it seems to be handling the most common cases for now.

---

<div class="post-metadata">

**Author:** ![lazyFrond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lazyFrond](https://forums.unrealengine.com/u/lazyFrond)\
**Post date:** [November 17, 2023, 3:42pm UTC](https://forums.unrealengine.com/t/what-are-slate-units/310703/3 "2023-11-17T15:42:43Z")

</div>

so how do you get the current screen size in slate units?  
edit: got it!

[how is screen size in slate units found](https://forums.unrealengine.com/t/how-is-screen-size-in-slate-units-found/1398527)
