// This method displays the "dug up" artefact to the player on the UI overlay void ShowArtefact(Exhibit artefact) { if (artefact.GetComponent <SpriteRenderer>() != null) { canvas.gameObject.SetActive(true); btnStoreArtefact.GetComponent <Button>().onClick.AddListener(delegate() { StoreArtefact(artefact); }); artefactDisplay.GetComponent <Image>().preserveAspect = true; artefactDisplay.GetComponent <Image>().sprite = artefact.GetComponent <SpriteRenderer>().sprite; artefactName.GetComponent <TextMeshProUGUI>().text = artefact.itemDefinition.exhibitName; UpdateToolSelection(currentTool = SelectedTool.NONE); } else { Debug.LogError("[ClickManager] SpriteRenderer is null"); } }