// ########################### // Use this for initialization void Start () { researchMasterData = this.GetComponent<ResearchMaster>(); researchTypeCount = researchMasterData.researchDictionary.Count; playerAttributeControlData = GameObject.Find("01_Player").GetComponent<PlayerAttributeControl>(); researchWindowMenuObject = GameObject.FindGameObjectWithTag("MenuResearch"); GameObject childHolder = gameObject.transform.FindChild("ResearchWindowData").gameObject; researchTimeLabel = childHolder.transform.FindChild("ResearchTime").gameObject.GetComponent<UILabel>(); buttonSpeedLabel = childHolder.transform.FindChild("ButtonSpeed").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); buttonAmountLabel = childHolder.transform.FindChild("ButtonAmount").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); buttonDrillLabel = childHolder.transform.FindChild("ButtonDrill").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); buttonBuildCostsLabel = childHolder.transform.FindChild("ButtonBuildCosts").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); buttonDrillPlattformLabel = childHolder.transform.FindChild("ButtonDrillPlattform").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); buttonScan = childHolder.transform.FindChild("ButtonScan").gameObject.transform.FindChild("Label").gameObject.GetComponent<UILabel>(); progressbarSlider = gameObject.transform.FindChild("ResearchWindowData").gameObject.transform.FindChild("ProgressBarResearch").gameObject.transform.FindChild("Control - Colored Progress Bar").gameObject.GetComponent<UISlider>(); ResearchShow(); } // END Start
// ########################### // Use this for initialization void Start() { researchMasterData = this.GetComponent <ResearchMaster>(); researchTypeCount = researchMasterData.researchDictionary.Count; playerAttributeControlData = GameObject.Find("01_Player").GetComponent <PlayerAttributeControl>(); researchWindowMenuObject = GameObject.FindGameObjectWithTag("MenuResearch"); GameObject childHolder = gameObject.transform.FindChild("ResearchWindowData").gameObject; researchTimeLabel = childHolder.transform.FindChild("ResearchTime").gameObject.GetComponent <UILabel>(); buttonSpeedLabel = childHolder.transform.FindChild("ButtonSpeed").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); buttonAmountLabel = childHolder.transform.FindChild("ButtonAmount").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); buttonDrillLabel = childHolder.transform.FindChild("ButtonDrill").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); buttonBuildCostsLabel = childHolder.transform.FindChild("ButtonBuildCosts").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); buttonDrillPlattformLabel = childHolder.transform.FindChild("ButtonDrillPlattform").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); buttonScan = childHolder.transform.FindChild("ButtonScan").gameObject.transform.FindChild("Label").gameObject.GetComponent <UILabel>(); progressbarSlider = gameObject.transform.FindChild("ResearchWindowData").gameObject.transform.FindChild("ProgressBarResearch").gameObject.transform.FindChild("Control - Colored Progress Bar").gameObject.GetComponent <UISlider>(); ResearchShow(); } // END Start