SightBead.cs 644 B

123456789101112131415161718192021222324252627282930
  1. using SmartBowSDK;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class SightBead : MonoBehaviour
  7. {
  8. public RectTransform rectTransform;
  9. private void Start()
  10. {
  11. //#if UNITY_ANDROID
  12. // GeneratingTarget.gm.helper.OnRotationUpdate += OnRotationUpdate;
  13. //#endif
  14. }
  15. private void OnRotationUpdate(Quaternion rotation)
  16. {
  17. rectTransform.position = new Vector3(rotation.x, rotation.y, rotation.z);
  18. }
  19. // Update is called once per frame
  20. void Update()
  21. {
  22. //#if !UNITY_ANDROID
  23. // rectTransform.position = Input.mousePosition;
  24. //#endif
  25. }
  26. }