public static void show() { if ( researchButton != null ){ GameObject.Destroy(researchButton); Debug.Log("removing buttons"); } if ( buildButton != null ){ GameObject.Destroy(buildButton); } int bWidth = 75; UIObject _researchButton = new UIObject("gui/research-button", "research-button", bWidth, bWidth ); _researchButton.setPosition(new Vector2(Screen.width/2 - bWidth/2,-95)); researchButton = UI.attach(_researchButton); UIObject bButton = new UIObject("gui/build-button", "build-button", bWidth, bWidth ); bButton.setPosition(new Vector2(Screen.width / 2 + bWidth/2,-95)); buildButton = UI.attach(bButton); startTime = Time.time; // Calculate the journey length. destinationPosition = 50; destinationSpeed = 10; opacity=0; move = true; hideButtons = false; }