oz-chasetailgames
Member
I get the following error when I try to add an alternative fire to the bow. LMB is assigned to Action-ID-0 for the bow, and ID-1 is assigned to RMB. All properties under shootable weapon and third person shootable weapon properties scripts are the same except the corresponding action IDs. What should I change to be able to use the second one?
One error indicates the player character, and the other one the scheduler. Mainly, when I shoot with ID-0, when I try to shoot with ID-1, it is telling that this key is already used.
Here is the full error:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[UnityEngine.Material,Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader+OriginalMaterialValue].Add (UnityEngine.Material key, OriginalMaterialValue value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.InitializeCharacterFadeRenderers (UnityEngine.Renderer[] renderers) (at Assets/Opsive/UltimateCharacterController/ThirdPersonController/Scripts/Camera/ObjectFader.cs:602)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.OnShowProjectile (UnityEngine.GameObject projectile, Boolean show) (at Assets/Opsive/UltimateCharacterController/ThirdPersonController/Scripts/Camera/ObjectFader.cs:625)
Opsive.UltimateCharacterController.Events.InvokableAction`2[UnityEngine.GameObject,System.Boolean].Invoke (UnityEngine.GameObject arg1, Boolean arg2) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:132)
Opsive.UltimateCharacterController.Events.EventHandler.ExecuteEvent[GameObject,Boolean] (System.Object obj, System.String eventName, UnityEngine.GameObject arg1, Boolean arg2) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:425)
Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon.DetermineVisibleProjectile (Boolean forceDisable) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ShootableWeapon.cs:823)
Opsive.UltimateCharacterController.Game.ScheduledEvent`1[System.Boolean].Invoke () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:126)
Opsive.UltimateCharacterController.Game.Scheduler.Invoke (Opsive.UltimateCharacterController.Game.ScheduledEventBase scheduledEvent, Int32 index) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:657)
Opsive.UltimateCharacterController.Game.Scheduler.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:329)
One error indicates the player character, and the other one the scheduler. Mainly, when I shoot with ID-0, when I try to shoot with ID-1, it is telling that this key is already used.
Here is the full error:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[UnityEngine.Material,Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader+OriginalMaterialValue].Add (UnityEngine.Material key, OriginalMaterialValue value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.InitializeCharacterFadeRenderers (UnityEngine.Renderer[] renderers) (at Assets/Opsive/UltimateCharacterController/ThirdPersonController/Scripts/Camera/ObjectFader.cs:602)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.OnShowProjectile (UnityEngine.GameObject projectile, Boolean show) (at Assets/Opsive/UltimateCharacterController/ThirdPersonController/Scripts/Camera/ObjectFader.cs:625)
Opsive.UltimateCharacterController.Events.InvokableAction`2[UnityEngine.GameObject,System.Boolean].Invoke (UnityEngine.GameObject arg1, Boolean arg2) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:132)
Opsive.UltimateCharacterController.Events.EventHandler.ExecuteEvent[GameObject,Boolean] (System.Object obj, System.String eventName, UnityEngine.GameObject arg1, Boolean arg2) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:425)
Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon.DetermineVisibleProjectile (Boolean forceDisable) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ShootableWeapon.cs:823)
Opsive.UltimateCharacterController.Game.ScheduledEvent`1[System.Boolean].Invoke () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:126)
Opsive.UltimateCharacterController.Game.Scheduler.Invoke (Opsive.UltimateCharacterController.Game.ScheduledEventBase scheduledEvent, Int32 index) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:657)
Opsive.UltimateCharacterController.Game.Scheduler.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/Scheduler.cs:329)
Last edited: