My pickup is spawning appropriately, but the cursor does not change to my pickup cursor when I hover over it, and if I click on it anyway she just runs over it. Here’s my clickable pickup script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameDevTV.Inventories;
namespace RPG.Control
{
[RequireComponent(typeof(Pickup))]
public class ClickablePickup : MonoBehaviour, IRaycastable
{
Pickup pickup;
private void Awake()
{
pickup = GetComponent<Pickup>();
}
public CursorType GetCursorType()
{
if (pickup.CanBePickedUp())
{
return CursorType.Pickup;
}
else
{
return CursorType.FullPickup;
}
}
public bool HandleRaycast(PlayerController callingController)
{
if (Input.GetMouseButtonDown(0))
{
pickup.PickupItem();
}
return true;
}
}
internal interface IRaycastable
{
}
}