- Home /
 
               Question by 
               AlexanderTh4682 · Apr 13, 2013 at 03:33 PM · 
                javascriptinstantiategamerts  
              
 
              Instantiate problem in a RTS game
I'm working on an RTS game right now and I encountered a problem when making my game, this is my code. #pragma strict
 var CircuitBoard : GameObject;
 var CircuitBoardGhost : GameObject;
 
 function Start () {
 
 }
 
 function OnMouseUp () {
 
     if (CircuitBoardGhost.gameObject.activeInHierarchy == true)    {
     
         Instantiate (CircuitBoard, transform.position, transform.rotation);
         CircuitBoardGhost.gameObject.SetActive(false);
     
     }
 
 }
What I want to do is when I click on the CircuitBoardGhost which is a ghost block is to make it disappear and to make the actual CircuitBoard appear, when I try this it just won't remove the CircuitBoardGhost and won't instantiate the CircuitBoard. Any help would be really appreciated, thanks. ;)
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
BCE0018: The name 'MouseLook' does not denote a valid type 0 Answers
Instantiating problem 0 Answers
3d grid/tile based map 0 Answers
Problem with jumping 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                