using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class GrabPickups : MonoBehaviour { private AudioSource pickupSoundSource; void Awake() { pickupSoundSource = DontDestroy.instance.GetComponents()[1]; } void OnControllerColliderHit(ControllerColliderHit hit) { if (hit.gameObject.tag == "Pickup") { TrackLevel.current_level++; pickupSoundSource.Play(); SceneManager.LoadScene("Play"); } } }