Hello,
I am trying to disable the Mesh Renderer component of an object named "Golden Key", and I am using the following sequence code under Play Sequence Action of Dialogue System Trigger Interactable Target:
SetEnabled(Golden Key, false, Mesh Renderer)
I am getting an error where it says the Golden Key does not have a Mesh Renderer component. I tried it with some other components and get a similar error. What do I seem to be doing wrong?
I tried to follow the same template in the documentation such as:
SetEnabled(AttackAI, false, listener) (Disables the "AttackAI" component on the listener to turn off the listener's attack mode)
I can disable the mesh renderer using the Set Components Enabled/Disabled action, however, I want to change when the disable occurs by adding @time, and I do not think I can do it using just that action.
Thank you for your help.
Using SetEnabled() Command
Re: Using SetEnabled() Command
Hi,
Flip the parameters, and make MeshRenderer one word:
Flip the parameters, and make MeshRenderer one word:
Code: Select all
SetEnabled(MeshRenderer, false, Golden Key)
Re: Using SetEnabled() Command
Thank you so much.
Is the example in the documentation accurate, or did I just interpret it wrong?
Is the example in the documentation accurate, or did I just interpret it wrong?
Re: Using SetEnabled() Command
They look correct.
The first one is:
This disables a component named "AttackAI" on the listener.
The second one is:
This enables the component named "AttackAI" on all GameObjects tagged "Enemy".
The first one is:
Code: Select all
SetEnabled(AttackAI, false, listener)
The second one is:
Code: Select all
SetEnabled(AttackAI, true, tag=Enemy)