Hello all,
I have a normal script (not editor script)
public class InternalTest : MonoBehaviour
{
internal float myVariable;
}
and an editor script
[CustomEditor(typeof(InternalTest))]
public class InternalTestEditor : Editor
{
new InternalTest target;
void OnEnable()
{
target = (InternalTest)base.target;
}
public override void OnInspectorGUI()
{
target.myVariable = Random.Range(0, 100);
}
}
Now, I get the following: ‘InternalTest.myVariable’ is inaccessible due to its protection level
So, can’t I access myVariable from the editor script? Maybe because Editor scripts are a different assembly?
Thanks in advance!