Ando5000
Member
Hello,
I have a question about RandomItemDropper script. Ive attempted to replicate the same functionality from your Enemy in the UIC demo scene, but in the UCC integration demo scene. For now I am using a crate with a UCC health script on death event to look @ RandomItemDropper to activate the Drop() method. This part works fine and ive been able to get some things to drop if i plug in some of the pickup prefabs that are already in the scene. But I cant seem to get the pickup prefab to drop properly like ive seen in the UIC scene. In the UIC scene it seems to drop a generic bag that gets passed the droppable items values thats available in the enemy inventory? In my scene i get the following error when i try to use a similar prefab. (copied it and created a new version with my database)
Could not find prefab attribute: PickupPrefab.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickupVisualListener:SetVisualInternal(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickupVisualListener.cs:83)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickupVisualListener:UpdateState() (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickupVisualListener.cs:49)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickup:UpdateState(ItemObject) (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickup.cs:75)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickup:Start() (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickup.cs:55)
Ive set up the other scripts as ive seen used in the UIC demo scene and made sure it was using my database. Unfortunately I keep getting an error when it tries to drop the prefab and i cant seem to figure it out.
Attached is a screenshot of my inspector setup for both my Crate gameObject that has the inventory and itemdropper script as well as the ItemPickup Prefab. Thanks for the help! Couple hours of flustration now, figured its time to ask.
I have a question about RandomItemDropper script. Ive attempted to replicate the same functionality from your Enemy in the UIC demo scene, but in the UCC integration demo scene. For now I am using a crate with a UCC health script on death event to look @ RandomItemDropper to activate the Drop() method. This part works fine and ive been able to get some things to drop if i plug in some of the pickup prefabs that are already in the scene. But I cant seem to get the pickup prefab to drop properly like ive seen in the UIC scene. In the UIC scene it seems to drop a generic bag that gets passed the droppable items values thats available in the enemy inventory? In my scene i get the following error when i try to use a similar prefab. (copied it and created a new version with my database)
Could not find prefab attribute: PickupPrefab.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickupVisualListener:SetVisualInternal(Item) (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickupVisualListener.cs:83)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickupVisualListener:UpdateState() (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickupVisualListener.cs:49)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickup:UpdateState(ItemObject) (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickup.cs:75)
Opsive.UltimateInventorySystem.DropsAndPickups.ItemPickup:Start() (at Assets/Opsive/UltimateInventorySystem/Scripts/DropsAndPickups/ItemPickup.cs:55)
Ive set up the other scripts as ive seen used in the UIC demo scene and made sure it was using my database. Unfortunately I keep getting an error when it tries to drop the prefab and i cant seem to figure it out.
Attached is a screenshot of my inspector setup for both my Crate gameObject that has the inventory and itemdropper script as well as the ItemPickup Prefab. Thanks for the help! Couple hours of flustration now, figured its time to ask.
Attachments
Last edited: