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.
If we don't provide an audio clip, we get this error:
It seems you forgot to check for null value in the PickupBase class.
Note: the previous version has the following code instead:
The problem appears when using the Inventory Pickup Template in the Inventory Pickup (script) where we could use an audio clip.
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: