Hasli4

Untitled

Mar 26th, 2026
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.InputSystem;
  5.  
  6. public class ActivationTeleportationRay : MonoBehaviour
  7. {
  8. public GameObject leftTeleportation;
  9. public GameObject rightTeleportation;
  10. public InputActionProperty leftActivate;
  11. public InputActionProperty rightActivate;
  12.  
  13. void Update()
  14. {
  15. leftTeleportation.SetActive(leftActivate.action.ReadValue<Vector2>().y > 0.5f);
  16. rightTeleportation.SetActive(rightActivate.action.ReadValue<Vector2>().y > 0.5f);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment