RuntimeInitialization.cs 688 B

123456789101112131415161718192021
  1. using TriLibCore.Utils;
  2. using UnityEngine;
  3. namespace TriLibCore
  4. {
  5. /// <summary>
  6. /// Represents a class to initialize runtime components.
  7. /// </summary>
  8. public class RuntimeInitialization : MonoBehaviour
  9. {
  10. /// <summary>
  11. /// Initialize the runtime components used by TriLib.
  12. /// You can comment lines in this call and call them manually later if you don't want the component to be initialized automatically.
  13. /// </summary>
  14. [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
  15. public static void Initialize()
  16. {
  17. Dispatcher.CheckInstance();
  18. }
  19. }
  20. }