docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method UpdateString

    UpdateString(string)

    Invokes the OnUpdateString event.

    Declaration
    protected virtual void UpdateString(string value)
    Parameters
    Type Name Description
    string value

    The localized string from the StringReference.

    Remarks

    You can override this method to provide custom behavior when the string is updated.

    Examples

    This example shows how to override the UpdateString(string) method to provide a custom behavior.

    public class MyCustomLocalizedStringEvent : LocalizeStringEvent
    {
        protected override void UpdateString(string translatedValue)
        {
            Debug.Log("UpdateString called with " + translatedValue);
        }
    }
    In This Article
    Back to top
    Copyright © 2025 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)