hello there!! im getting the error message “Assets/Scripts/CoordinateLabeler.cs(34,22): error CS0122: ‘Waypoint.isPlaceable’ is inaccessible due to its protection level” im at 7:39 Realm Rush Debugging Tools, here’s my script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
[ExecuteAlways]
public class CoordinateLabeler : MonoBehaviour
{
[SerializeField] Color defaultColor = Color.green;
[SerializeField] Color blockedColor = Color.red;
TextMeshPro label;
Vector2Int coordinates = new Vector2Int();
Waypoint waypoint;
void Awake()
{
label = GetComponent<TextMeshPro>();
waypoint = GetComponentInParent<Waypoint>();
DisplayCoordinates();
}
void Update()
{
if (!Application.isPlaying)
{
DisplayCoordinates();
ColorCoordinates();
UpdateObjectName();
}
}
void ColorCoordinates()
{
if (waypoint.isPlaceable)
{
label.color = defaultColor;
}
else
{
label.color = blockedColor;
}
}
void DisplayCoordinates()
{
coordinates.x = Mathf.RoundToInt(transform.parent.position.x / UnityEditor.EditorSnapSettings.move.x);
coordinates.y = Mathf.RoundToInt(transform.parent.position.z / UnityEditor.EditorSnapSettings.move.z);
label.text = coordinates.x + "," + coordinates.y;
}
void UpdateObjectName()
{
transform.parent.name = coordinates.ToString();
}
}