[ExecuteInEditMode]
public class Trap : MonoBehaviour
{
[SerializeField]
private bool trapTurnedON;
public bool TrapTurnedON
{
get
{
return trapTurnedON;
}
set
{
Debug.Log("HERE");
trapTurnedON = value;
}
}
}
if I check or uncheck the bool in the inspector while or not while running the game Debug.Log doesn’t trigger. It only triggers when the bool is changed inside a script.
Any idea how to trigger it in the inspector?