SamplerName.charCode(int charId) Samples a character at global position charId in the text data, and returns the ASCII code of the sampled character.
SamplerName.charCode(int2 lineAndCharId) Samples a character at line lineAndCharId.x and position lineAndCharId.y within that line, and returns the ASCII code of the sampled character.
SamplerName.charLineId(int charId) Returns an int2 vector containing the 0-based line index of the specified character in x and the 0-based character index relative to the start of the line in y.charId is the global character index in the [0, totalCharCount] range.
SamplerName.charOffset(int charId) Returns the horizontal distance between charId and the beginning of the line in displayable units, where 1.0 is the average glyph size.Takes kerning into account if a kerning file has been provided in the text sampler and its UseKerning property is enabled. Only works for characters whose charCode is in the [0,255] range. If you need to work with some unicode characters, you will need to reencode the text string to map them in free slots of the [0,255] range, and remap their entries in the kerning file.
SamplerName.lineOffset(int lineId) Returns the vertical distance between charId and the beginning of the text in displayable units, where 1.0 is the average glyph size. Defaults to 3.0 if no metrics file has been provided in the text sampler.
SamplerName.charCount() Returns the number of characters in the entire text.
SamplerName.charCount(int charId) Returns the number of characters of the specified line of the text.
SamplerName.lineCount() Returns the number of lines in the entire text.
Disclaimer: These are describing the reference implementation. When using attribute samplers, the behavior of these functions can vary depending on the implementation in the game-engine where the effect is loaded.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
Set by Google to distinguish users.
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.