c# Accessor kills public property

Not an end of the world situation, but any particular reason why having a valid accessor should stop a value from displaying in the inspector? I realize that it’s a runtime script so I’m not actually expecting the accessor to be used when adjusting from the GUI unless the project is running, but I don’t see any reason for it not showing up at all.

e.g. random example, b wouldn’t show in the inspector :

public class MyClass : MonoBehavior
{
public bool a = false;
public int b
{
get { return b; }
set { if (b != value) a = true; b = value; }
}


}

Properties are not accessible in the default inspector because their dependencies cannot easily be automagically determined.

Out of curiosity, what do you mean by “dependencies” here?

A dependency is a piece of data or system which the code in question needs to execute properly.

In the case of properties on Unity MonoBehaviours, this could be code expecting that data set up in the Start method of the behaviour is available or that the attached components have been initialized and are running (which, of-course, they are not at editor time).