Item binding audioclips on Inventory Item Pickup component

snicker

Member
UIS 1.0.7 UCC 2.2.5
I am trying to use item binding on my item pickups, all of which use the Inventory Item Pickup component from the integration.

I have an Item Definition attribute in the ALL category that contains a list of audio clips, some items will have multiple pickup sounds, some will just have one.

I want to set this list to the audio clips list on the inventory item pickup using item binding but it does not appear in the dropdown on Item Binding. I have been using item binding fine with sprites and ints, until I tried to set audio clips with item binding component.

In the mean time I can set it manually but I would like to use item binding for lots of stuff so i want to get that working :)
 

Attachments

  • UnityGameProjectV2 - gaiapaintedtextures - PC, Mac & Linux Standalone - Unity 2019.4.11f1 Pers...png
    UnityGameProjectV2 - gaiapaintedtextures - PC, Mac & Linux Standalone - Unity 2019.4.11f1 Pers...png
    80.8 KB · Views: 4
The audio clip array is not directly public. It is within a class called AudioClipSet which has a delay + the array of Audio.
So to be able to bind your audio you will need to make an attribute of type AudioClipSet instead of type AudioClip[].

The property you'll bind to can be found in the base class ObjectPickup and has the name "PickupAudioClipSet"

If you can't find the AudioClipSet as an option for the attribute type don't forget that you can use the Unit Options window to add types to the attribute type dropdown
 
Top