docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TemplateFormatter

    Template Formatter allows for registering reusable templates, and use them by name.

    Inheritance
    object
    FormatterBase
    TemplateFormatter
    Implements
    IFormatter
    ISerializationCallbackReceiver
    Inherited Members
    FormatterBase.Names
    Namespace: UnityEngine.Localization.SmartFormat.Extensions
    Assembly: Unity.Localization.dll
    Syntax
    [Serializable]
    public class TemplateFormatter : FormatterBase, IFormatter, ISerializationCallbackReceiver

    Constructors

    Name Description
    TemplateFormatter()

    Creates a new instance of the formatter.

    Properties

    Name Description
    DefaultNames

    Default names to use when Names is null.

    Formatter

    The SmartFormatter that the formatter is part of.

    Methods

    Name Description
    Clear()

    Remove all templates.

    Register(string, string)

    Register a new template.

    Remove(string)

    Remove a template by its name.

    TryEvaluateFormat(IFormattingInfo)

    This method is called by the SmartFormatter to obtain the formatting result of this extension.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)