docs.unity3d.com
    Show / Hide Table of Contents

    Class CharacterSubstitutor

    Replaces characters in the input string.

    Inheritance
    Object
    CharacterSubstitutor
    Accenter
    Namespace: UnityEngine.Localization.Pseudo
    Syntax
    public class CharacterSubstitutor : object, IPseudoLocalizationMethod, ISerializationCallbackReceiver

    Properties

    ListMode

    The method to use when selecting a character from ReplacementList.

    Declaration
    public CharacterSubstitutor.ListSelectionMethod ListMode { get; set; }
    Property Value
    Type Description
    CharacterSubstitutor.ListSelectionMethod

    Method

    The substitution method to use.

    Declaration
    public CharacterSubstitutor.SubstitutionMethod Method { get; set; }
    Property Value
    Type Description
    CharacterSubstitutor.SubstitutionMethod

    ReplacementList

    The characters to use when using List mode.

    Declaration
    public List<char> ReplacementList { get; }
    Property Value
    Type Description
    List<Char>

    ReplacementMap

    Dictionary of characters that will be replaced when using Map. Any value that is not present will be preserved.

    Declaration
    public Dictionary<char, char> ReplacementMap { get; }
    Property Value
    Type Description
    Dictionary<Char, Char>

    Methods

    Transform(Message)

    Replaces each character in the input with a replacement character if one can be found. If a replacement character can not be found then the original is kept.

    Declaration
    public void Transform(Message message)
    Parameters
    Type Name Description
    Message message
    Implements
    IPseudoLocalizationMethod.Transform(Message)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023