SRDebuggerInit.cs 441 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using SRF;
  3. using UnityEngine;
  4. namespace SRDebugger
  5. {
  6. [AddComponentMenu("SRDebugger Init")]
  7. public class SRDebuggerInit : SRMonoBehaviourEx
  8. {
  9. protected override void Awake()
  10. {
  11. base.Awake();
  12. if (!Settings.Instance.IsEnabled)
  13. {
  14. return;
  15. }
  16. SRDebug.Init();
  17. }
  18. protected override void Start()
  19. {
  20. base.Start();
  21. UnityEngine.Object.Destroy(base.CachedGameObject);
  22. }
  23. }
  24. }