🍬
Gummi
  • Welcome to Gummi
  • Installation
  • Repo
  • API Documentation
    • Core
      • Attributes
        • DisableIf(string Target)
        • DisableIf(string Target, object Benchmark)
        • EnableIf(string Target)
        • EnableIf(string Target, object Benchmark)
        • HideIf(string Target)
        • HideIf(string Target, object Benchmark)
        • ShowIfstring Target)
        • ShowIf(string Target, object Benchmark)
        • SOExposed
        • VisibleBaseAttribute
        • ReadOnly
      • Extensions
        • GenericExtensions
        • IntExtensions
        • ListExtensions
    • MVC
      • RootController
      • SubController
      • SubController<enum, uiView>
      • UIView
    • Singletons
      • Singleton
      • Persistent Singleton
      • Lazy Singleton
      • Persistent Lazy Singleton
    • Utility
      • MDDocumentation
      • Optional
Powered by GitBook
On this page
  • Summary
  • Fields
  • Methods
  1. API Documentation
  2. Singletons

Persistent Singleton

PreviousSingletonNextLazy Singleton

Last updated 3 years ago

namespace: Inherits: MonoBehaviour

Summary

Base class for singletons that will persist across scenes.

Fields

public static T Instance: The instance of T in the scene. It may also be null if there are no instances in the scene.

Methods

protected virtual void Awake(): enforces Singleton pattern.

protected virtual void OnDestroy(): sets T.Instance to null.

Gummi.Pattern.Singletons