- Home /
 
               Question by 
               unity_O9yFOEld5ESRvw · Jun 20, 2018 at 02:42 AM · 
                gameobjectbeginnerboolreference-other-object  
              
 
              Store a reference to an object with a certain boolean?
So, I have multiple objects in a scene that contain the script "NPC". However, only ONE of these objects have the variable "isNodeRunning" set to true. Is there any way that I can store a reference to that one, single object with the true variable? Thanks!
               Comment
              
 
               
              Hi, cant you check if the object has the variable set to true IN your NPC script? Like:
 if (isNodsRunning == true)
 {
 //assign this gameobject to a variable in another script (for example in a Game$$anonymous$$anager script)
 }
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                