title: Play audio when game object is in the process of being null?
body: <p>I want to play an audio for when the item is retrieved. Once the item is no longer in the scene there is no audio to derive from. Is there any way I can play this once the object is no longer available? I've tried <code>PlayOneShot</code> but that gave me errors in the console. I've only really used audio to attach on gameobjects.</p>
  
  <pre><code>public Item item; 
  
  public GameObject Item;
  
  //public AudioSource source;
  
  public Transform targetItem;
  public string achievmentName;
  
  
  
  //public int scoreValue = 10;
  int waterMask;
  
  public float maxCastDist = 1000f;
  public float itemDist = 1f;
  //public float itemDist = 1f;
  //public float enemyDist = 1f;
  
  public bool hitObject;
  
  
  void Awake ()
  {
  
      waterMask = LayerMask.GetMask ("Water"); // will only cast in water
  
  }
  
  void Start()
  {
      //source = GetComponent&lt;AudioSource&gt;();
  }
  
  void Update ()
  {
      //if (Input.GetMouseButtonDown (0)) {
      if (EventSystem.current.IsPointerOverGameObject ()) {
          return;
  
      } else {
  
          if (Input.GetMouseButtonDown (0)) {
              RaycastHit hit;
  
              Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
              if (Physics.Raycast (ray, out hit, maxCastDist, waterMask))
              if (hit.collider != null) {
  
                  //Destroy (GameObject.FindWithTag ("Float"));
                  float dist = Vector3.Distance (hit.point, targetItem.position);
                  Debug.Log (dist);
  
  
  
                  //Instantiate (Float, hit.point, Quaternion.identity);
                  if (dist &lt; itemDist) {
  
                      itemAdd(); // Will "retrieved" Item
                  } 
  
              }
          }
      }
  }
  
  
  
  void itemAdd ()
  {
      //Destroy (GameObject.FindWithTag ("Item"));
      Item = GameObject.FindWithTag ("Item");
      Item.SetActive(false);
  
      bool wasPickedUp = Inventory.instance.Add (item);
  
      if (wasPickedUp)
  
      print ("You Caught The" + item.name );
      AchievementManager.Instance.EarnAchievment (achievmentName);
      //ScoreManager.score += scoreValue;
  }
  </code></pre>
  
  <p>}</p>