- Home /
Question by
Snownebula · May 26, 2015 at 03:30 PM ·
c#javascriptdisabling
How do you disable a c# from a js script?
I am trying to disable a componenent on another object by
GameObject.FindGameObjectWithTag("t2").GetComponent.().enabled = false;
The script Waypoint is a C# script. Is this the correct way to do it? When I try this I get: The name 'Waypoint' does not denote a valid type ('not found').
Comment
Best Answer
Answer by Snownebula · May 27, 2015 at 05:29 AM
I figured out how to do it guys. This is what I did: GameObject.FindGameObjectWithTag("t2").GetComponent("Waypoint").enabled = false;
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Editing JScript Varaibles in C# 4 Answers