Files
Click-PointRPG/Assets/Scripts/Interactable.cs

24 lines
552 B
C#
Raw Permalink Normal View History

2026-02-11 17:30:49 +00:00
using UnityEngine;
public class Interactable : MonoBehaviour
{
[Header("Identification")]
public string interactableName = "Interactable";
/// <summary>
/// Called when this interactable is selected/clicked
/// </summary>
public virtual void OnSelect()
{
Debug.Log($"Interacted with: {interactableName}", gameObject);
}
/// <summary>
/// Called when this interactable is deselected
/// </summary>
public virtual void OnDeselect()
{
// Override in derived classes if needed
}
}