Page 1 of 1

UIS Integration - OpenShop()

Posted: Thu Nov 12, 2020 8:40 pm
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)


Re: UIS Integration - OpenShop()

Posted: Thu Nov 12, 2020 9:16 pm
by Tony Li
Hi,

I'll work with Opsive to resolve this issue. I'll reply back when we have a fix.

Re: UIS Integration - OpenShop()

Posted: Fri Nov 13, 2020 1:29 pm
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:

Re: UIS Integration - OpenShop()

Posted: Fri Nov 13, 2020 7:35 pm
by polonel
Thank you for your quick support. Everything is working now.

Re: UIS Integration - OpenShop()

Posted: Fri Nov 13, 2020 7:48 pm
by Tony Li
Great! Glad to help.

Re: UIS Integration - OpenShop()

Posted: Mon Nov 16, 2020 6:44 pm
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.

Re: UIS Integration - OpenShop()

Posted: Mon Nov 16, 2020 7:34 pm
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

Re: UIS Integration - OpenShop()

Posted: Mon Nov 16, 2020 8:03 pm
by polonel
Works great. Once again thanks for the fast support.

Re: UIS Integration - OpenShop()

Posted: Mon Nov 16, 2020 8:41 pm
by Tony Li
Always glad to help!