How should I write the component name in SetEnabled()?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
misaki_e
Posts: 20
Joined: Fri Apr 16, 2021 1:57 am

How should I write the component name in SetEnabled()?

Post by misaki_e »

Hello,

it is maybe an easy question...
I want to use SetEnabled()to disable a characters' eyes-blink script depends on character's emoting.
However, what I wrote was not working.
Sequence_usingSpace.png
Sequence_usingSpace.png (54.83 KiB) Viewed 299 times
Then, I wonder I should delete the space, but it was not working too.
The sequence what I wrote.
The sequence what I wrote.
Sequence.png (55.34 KiB) Viewed 299 times
I use this component:
The component what I want to disable sometime.
The component what I want to disable sometime.
Spine Blink Player.png (103.61 KiB) Viewed 299 times
I guess I mistake the component name format, but I'm not sure the correct form.
How should I write this command?
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: How should I write the component name in SetEnabled()?

Post by Tony Li »

Hi,

Match the Script name (shown in the component's Script field):

Code: Select all

SetEnabled(SpineBlinkPlayer, false);
misaki_e
Posts: 20
Joined: Fri Apr 16, 2021 1:57 am

Re: How should I write the component name in SetEnabled()?

Post by misaki_e »

Thank you for your answer, Tony!

I got it, and I noticed I was wrong in another point!
I was attached the component under the game object that I attached the Dialogue Actor component, so I should write the game object name in the SetEnabled().

Anyway, your answer make clear the way.
Thank you so much!
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: How should I write the component name in SetEnabled()?

Post by Tony Li »

Happy to help! :-)
Post Reply