Page 1 of 1

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

Posted: Mon Apr 26, 2021 10:56 pm
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 305 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 305 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 305 times
I guess I mistake the component name format, but I'm not sure the correct form.
How should I write this command?

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

Posted: Tue Apr 27, 2021 8:23 am
by Tony Li
Hi,

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

Code: Select all

SetEnabled(SpineBlinkPlayer, false);

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

Posted: Tue Apr 27, 2021 9:04 pm
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!

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

Posted: Tue Apr 27, 2021 10:14 pm
by Tony Li
Happy to help! :-)