public static bool HasInstance => _instance != null;
A common use case is to deregister something from a singleton in OnDestroy, which can cause errors if the singleton has already been destroyed and a new one is created. So we need this property to let people check whether that is the case. Can also be used to safely handle Singleton instances without try/catch.
A common use case is to deregister something from a singleton in
OnDestroy
, which can cause errors if the singleton has already been destroyed and a new one is created. So we need this property to let people check whether that is the case. Can also be used to safely handleSingleton
instances without try/catch.Might have implications on the
Query
system.