- Home /
Issues Activating/Deactivating User Interface Objects Unity 5 RC1.
Hi, I'm currently working on a basic menu system, in which I need to activate and deactivate different objects on the User Interface.
using UnityEngine;
using System.Collections;
public class GameController : MonoBehaviour {
//Declaration of interfaces
public GameObject MainMenu;
public GameObject LoadingS;
public GameObject ConnectS;
public GameObject ServerList;
public GameObject GameOptions;
void start(){
MenuReset();
}
void MenuReset(){
MainMenu.SetActive(false);
LoadingS.SetActive(false);
ConnectS.SetActive(false);
ServerList.SetActive(false);
GameOptions.SetActive(false);
}
This is what I have written, however, when the scene starts, and the script is active, the objects containe User Interface components do not activate and deactivate. I've checked to make sure that the objects are linked to the script in the inspector, and I've tried looking on the forums, however they all point to .setactive, and it doesn't seem to be working.
Answer by CastleIsGreat · Feb 25, 2015 at 07:38 PM
Problem was I had start non capitalized...
Void Start(){}
simple problem broke everything! lol
Your answer

Follow this Question
Related Questions
Issues with camera lookrotation - please help 1 Answer
How to change Texts in Unity 5 using UI Texts? 2 Answers
How do I tell my code which window the game runs in? 0 Answers
The raycasthit does not see the cillider when hitting it 2 Answers
I have overrided a built-in script accidentally and not sure how to fix 2 Answers