// Use this for initialization void Start() { player = (playerLogic)(GameObject.FindGameObjectWithTag("player").GetComponent(typeof(playerLogic))); if (gameObject.transform.parent != null) { mainConstalation = (constalation)gameObject.transform.parent.GetComponent(typeof(constalation)); } }
void startButtonPanelHelper(Button but, constalation con) { but.onClick.AddListener(() => { UImanger.ToggleInfoPanel(); con.buttonPress(); }); }