Small error in UIS V. 1.1.8

FadelMS

Member
Thanks gentlemen for the great effort you put in maintaining such huge products like UCC and UIS, and also for the excellent support you provide. At the same time, I'd like to report a small error in UIS V.1.1.8.
The problem appears when using the Inventory Pickup Template in the Inventory Pickup (script) where we could use an audio clip.

1626895888723.png

If we don't provide an audio clip, we get this error:

UnassignedReferenceException: The variable m_AudioClip of InventoryPickup has not been assigned.
You probably need to assign the m_AudioClip variable of the InventoryPickup script in the inspector.

It seems you forgot to check for null value in the PickupBase class.

C#:
protected virtual void PlaySound()
{
  AudioManager.PlayClipAt(m_AudioClip, transform.position);
}

Note: the previous version has the following code instead:

C#:
protected virtual void PlaySound()
{
   if (m_AudioClip == null) { return; }
    AudioManager.PlayClipAt(m_AudioClip, transform.position);
}
 
Last edited:
Terribly sorry about this, We are working on a complete reafctor of the Audio system that will be shared between the character and the inventory system. But then decided not to include it in v1.1.8. So I had to revert some changes and clearly I missed that.

I'll get it fixed asap, probably directly in the AudioManager in case other components try to play an empty Audio.

In V1.2 of the Inventory System the Audio System will have a ton more options for audio clips, allowing you to choose the AudioMixerGroup, volume, pitch. or even have random value/pitch and much more individually for each audio or groups of audio clips.
 
Top