private void onReportPlayerLoaded(string path, GameObject reportPlayerPrefab) { ReportPlayerController component = Object.Instantiate(reportPlayerPrefab).GetComponent <ReportPlayerController>(); component.Initialize(handle); Service.Get <EventDispatcher>().DispatchEvent(new PopupEvents.ShowTopPopup(component.gameObject, destroyPopupOnBackPressed: false, scaleToFit: true, "Accessibility.Popup.Title.ReportPlayer")); }
protected virtual void Start() { reportPlayerController = GetComponentInParent <ReportPlayerController>(); ButtonText.text = reportPlayerController.GetTextForReason(Reason); GetComponent <Button>().onClick.AddListener(onClick); }