void Start() { this.contractScript = GameObject.Find("ContractPlayerFlow").GetComponent <ContractPlayerScript>(); this.timerScript = GameObject.Find("DraftTimer").GetComponent <DraftTimerScript>(); this.blackScreen = GameObject.Find("TradeBlackScreen"); this.parentConfirmationScreen = GameObject.Find("ConfirmationScreen"); foreach (var mesh in this.parentConfirmationScreen.GetComponentsInChildren <MeshRenderer>()) { mesh.sortingLayerName = "TradeStuffs"; } this.leftSide = GameObject.Find("LeftSide"); this.rightSide = GameObject.Find("RightSide"); this.tradeText = GameObject.Find("TradeTextObject"); this.tradeText.GetComponent <MeshRenderer>().sortingLayerName = "TradeStuffs"; // SUPER UGLY LOLZ tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop1").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop2").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop3").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop4").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop5").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop6").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop7").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop8").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop9").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop10").GetComponent <TradePlayerSelectionScript>()); // Extra 2 buttons in case of giving up keepers tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop11").GetComponent <TradePlayerSelectionScript>()); tradePlayerSelectionScriptList.Add(GameObject.Find("TradeBackdrop12").GetComponent <TradePlayerSelectionScript>()); }
// Use this for initialization void Start() { contractScript = GameObject.Find("ContractPlayerFlow").GetComponent <ContractPlayerScript>(); }