/// <summary> /// Handles InteractableChanged event, updating the overlay depending on if null or not /// </summary> /// <param name="interactable">The new interactable (enables and updates overlay) or null (disables)</param> private void OnInteractableChanged(IPlayerInteractable interactable) { if (interactable == null) { interactionContainer.gameObject.SetActive(false); } else { interactionText.text = Constants.ActionToText(interactable.Action); interactionContainer.gameObject.SetActive(true); currentInteractableTransform = interactable.ThisGO.transform.position; } }