What are Slate Units?
Why does Slate use
asked Mar 12 '15 at 07:15 PM in Using UE4
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/.
So, a single Slate Unit does not have a size per-se. By default it was convenient to set it to
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
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
answered Mar 12 '15 at 07:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here