docs.unity.cn
    Show / Hide Table of Contents

    Class CharacterSubstitutor

    Replaces characters in the input string.

    Inheritance
    Object
    CharacterSubstitutor
    Accenter
    Namespace: UnityEngine.Localization.Pseudo
    Syntax
    [Serializable]
    public class CharacterSubstitutor : 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 Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Thursday, June 9, 2022
    Terms of use