Jump to content
Aveyond Studios Community
Sign in to follow this  
Amaranth

Turn Component Off (Game Object or Hero Object)

Recommended Posts

GqEKnbF.png

Description

Disable a component on a hero object, game object or child game object.

Fields

The type of object that contains the component - If the game object has a hero object attached to it, select Hero Object. Otherwise, select Game Object.

The game object that contains the component - (Game Object) Choose the game object that you want to work with (game object field A).

The hero object that contains the component - (Hero Object) Choose the hero object that you want to work with (hero object field A).

Is the component on a child object - If you want to work with a component on a child attached to a hero object, mark this box.

Name of child object - Choose the name of the child object (string field A). 

Name of the component - Choose the name of the component to disable (string field A).

Share this post


Link to post
Share on other sites

I was looking into disabling the movement script component on my object (under/on which there's rigidbody, hero object set, collision, sprite, etc.) called "Torque Player (Script)".

image.png.fdb6ec755091135bdf41f611749a94ab.png

I've tried setting the name to 'Torque', 'Torque Player' and 'Torque Player (Script)' but it would not disable and threw no errors during gameplay. The object is a prefab, though, that has the script enabled. It wasn't a mistake with properly getting the object, since it logged doing so correctly.

How does the name field work? Does it work on scripts?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×