I can't understand the Sequencer Command "SetEnabled"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

I can't understand the Sequencer Command "SetEnabled"

Post by Deses »

According to https://www.pixelcrushers.com/dialogue_ ... SetEnabled.
I have to provide the name of the component in a subject, the state and the subject.

My GameObject is named "Reset guard" and it has a "Box Collider" component.

If I use SetEnabled like this

Code: Select all

SetEnabled(Box Collider, false, Reset guard);
, I get the following error message:

Code: Select all

Dialogue System: Sequencer: SetEnabled() command: component 'Box Collider' not found on Reset guard.
UnityEngine.Debug:LogWarning (object)
PixelCrushers.DialogueSystem.Sequencer:HandleSetEnabledInternally (string,string[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:1890)
PixelCrushers.DialogueSystem.Sequencer:HandleCommandInternally (string,string[],single&) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:1055)
PixelCrushers.DialogueSystem.Sequencer:ActivateCommand (string,string,UnityEngine.Transform,UnityEngine.Transform,string[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:721)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand (PixelCrushers.DialogueSystem.SequencerCommands.QueuedSequencerCommand,string,bool,single,string,string,string[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:682)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand (PixelCrushers.DialogueSystem.SequencerCommands.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,bool,bool) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:595)
PixelCrushers.DialogueSystem.Sequencer:PlaySequence (string,UnityEngine.Transform,UnityEngine.Transform,bool,bool) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:601)
PixelCrushers.DialogueSystem.DialogueSystemController:PlaySequence (string,UnityEngine.Transform,UnityEngine.Transform,bool,bool,string) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:1449)
PixelCrushers.DialogueSystem.DialogueSystemController:PlaySequence (string,UnityEngine.Transform,UnityEngine.Transform,bool) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:1502)
PixelCrushers.DialogueSystem.DialogueSystemController:PlaySequence (string,UnityEngine.Transform,UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:1523)
PixelCrushers.DialogueSystem.DialogueManager:PlaySequence (string,UnityEngine.Transform,UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:749)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoSequenceAction (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:671)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:631)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform,UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:617)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:603)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:OnTriggerEnter (UnityEngine.Collider) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:499)
What am I missing?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: I can't understand the Sequencer Command "SetEnabled"

Post by Tony Li »

Hi,

Don't use blank spaces in the component name. Technically, it's the name of the component's script (e.g., BoxCollider). This should work:

Code: Select all

SetEnabled(BoxCollider, false, Reset guard);
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

Re: I can't understand the Sequencer Command "SetEnabled"

Post by Deses »

That was it... as always, an easy fix. Thank you so much. Tony!!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: I can't understand the Sequencer Command "SetEnabled"

Post by Tony Li »

Happy to help!
Post Reply