So I have an array of structs :
public LevelInf[] levels;
inside of the class “GameInfo”
public class GameInfo : MonoBehaviour {
which is made static by a child variable
public static GameInfo info;
however, when I try to access the array of structs in another script,
if(GameInfo.levels[level].speed) {
I get the “An object reference is required to access non-static member”. I’ve know what this error is saying, and I know that there is a huge google results page of this question, but I don’t know why I’m getting it, as “GameInfo” is indeed a static member.
Additionally, I can’t make the struct array static, as I need to change it’s values in the inspector.