示例#1
0
        private StartOptions startScript; //Reference to the StartButton script

        //Awake is called before Start()
        void Awake()
        {
            //Get a component reference to ShowPanels attached to this object, store in showPanels variable
            showPanels = GetComponent <ShowPanels>();
            //Get a component reference to StartButton attached to this object, store in startScript variable
            startScript = GetComponent <StartOptions>();
        }
示例#2
0
        private ShowPanels showPanels;                                      //Reference to ShowPanels script on UI GameObject, to show and hide panels

        void Awake()
        {
            //Get a reference to ShowPanels attached to UI object
            showPanels = GetComponent <ShowPanels>();

            //Get a reference to PlayMusic attached to UI object
            playMusic = GetComponent <PlayMusic>();
        }