Let's simplify it and find out where the problem is.
Here's an example scene. It doesn't use VR. It uses a simplified version of your setup script. Would you please confirm that this works correctly in your project?
DS_TestDSTriggerFromScript_2022-01-05.unitypackage
How to add an Action to a DialogueSystemTrigger componenet threw scripting
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
After some more test it seems that when not setup beforehand and adding all component threw code, the OnConversationStart method on my moveDialoguePanel script is never called
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Hi,
Message such as OnConversationStart are only sent to the Dialogue Manager GameObject and the two primary participants (actor and conversant). This table explains which GameObjects receive which messages:
Script Messages
Message such as OnConversationStart are only sent to the Dialogue Manager GameObject and the two primary participants (actor and conversant). This table explains which GameObjects receive which messages:
Script Messages
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Yes but when i set it up before hand it is called and everything works, but when i add component threw code, it's like its not called, it never goes in.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
If you temporarily set the Dialogue Manager's Other Settings > Debug Level to Info, confirm that it reports the correct actor and conversant GameObjects in:
Dialogue System: Starting conversation 'title' with actor=X and conversant=Y
Dialogue System: Starting conversation 'title' with actor=X and conversant=Y
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
yes I confirm it does says the correct thing
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Please try this:
1. Set up the Dialogue System Trigger in the inspector so that it works correctly for your needs. Change the Inspector view to Debug mode. (From the triple-dot menu in the upper right, select Debug.) Make a note of the component's values (e.g., take a screenshot).
2. Let your script create a Dialogue System Trigger. Inspect it in the Inspector view. Compare it with the screenshot of the working Dialogue System Trigger.
1. Set up the Dialogue System Trigger in the inspector so that it works correctly for your needs. Change the Inspector view to Debug mode. (From the triple-dot menu in the upper right, select Debug.) Make a note of the component's values (e.g., take a screenshot).
2. Let your script create a Dialogue System Trigger. Inspect it in the Inspector view. Compare it with the screenshot of the working Dialogue System Trigger.