24 lines
552 B
C#
24 lines
552 B
C#
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
|
|
}
|
|
}
|