docs.unity3d.com
    Show / Hide Table of Contents

    Class PersistentSingleton<T>

    Persistent singleton used to save settings data

    Inheritance
    Object
    PersistentSingleton<T>
    ConfiguratorProjectPrefs
    Namespace: Unity.Industrial.Forma.Editor.UI.Components
    Syntax
    public class PersistentSingleton<T> : ScriptableObject where T : ScriptableObject
    Type Parameters
    Name Description
    T

    Scriptable object type

    Constructors

    PersistentSingleton()

    On domain reload ScriptableObject objects gets reconstructed from a backup. We therefore set the s_Instance here

    Declaration
    protected PersistentSingleton()

    Properties

    instance

    Gets the instance.

    Declaration
    public static T instance { get; }
    Property Value
    Type Description
    T

    The instance.

    Methods

    Save()

    Saves this instance.

    Declaration
    public virtual void Save()

    Save(Boolean)

    Saves the specified save as text.

    Declaration
    public virtual void Save(bool saveAsText)
    Parameters
    Type Name Description
    Boolean saveAsText

    if set to true [save as text].

    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