public class TestValidThing
{
public int totalCount = 0;
public Dictionary<int, UnityEngine.GameObject> donk = new Dictionary<int, UnityEngine.GameObject>
{
[totalCount++] = new UnityEngine.GameObject { }
};
}
It fails with:
A field initializer cannot reference the non-static field, method, or property 'TestValidThing.totalCount'
It’s not part of a static class or anything, it’s fully independent and accessible from everywhere. It underlines the totalCount++.