Page 1 of 1

I can't understand the Sequencer Command "SetEnabled"

Posted: Fri Oct 08, 2021 2:49 pm
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?

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

Posted: Fri Oct 08, 2021 4:35 pm
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);

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

Posted: Fri Oct 08, 2021 7:19 pm
by Deses
That was it... as always, an easy fix. Thank you so much. Tony!!

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

Posted: Fri Oct 08, 2021 8:38 pm
by Tony Li
Happy to help!