InputDeviceUIBase.cs 857 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using UnityEngine;
  7. namespace SC.XR.Unity.Module_InputSystem {
  8. public abstract class InputDeviceUIBase : SCModuleMono {
  9. private InputDeviceBase _inputDevice;
  10. public InputDeviceBase inputDevice {
  11. get {
  12. if(_inputDevice == null) {
  13. _inputDevice = GetComponentInParent<InputDeviceBase>();
  14. }
  15. return _inputDevice;
  16. }
  17. }
  18. [Header("Drag For Initialize")]
  19. [SerializeField]
  20. protected List<SCModuleMono> UIModuleList;
  21. public override void OnSCAwake() {
  22. base.OnSCAwake();
  23. foreach (var item in UIModuleList) {
  24. AddModule(item);
  25. }
  26. }
  27. }
  28. }