Module_TooltipMove.cs 715 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using SC.XR.Unity.Module_InputSystem;
  5. public class Module_TooltipMove : MonoBehaviour
  6. {
  7. private GameObject lable;
  8. private void Start()
  9. {
  10. lable = transform.Find("Lable").gameObject;
  11. }
  12. public void MoveLableEnable()
  13. {
  14. lable.GetComponent<BoxCollider>().enabled = true;
  15. lable.GetComponent<ManipulationHandler>().enabled = true;
  16. }
  17. public void MoveLableDisable()
  18. {
  19. Destroy(lable.GetComponent<ManipulationHandler>());
  20. Destroy(lable.GetComponent<NearInterationGrabbable>());
  21. lable.GetComponent<BoxCollider>().enabled = true;
  22. }
  23. }