文档

Unity Engine

Unity Engine

WhiteSpace

Controls how whitespace and line breaks within an element's text are handled, similar to the CSS white-space property. Unlike the CSS property, only trailing whitespaces are collapsed, and whitespaces within the text are preserved. See white-space
阅读时间1 分钟最后更新于 1 个月前

Definition

public enum WhiteSpace

Remarks

Whitespaces within TextFields are not collapsed.

Fields

Value

Description

NormalTrailing sequences of whitespace are collapsed into a single whitespace. Text will wrap when necessary. This is the default behavior.
NoWrapTrailing sequences of whitespace are collapsed into a single whitespace. Text will never wrap to the next line.
PreWhitespace is preserved. Text will only wrap on line breaks.
PreWrapWhitespace is preserved. Text will wrap when necessary.