OnUse() don't work in my 2D game
OnUse() don't work in my 2D game
Hello,
I'm having a problem in this project and I would like ask what am I doing wrong.
When I'm getting close to NPC, press E button don't work, I can't even see the UI.
Player and NPC characters use Corgi Engine scripts, is it uncompatible with this plugin?
I watched this tutorial and applied all steps to my game
I created new child gameobject for both player and npc called Dialogue.
Player:
I also added Selector component but still same.
NPC:
I need help!
Thanks in advance.
I'm having a problem in this project and I would like ask what am I doing wrong.
When I'm getting close to NPC, press E button don't work, I can't even see the UI.
Player and NPC characters use Corgi Engine scripts, is it uncompatible with this plugin?
I watched this tutorial and applied all steps to my game
I created new child gameobject for both player and npc called Dialogue.
Player:
I also added Selector component but still same.
NPC:
I need help!
Thanks in advance.
Re: OnUse() don't work in my 2D game
Hi,
For all 2D games, make sure to enable 2D support.
For Corgi, please also see: Corgi Integration.
For all 2D games, make sure to enable 2D support.
For Corgi, please also see: Corgi Integration.
Re: OnUse() don't work in my 2D game
Thanks! I applied them.
It works, UI shows up. But when I press E to talk with NPC, I'm getting this error.
It works, UI shows up. But when I press E to talk with NPC, I'm getting this error.
ArgumentException: method arguments are incompatible
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEngine.Events.InvokableCall`1[T1]..ctor (System.Object target, System.Reflection.MethodInfo theFunction) (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.CachedInvokableCall`1[T]..ctor (UnityEngine.Object target, System.Reflection.MethodInfo theFunction, System.Boolean argument) (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.PersistentCall.GetRuntimeCall (UnityEngine.Events.UnityEventBase theEvent) (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.PersistentCallGroup.Initialize (UnityEngine.Events.InvokableCallList invokableList, UnityEngine.Events.UnityEventBase unityEventBase) (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.UnityEventBase.RebuildPersistentCallsIfNeeded () (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.UnityEventBase.PrepareInvoke () (at <6a104889781c465ca00c12d0953583e2>:0)
UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <6a104889781c465ca00c12d0953583e2>:0)
PixelCrushers.DialogueSystem.DialogueSystemEvents.OnConversationStart (UnityEngine.Transform actor) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemEvents.cs:123)
UnityEngine.Component:BroadcastMessage(String, Object, SendMessageOptions)
PixelCrushers.DialogueSystem.ConversationModel:InformParticipants(String, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:200)
PixelCrushers.DialogueSystem.ConversationController:Initialize(ConversationModel, ConversationView, Boolean, EndConversationDelegate) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:150)
PixelCrushers.DialogueSystem.DialogueSystemController:StartConversation(String, Transform, Transform, Int32) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:936)
PixelCrushers.DialogueSystem.DialogueManager:StartConversation(String, Transform, Transform, Int32) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:446)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoConversationAction(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:949)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:694)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:676)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:662)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:OnUse(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:508)
UnityEngine.GameObject:BroadcastMessage(String, Object, SendMessageOptions)
PixelCrushers.DialogueSystem.ProximitySelector:UseCurrentSelection() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Interaction/ProximitySelector.cs:255)
PixelCrushers.DialogueSystem.ProximitySelector:Update() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Interaction/ProximitySelector.cs:219)
Re: OnUse() don't work in my 2D game
Hi,
Inspect your Dialogue System Events component's OnConversationStart() event. It's misconfigured.
Inspect your Dialogue System Events component's OnConversationStart() event. It's misconfigured.
Re: OnUse() don't work in my 2D game
Hello! I checked it and found that empty events cause this issue. It was Proximity.enabler true and false, somehow deleted on its own. I added back and problem fixed.
I checked both Corgi Example scene and this manual. It was helpful!
I had a little problem regarding mouse visibility. In gameplay, there's no mouse visibility. Only ESC button shows up the mouse, it opens a menu naturally. But when I'm talking to NPC, mouse still unvisible.
I did that but nothing changed.If you want to allow the player to click on response menu buttons using the mouse, inspect UICamera → Canvas → Fader and untick Raycast Target. Otherwise Corgi's Fader will prevent mouse input.
---
Face() sequencer cause UI flip.
---
I copied 4x NPC from Corgi Example to my scene. And Zoom2D() does not work unfortunately.
---
Any ideas?
Re: OnUse() don't work in my 2D game
Hi,
Add an MMCursorVisible component to the NPC's CorgiStandardDialogueControls child GameObject.
Add a MatchCharacterDirection component to the NPC's CorgiStandardDialogueControls child GameObject.
Corgi can use Cinemachine to control the camera. If your scene uses Cinemachine, use the Dialogue System's Cinemachine integration to control the camera (e.g., Cinemachine Priority On Dialogue Event component, or CinemachinePriority() and CinemachineTarget() sequencer commands).
Re: OnUse() don't work in my 2D game
Hi,
Thank you for your help!
- MMCursorVisible cause instant on/off cursor visibility. Like flickers. Didn't solve the problem, still needs adjustments. What should I do?
- MatchCharacterDirection solved the problem!
Last one didn't fix the problem or I didn't manage to do that. Can you check it?
Yes, I'm using Cinemachine. It's enabled by default on Corgi Engine.
I added Cinemachine Priority On Dialogue Event component to NPC's CorgiStandardDialogueControls child GameObject.
And this is the Sequencer on Dialogue.
Zoom animation don't work.
---
I have plans for multiple language and I need word wrap option to make it automatic for me.
At the moment, it shows one paragraph and seems really bad, out of resolution.
How can I enable word wrap?
Thanks in advance!
Thank you for your help!
- MMCursorVisible cause instant on/off cursor visibility. Like flickers. Didn't solve the problem, still needs adjustments. What should I do?
- MatchCharacterDirection solved the problem!
Last one didn't fix the problem or I didn't manage to do that. Can you check it?
Yes, I'm using Cinemachine. It's enabled by default on Corgi Engine.
I added Cinemachine Priority On Dialogue Event component to NPC's CorgiStandardDialogueControls child GameObject.
And this is the Sequencer on Dialogue.
Zoom animation don't work.
---
I have plans for multiple language and I need word wrap option to make it automatic for me.
At the moment, it shows one paragraph and seems really bad, out of resolution.
How can I enable word wrap?
Thanks in advance!
Re: OnUse() don't work in my 2D game
Hi,
Also I tried to add TextMeshPro to CorgiStandardDialogueControls.
I created TMP version of Subtitle Line child object (Subtitle Line TMP), however cannot drag and drop it to CorgiStandardDialogueControls' Subtitle Text element, because there is no "None (TMP UGUI)".
I unpacked the prefab, still didn't show up.
It seems strange, I was able to do that in Dialogue Manager's Canvas, but not this one. Need help again!
Also I tried to add TextMeshPro to CorgiStandardDialogueControls.
I created TMP version of Subtitle Line child object (Subtitle Line TMP), however cannot drag and drop it to CorgiStandardDialogueControls' Subtitle Text element, because there is no "None (TMP UGUI)".
I unpacked the prefab, still didn't show up.
It seems strange, I was able to do that in Dialogue Manager's Canvas, but not this one. Need help again!
Re: OnUse() don't work in my 2D game
Hi,
Try ticking the Dialogue System Trigger's Show Cursor During Conversation checkbox.
Zoom2D() is not compatible with Cinemachine. You must use the Cinemachine commands instead, such as CinemachinePriority().
Please see this post.
Did you unassign the Text element?DryreL wrote: ↑Fri Aug 20, 2021 12:02 pmAlso I tried to add TextMeshPro to CorgiStandardDialogueControls.
...
I created TMP version of Subtitle Line child object (Subtitle Line TMP), however cannot drag and drop it to CorgiStandardDialogueControls' Subtitle Text element, because there is no "None (TMP UGUI)".
Re: OnUse() don't work in my 2D game
Hi,
Thanks for your help!
I tried to add CorgiStandardDialogueControls -> Panel child gameobject. Rect Transform width set to 200 for testing.
CorgiStandardDialogueControls -> Text Panel child gameobject
Any idea?
---
Current problems:
- Cursor visibility while Dialogue active
- Zoom in/out while Dialogue active
- Word wrap
Thanks for your help!
I tried now, but it still same. Cursor visibility flickering. Pause menu has no issue with cursor visibility, always on. In gameplay, it has problem. I wonder why it didn't solve the problem.
Oh okay. I changed Zoom2D to CinemachinePriority but no luck. Can you explain it step by step please?
Thanks. I did but it still same.
I tried to add CorgiStandardDialogueControls -> Panel child gameobject. Rect Transform width set to 200 for testing.
CorgiStandardDialogueControls -> Text Panel child gameobject
Any idea?
Thanks! I was totally forgot. Now it works with Text Mesh Pro UGUI
---
Current problems:
- Cursor visibility while Dialogue active
- Zoom in/out while Dialogue active
- Word wrap