Hey, so I been playing around with the Dialogue System and noticed there's an Action "OnEnabled". From what I understand the documentation explains that the action will trigger when the component is Enabled
I have this block of code that enables the Dialogue System Trigger component on the targeted gameObject.
This works if I were to use BoxCollider2D or any Unity Components but unfortunately it doesn't have the same effect with the Dialogue System Trigger.
I was wondering how I could enable/disable the component from my c# script.
Cheers
How to Enable/Disable DialogueSystemTrigger
-
- Posts: 10
- Joined: Wed Apr 27, 2022 11:01 pm
Re: How to Enable/Disable DialogueSystemTrigger
Hi,
That should work.
Are you sure targetInteract is non-null?
Are there any errors or warnings in the Console window?
That should work.
Are you sure targetInteract is non-null?
Are there any errors or warnings in the Console window?
-
- Posts: 10
- Joined: Wed Apr 27, 2022 11:01 pm
Re: How to Enable/Disable DialogueSystemTrigger
So I looked into it this morning and it's working as you expected.
I had my inspector on the target gameObject and it shows the Dialogue System Trigger as disabled. Only when I click to another gameObject and back to the target, does it show it as updated on the inspector window.
Regardless it seems to be working
Thanks again for the fast response!
I had my inspector on the target gameObject and it shows the Dialogue System Trigger as disabled. Only when I click to another gameObject and back to the target, does it show it as updated on the inspector window.
Regardless it seems to be working
Thanks again for the fast response!
Re: How to Enable/Disable DialogueSystemTrigger
Happy to help. I'm glad it's working now!