Mr Loadout
New member
Hello,
I'm using:
UFPS 3.2.2.
UIS 1.3.2.
Integration version 3.0.5
Unity 6000.1.3f1
URP 17.1.0.
I believe the problem might be with the integration because the set up Assault Rifle works fine with just the UFPS installed. These issues really have me stumped as I have installed these assets and integrations on earlier versions successfully, without ever running into anything like this.
So I've attempted to set up the UFPS + UIS integration following the tutorial videos on Youtube (the last two videos on the Ultimate Inventory System playlist). The problem begins during the video section called "Add Item to Loadout & Equip Item" (starting at 17:22 minutes), where we are supposed to set the "Loadout" Character Loadout Item Collection setting "Set Active Equipped" to true, so that the Assault Rifle placed in the Loadout is moved to the "Equippable Slots" Item Slot Collection when the game is running. It seems to be expected that the Assault Rifle is removed from the Loadout and only appears in the Equippable Slots when the game is loaded.
But what happens in my project is that an instance of the Assault Rifle remains in the "Loadout" Character Loadout Item Collection, and another instance of the Assault Rifle appears in the "Equippable Slots" Item Slot Collection with a differing ID.
The Assault Rifle in the Loadout is also called default (as in the name of the object in the list is "Assault Rifle (default)"), and the Assault Rifle in the Equippable Slots is called Assault Rifle (custom), which I don't recall happening before as I've set up the integration on older versions.
Now this isn't a fatal problem thus far, as the rifle still works and the program runs, but it does seem to be aberrant behavior that might clog up the Character Loadout Item Collection.
In the second tutorial video we set up the Equip and Unequip Item actions. When this item action is used on the Assault Rifle, it seems to only affect the Assault Rifle (custom), moving it between the Default Item Collection and the Equppable Slots Item Slots Collection.
But unequipping and equipping the Assault Rifle breaks it, somehow. There is no error, only a warning: "Can not play a disabled audio source".
To clarify: this error appears when I re-equip the Assault Rifle from the Default Item Collection to the Equippable Slots Item Slot Collection using the CharacterEquipUnequipItemAction Item Action.
Checking the Shootable Action component on the Assault Rifle spawned on the character, there is a line which says:
"Can Start use Item: (No) Cannot start use item because of module [0] GenericReloader"
when attempting to fire the Assault Rifle, after re-equipping it.
The light on the [0] Generic Reloader module appears green, and I don't really know what the problem here could be, as I have not altered it (I'm using the Assault Rifle from the demo). I did try disabling the the Wait For Animation Event settings but that had no effect.
Stowing the gun away (switching Item Sets without unequipping the Assault Rifle from the Equippable Slots) and bringing it back out seems to work fine, doesn't break the gun.
Something new I noticed while typing up this novel was that reloading the weapon before unequipping it somehow prevented it from being broken when re-equipping it again. When I don't reload before unequipping, and I re-equip the Assault Rifle, a clipful of ammunition seems to be missing from the inventory.
I've gone through the videos several times to make sure I've set up the project exactly as guided. I've checked the Item Abilities on the Ultimate Character Locomotion component to see that they have the right Item Category, I've gone through the settings on the Inventory and the Character Inventory Bridge, I've checked Inventory Item Set Manager, rechecked that the Assault Rifle prefab has the correct Item Definition and that the Item Definition has the correct prefab... Like I said I'm completely stumped, could use some help here.
Thank you.
Edit:
Loaded up the integration demo and the same problem occurred with the Assault Rifle there as well. Worked after picking it up, but after unequipping it and re-equipping again it threw the same warning as detailed above and wouldn't fire anymore. Kept working if manually reloaded before unequipping the rifle.
However, the pistol did work normally, even after re-equipping it without reloading. No warnings on re-equip.
Additionally, I tried copying the values of the pistol Shootable Action component on to a duplicate assault rifle. The problem still remained.
I'm using:
UFPS 3.2.2.
UIS 1.3.2.
Integration version 3.0.5
Unity 6000.1.3f1
URP 17.1.0.
I believe the problem might be with the integration because the set up Assault Rifle works fine with just the UFPS installed. These issues really have me stumped as I have installed these assets and integrations on earlier versions successfully, without ever running into anything like this.
So I've attempted to set up the UFPS + UIS integration following the tutorial videos on Youtube (the last two videos on the Ultimate Inventory System playlist). The problem begins during the video section called "Add Item to Loadout & Equip Item" (starting at 17:22 minutes), where we are supposed to set the "Loadout" Character Loadout Item Collection setting "Set Active Equipped" to true, so that the Assault Rifle placed in the Loadout is moved to the "Equippable Slots" Item Slot Collection when the game is running. It seems to be expected that the Assault Rifle is removed from the Loadout and only appears in the Equippable Slots when the game is loaded.
But what happens in my project is that an instance of the Assault Rifle remains in the "Loadout" Character Loadout Item Collection, and another instance of the Assault Rifle appears in the "Equippable Slots" Item Slot Collection with a differing ID.
The Assault Rifle in the Loadout is also called default (as in the name of the object in the list is "Assault Rifle (default)"), and the Assault Rifle in the Equippable Slots is called Assault Rifle (custom), which I don't recall happening before as I've set up the integration on older versions.
Now this isn't a fatal problem thus far, as the rifle still works and the program runs, but it does seem to be aberrant behavior that might clog up the Character Loadout Item Collection.
In the second tutorial video we set up the Equip and Unequip Item actions. When this item action is used on the Assault Rifle, it seems to only affect the Assault Rifle (custom), moving it between the Default Item Collection and the Equppable Slots Item Slots Collection.
But unequipping and equipping the Assault Rifle breaks it, somehow. There is no error, only a warning: "Can not play a disabled audio source".
Code:
Can not play a disabled audio source
UnityEngine.AudioSource:Play ()
Opsive.Shared.Audio.AudioConfig:Play (UnityEngine.AudioSource,Opsive.Shared.Audio.AudioClipInfo) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioConfig.cs:479)
Opsive.Shared.Audio.AudioConfig:Play (Opsive.Shared.Audio.AudioSourceGroup,Opsive.Shared.Audio.AudioClipInfo) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioConfig.cs:380)
Opsive.Shared.Audio.AudioManagerModule:PlayAudio (UnityEngine.GameObject,Opsive.Shared.Audio.AudioClipInfo) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioManagerModule.cs:140)
Opsive.Shared.Audio.AudioManager:PlayInternal (UnityEngine.GameObject,Opsive.Shared.Audio.AudioClipInfo) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioManager.cs:250)
Opsive.Shared.Audio.AudioManager:Play (UnityEngine.GameObject,Opsive.Shared.Audio.AudioClipInfo) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioManager.cs:236)
Opsive.Shared.Audio.AudioClipSet:PlayAudioClip (UnityEngine.GameObject,Opsive.Shared.Audio.AudioModifier,int) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioClipSet.cs:87)
Opsive.Shared.Audio.AudioClipSet:PlayAudioClip (UnityEngine.GameObject,int) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioClipSet.cs:58)
Opsive.Shared.Audio.AudioClipSet:PlayAudioClip (UnityEngine.GameObject) (at ./Packages/com.opsive.shared/Runtime/Audio/AudioClipSet.cs:47)
Opsive.UltimateCharacterController.Items.AnimatorAudioStates.AnimatorAudioStateSet/AnimatorAudioState:PlayAudioClip (UnityEngine.GameObject) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/AnimatorAudioStates/AnimatorAudioStateSet.cs:66)
Opsive.UltimateCharacterController.Items.AnimatorAudioStates.AnimatorAudioStateSet:PlayAudioClip (UnityEngine.GameObject) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/AnimatorAudioStates/AnimatorAudioStateSet.cs:227)
Opsive.UltimateCharacterController.Items.Actions.Modules.Shootable.GenericReloader:StartItemReload () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/Actions/Modules/Shootable/ReloaderModule.cs:548)
Opsive.UltimateCharacterController.Items.Actions.Modules.Shootable.GenericReloader:ReloadItem (bool) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/Actions/Modules/Shootable/ReloaderModule.cs:773)
Opsive.UltimateCharacterController.Items.Actions.Modules.Shootable.GenericReloader:WillEquip () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/Actions/Modules/Shootable/ReloaderModule.cs:424)
Opsive.UltimateCharacterController.Items.Actions.CharacterItemAction:WillEquip () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/Actions/CharacterItemAction.cs:618)
Opsive.UltimateCharacterController.Items.CharacterItem:WillEquip () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Items/CharacterItem.cs:536)
Opsive.UltimateCharacterController.Character.Abilities.Items.EquipUnequip:InvokeWillEquipItem (Opsive.UltimateCharacterController.Items.CharacterItem,int) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Character/Abilities/Items/EquipUnequip.cs:256)
Opsive.UltimateCharacterController.Character.Abilities.Items.EquipUnequip:Update () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Character/Abilities/Items/EquipUnequip.cs:625)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[]) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Character/UltimateCharacterLocomotion.cs:665)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateCharacter () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Character/UltimateCharacterLocomotion.cs:580)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:Move (single,single,single) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Character/CharacterLocomotion.cs:568)
Opsive.UltimateCharacterController.SimulationManager/SmoothedCharacter:Move (bool) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Game/SimulationManager.cs:168)
Opsive.UltimateCharacterController.SimulationManager:MoveCharacters (bool,single) (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Game/SimulationManager.cs:771)
Opsive.UltimateCharacterController.SimulationManager:FixedMove () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Game/SimulationManager.cs:711)
Opsive.UltimateCharacterController.SimulationManager:FixedUpdate () (at ./Packages/com.opsive.ultimatecharactercontroller/Runtime/Game/SimulationManager.cs:700)
Checking the Shootable Action component on the Assault Rifle spawned on the character, there is a line which says:
"Can Start use Item: (No) Cannot start use item because of module [0] GenericReloader"
when attempting to fire the Assault Rifle, after re-equipping it.
The light on the [0] Generic Reloader module appears green, and I don't really know what the problem here could be, as I have not altered it (I'm using the Assault Rifle from the demo). I did try disabling the the Wait For Animation Event settings but that had no effect.
Stowing the gun away (switching Item Sets without unequipping the Assault Rifle from the Equippable Slots) and bringing it back out seems to work fine, doesn't break the gun.
Something new I noticed while typing up this novel was that reloading the weapon before unequipping it somehow prevented it from being broken when re-equipping it again. When I don't reload before unequipping, and I re-equip the Assault Rifle, a clipful of ammunition seems to be missing from the inventory.
I've gone through the videos several times to make sure I've set up the project exactly as guided. I've checked the Item Abilities on the Ultimate Character Locomotion component to see that they have the right Item Category, I've gone through the settings on the Inventory and the Character Inventory Bridge, I've checked Inventory Item Set Manager, rechecked that the Assault Rifle prefab has the correct Item Definition and that the Item Definition has the correct prefab... Like I said I'm completely stumped, could use some help here.
Thank you.
Edit:
Loaded up the integration demo and the same problem occurred with the Assault Rifle there as well. Worked after picking it up, but after unequipping it and re-equipping again it threw the same warning as detailed above and wouldn't fire anymore. Kept working if manually reloaded before unequipping the rifle.
However, the pistol did work normally, even after re-equipping it without reloading. No warnings on re-equip.
Additionally, I tried copying the values of the pistol Shootable Action component on to a duplicate assault rifle. The problem still remained.
Attachments
Last edited: