Hello, sorry for newbie question but not want make epic mistake in future.
*
If me need single instance class that i will use in any scene (example localization manager) i must in anyway derrive from MonoBehaviour and create GameObject for it or can just make singleton class without additional actions?
*
My question is actual becouse all guides tell about that need add my script to GameObject, but i cant understand why i must make it if my script can work and without Unity.
Having a “pure” C# class as a singleton is totally fine. However, keep in mind that, obviously, a “pure” C# class will not be able to receive the MonoBehaviour messages ( Awake
, Start
, Update
, OnDestroy
, …), and won’t be able to call the functions defined in this class such as StartCoroutine
, Invoke
…