C# Accessing Variables from Class Variable

Hi everyone, I have a class variable and I 'm trying to access the variables it inherits from.

class variable

 public someClass[] someClassArray;

class it inherits from

    using UnityEngine;
    using System.Collections;
    public class someClass : MonoBehaviour {
    public string someString;
    public bool someBool;
    public int someInt;
    public float someFloat;

So in theory I should be able to access the variables by typing in


But when I type it in I don’t see the variables I put into the class. How do you access those variables?

You are not inheriting anything here. You have a array of references to objects of type ‘someClass’…and unless you initialize the array in the Inspector, you will have an uninitialized array that will generate a null reference exception the first time you try and use it. To access the variables you put into the class, you need an array index. Try typing: