public GameObject[] in script isn't visible in Inspector?

I’ve been using public GameObject as in the source below on multiple projects for weeks and both testA and testB would be visible in the inspector and I can attach GameObjects to my scripts easily.

Since today, the testB array has stopped being visible in the Inspector in all my projects. I updated to Unity 4.5.1 and still the same problem. If I create a fresh new project with just that script below, only testA is visible in the inspector.

What am I doing wrong?

public class testscript : MonoBehaviour {

	public GameObject testA;
	public GameObject[] testB;

	// Use this for initialization
	void Start () 
	{
	}
	
	// Update is called once per frame
	void Update () 
	{
	}
}

I just figured out what I’m doing wrong. I was Inspecting the script rather than the object the script is attached to. If I inspect the object both testA and testB are visible.

Is it possible that you talk about the default references? Those just setup default values for asset references which are used when you attach a script to a GameObject in the editor. Default references only support asset references and don’t show arrays.

To assign GameObject references or asset references to testA and / or testB you have to attach the script to a GameObject and select that GameObject. Now you can assign what you like to that script instances.

You could always use a list instead as a work around.

public List<GameObject> testB;