- Home /
 
activate/deactivate 3d text
everything in my script is working perfect like it's supposed to but i'm having troubles with the "back" button in my menu. No matter what I do I can't deactivate it. Does everything right but deactivate. I know it's a little much but I'm using two scripts to run it. Would make a little more since if you saw the full script but they're controlling so many things it's way too long for here. How it's supposed to be setup is the main menu is open without the back button and when clicked on ,say, upgrades then the back buttons supposed to pop up and if pressed it goes away but heres some basics of the back button that I can't get to deactivate:
-GameObjectsScipt-
var BackText : GameObject;
var back = false;
function Start()
{
     BackText.active = false;
 
               }
function Update()
{
      if(back == true)
 
      {
              
              BackText.active = false;
       }
 
               }
-MenuScript-
var isBackBtn = false;
var ObjectsManager : GameObjectsScript;
function Start()
{
      ObjectsManager.back = true;
 
               }
function OnMouseDown()
{
      if(isBackBtn)
      {
                ObjectsManager.back = true;
       }
 
               }
everything on the menu is coming up and going away fine so the setup i know is right. Im just having problems with that one button for some reason. The start functions weren't there before but it still isnt disabling even with it even on start. thank you in advance for looking at this cluster
as a note the menu script is attached to the text with box colliders and the game objects script is attached to an empty game object in the scene and everything is set in the proper places
nvm figured it out. works fine just had something else in my script keeping it from deactivating
you should actually make an ANSWER telling that you figured it out, and accept that to mark the question as CLOSED, please.
Your answer