docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor EditorPersistentValue

    EditorPersistentValue(T, string, Action)

    Initializes a new persisted value.

    Declaration
    public EditorPersistentValue(T defaultValue, string persistenceKey, Action onValueChanged = null)
    Parameters
    Type Name Description
    T defaultValue

    Default value used when no data is stored.

    string persistenceKey

    EditorPrefs key used for persistence.

    Action onValueChanged

    Callback invoked when the value changes.

    In This Article
    Back to top
    Copyright © 2026 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)