- Home /
 
               Question by 
               goten000023 · Sep 07, 2014 at 12:10 AM · 
                javascripteditorcomponentnoob  
              
 
              how to disable a script component
wondering how to disable a script through another script. by the way they can be on the same object.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by kacyesp · Sep 07, 2014 at 12:11 AM
This looks promising: http://answers.unity3d.com/questions/39748/disable-script-from-code.html
well here is the deal i am trying to make a weapon switching script.
i have two raycast shooting scripts on my main camera and i figured that in the script if you press q then it will disable one of the scripts and enable the other.
So why can't you use Input.Get$$anonymous$$ey( $$anonymous$$eyCode.q ) to disable one script component and enable the other?
Your answer
 
 
             Follow this Question
Related Questions
editor script makes editor crash 1 Answer
A node in a childnode? 1 Answer
Edit terrain using js 1 Answer
How to support Retina display 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                