matheussartori
New member
Hi Guys. I have created a flashlight item, a item collection and I'm using the Item category for the flashlight.
I have also created the flashlight pick up, and the pickup is working fine i guess, because I'm able to pick up the flashlight 3 times.
I'm receiving this error when I pick the flashlight or equip it on the default inventory:
I have reviewed the documentation, and I can't seem to find what's wrong. The idea is having one flashlight that every character can equip, so it's not bound to the default character on creation.
I'm using PUN as well, and the scene setup is working, the character is working as well. I also updated the pick up with the addon to add the PUN scripts.
The character is with the correct item collection too.
Any ideas of what could be wrong? Thanks in advice!
I have also created the flashlight pick up, and the pickup is working fine i guess, because I'm able to pick up the flashlight 3 times.
I'm receiving this error when I pick the flashlight or equip it on the default inventory:
Code:
The Character Item prefab at index 0 is null for Flashlight.
UnityEngine.Debug:LogError (object)
Opsive.UltimateCharacterController.Inventory.InventoryBase:SpawnItemIdentifiersCharacterItem (Opsive.Shared.Inventory.IItemIdentifier,int) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:750)
Opsive.UltimateCharacterController.Inventory.InventoryBase:AddItemIdentifierAmount (Opsive.Shared.Inventory.IItemIdentifier,int,bool,int) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:591)
Opsive.UltimateCharacterController.Inventory.InventoryBase:PickupItem (Opsive.Shared.Inventory.IItemIdentifier,int,int,bool,bool,bool,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:642)
Opsive.UltimateCharacterController.Inventory.InventoryBase:PickupItem (Opsive.Shared.Inventory.IItemIdentifier,int,int,bool,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/InventoryBase.cs:617)
Opsive.UltimateCharacterController.Objects.CharacterAssist.ItemPickup:DoItemIdentifierPickupInternal (UnityEngine.GameObject,Opsive.UltimateCharacterController.Inventory.InventoryBase,int,bool,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Objects/CharacterAssist/ItemPickup.cs:73)
Opsive.UltimateCharacterController.Objects.CharacterAssist.ItemPickupBase:DoItemIdentifierPickup (UnityEngine.GameObject,Opsive.UltimateCharacterController.Inventory.InventoryBase,int,bool,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Objects/CharacterAssist/ItemPickupBase.cs:136)
Opsive.UltimateCharacterController.Character.Abilities.Pickup:DoPickup () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Pickup.cs:332)
Opsive.UltimateCharacterController.Utility.AnimationEventTrigger:NotifyEventListeners () (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/AnimationEventTrigger.cs:169)
Opsive.UltimateCharacterController.Utility.AnimationEventTrigger:InvokeScheduledEvent () (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/AnimationEventTrigger.cs:156)
Opsive.Shared.Game.ScheduledEvent:Invoke ()
Opsive.Shared.Game.SchedulerBase:Invoke (Opsive.Shared.Game.ScheduledEventBase,int)
Opsive.Shared.Game.SchedulerBase:FixedUpdate ()
I have reviewed the documentation, and I can't seem to find what's wrong. The idea is having one flashlight that every character can equip, so it's not bound to the default character on creation.
I'm using PUN as well, and the scene setup is working, the character is working as well. I also updated the pick up with the addon to add the PUN scripts.
The character is with the correct item collection too.
Any ideas of what could be wrong? Thanks in advice!
Attachments
Last edited: