I am getting an error message That "not all code paths return a value" for this code.
public bool IsInteractable(Vector3Int position)
{
//getting the tile
TileBase tile = InteractableGround.GetTile(position);
//Checking the name of the tilemap
if (tile != null)
{
if (tile.name == "Interactable")
{
return true;
}
return false;
}
}
I think the issue might be with the string for the file name, but i have copy and paste the name of the tile.