UIS Integration - OpenShop()

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
polonel
Posts: 4
Joined: Fri Oct 30, 2020 10:09 pm

UIS Integration - OpenShop()

Post by polonel »

Hello,

When using the OpenShop() Seq command, with the Converse ability "Detach Camera" option enabled. Console logs frame by frame errors of the camera controller index out of bounds until I ESC out of both the shop menu and conversation.

The Conversation will not end when opening the Shop Menu unless forced. Using the latest DS and UIS.

Code: Select all

IndexOutOfRangeException: Index was outside the bounds of the array.
Opsive.UltimateCharacterController.Game.KinematicObjectManager.SetCameraLookVectorInternal (System.Int32 cameraIndex, UnityEngine.Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:687)
Opsive.UltimateCharacterController.Game.KinematicObjectManager.SetCameraLookVector (System.Int32 cameraIndex, UnityEngine.Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:677)
Opsive.UltimateCharacterController.Camera.CameraControllerHandler.OnEnableGameplayInput (System.Boolean enable) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraControllerHandler.cs:210)
Opsive.Shared.Events.InvokableAction`1[T1].Invoke (T1 arg1) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.Shared.Events.EventHandler.ExecuteEvent[T1] (System.Object obj, System.String eventName, T1 arg1) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.UltimateInventorySystemBridge.OnOpenCloseMenu (Opsive.UltimateInventorySystem.UI.DisplayMenuPanel menu, System.Boolean open) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/UltimateInventorySystemBridge.cs:1390)
Opsive.Shared.Events.InvokableAction`2[T1,T2].Invoke (T1 arg1, T2 arg2) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.Shared.Events.EventHandler.ExecuteEvent[T1,T2] (System.Object obj, System.String eventName, T1 arg1, T2 arg2) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.UltimateInventorySystem.UI.DisplayMenuPanel.OpenInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/DisplayMenuPanel.cs:44)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.Open (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel previousPanel, UnityEngine.UI.Selectable previousSelectable, System.Boolean selectDefault) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:132)
Opsive.UltimateInventorySystem.Demo.UI.Menus.Shop.ShopMenu.Open (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel previousPanel, UnityEngine.UI.Selectable previousSelectable, System.Boolean selectDefault) (at Assets/Opsive/UltimateInventorySystem/Demo/Scripts/UI/Menus/Shop/ShopMenu.cs:114)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanelManager.OpenMenu (Opsive.UltimateInventorySystem.UI.DisplayMenuPanel menu) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanelManager.cs:140)
PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandOpenShop.Awake () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Opsive UIS Support/Scripts/Sequencer Commands/SequencerCommandOpenShop.cs:64)
UnityEngine.GameObject:AddComponent(Type)
PixelCrushers.DialogueSystem.Sequencer:ActivateCommand(String, String, Transform, Transform, String[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:733)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand(QueuedSequencerCommand, String, Boolean, Single, String, String, String[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:682)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand(QueuedSequencerCommand) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:651)
PixelCrushers.DialogueSystem.Sequencer:PlaySequence(String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:585)
PixelCrushers.DialogueSystem.Sequencer:PlaySequence(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:595)
PixelCrushers.DialogueSystem.ConversationView:StartSubtitle(Subtitle, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:172)
PixelCrushers.DialogueSystem.ConversationController:GotoState(ConversationState) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:208)
PixelCrushers.DialogueSystem.ConversationController:OnFinishedSubtitle(Object, EventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:264)
PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:399)
PixelCrushers.DialogueSystem.ConversationView:OnFinishedSubtitle() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:406)
PixelCrushers.DialogueSystem.Sequencer:FinishSequence() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:508)
PixelCrushers.DialogueSystem.Sequencer:Update() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:500)

User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS Integration - OpenShop()

Post by Tony Li »

Hi,

I'll work with Opsive to resolve this issue. I'll reply back when we have a fix.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS Integration - OpenShop()

Post by Tony Li »

Hi,

Opsive will include the fix in their next release in a few days.

In the meantime, you can fix it by making these changes:

1. Edit UltimateCharacterLocomotionHandler.cs. In the GetDeltaYawRotation() function, add the first line shown below:

Code: Select all

        public float GetDeltaYawRotation()
        {
            if (!enabled) { return 0; } //<-- ADD THIS LINE.
            var lookVector = m_PlayerInput.GetLookVector(true);
            return m_CharacterLocomotion.ActiveMovementType.GetDeltaYawRotation(m_HorizontalMovement, m_ForwardMovement, lookVector.x, lookVector.y);
        }
2. Import the 2 patch files below:
polonel
Posts: 4
Joined: Fri Oct 30, 2020 10:09 pm

Re: UIS Integration - OpenShop()

Post by polonel »

Thank you for your quick support. Everything is working now.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS Integration - OpenShop()

Post by Tony Li »

Great! Glad to help.
polonel
Posts: 4
Joined: Fri Oct 30, 2020 10:09 pm

Re: UIS Integration - OpenShop()

Post by polonel »

Tony,

One thing I noticed after applying this patch is that the UCC UI is not restored with the HideUI option enabled. If I uncheck "Detach Camera", the UI is hidden and restored correctly.

No Errors or Warnings are logged in the console.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS Integration - OpenShop()

Post by Tony Li »

Hi,

Good catch. Thanks! Justin, the Opsive dev, provided a new method to hide the camera, and I see now that hiding the UI has to be done in a certain order relative to hiding the camera when using this method. This patch should fix it:

DS_OpsivePatch_2020-11-16.unitypackage
polonel
Posts: 4
Joined: Fri Oct 30, 2020 10:09 pm

Re: UIS Integration - OpenShop()

Post by polonel »

Works great. Once again thanks for the fast support.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS Integration - OpenShop()

Post by Tony Li »

Always glad to help!
Post Reply