Created
September 5, 2016 04:43
-
-
Save dskjal/a3adec7072c39b6861ee53533ab26d28 to your computer and use it in GitHub Desktop.
Unity でフォントの高さをピクセルで取得する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private int getFontHeight(GUIStyle style) { | |
| var labelSize = style.CalcSize(new GUIContent("ABC")); | |
| return (int)labelSize.y; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment