Skip to content
Snippets Groups Projects
Commit 03fda674 authored by Tobias Schöner's avatar Tobias Schöner
Browse files

fix: FactExplorer does not get destroyed on click inside

parent b6fee6fe
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,10 @@ public class OpenFactExplorer : MonoBehaviour, IPointerClickHandler
public void OnPointerClick(PointerEventData eventData)
{
// TODO: add support for other input systems
Destroy(factExplorer != null ? factExplorer.gameObject : null);
if (eventData.button == PointerEventData.InputButton.Right)
{
Destroy(factExplorer != null ? factExplorer.gameObject : null);
var parent = transform.GetComponentInParent<Canvas>().transform;
var fact = transform.GetComponent<FactWrapper>().fact;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment