public void PerformClickActionOnCurrecInteractiveItem() { if (currentInteractiveItem != null) { currentInteractiveItem.Click(); } }
void OnTriggerEnter(Collider other) { var newInteractive = other.GetComponent <UIInteractive>(); if (newInteractive == null || other.gameObject.name.Contains("Panel") || other.gameObject.name.Contains("Tab")) { return; } interactive = newInteractive; interactive.Click(); }