How do I edit variables in an array of a class??

Ok hello um, I’ve successfully made an array of System. Object in the code below and can edit countless instances of the class Test’s variables in the editor however since it’s basically my first time threading in these apparently deep waters I have no idea how to modify or access the variables in Test via code, I’m competent in unity script but not so much in c#. I’d very much appreciate it if someone could show or explain how I’d go about doing that.

class Test extends System.Object {
    var p = 5;
    var c = Color.white;
var test = Test ();

First of all, ‘extends System.Object’ is redundant. Every class always extends Object - if you don’t specify what class you’re extending, you’re still extending Object. If you’re extending MonoBehaviour: supprise! MonoBehaviour inherits from Object, or some other class that extends Object.

Now, if you want to edit one of the variables of the test object, there’s one huge difference between UnityScript and C#. In UnityScript, variables are public as of default. So when you write ‘var p = 5’ in the top of a UnityScript script that variable is available outside of that particular class (script)

In C#, variables are private as of default. Which means that to access them outside of the same class (script), you have to declare them as public.

As an example, assume you have to scripts; A and B:

class Foo {
    public var a = 5;
    var b = 3;

class Bar : MonoBehaviour {
    public Foo theFoo;

    void Start() {
        //this will work:

        //this will not work, as b is a private variable, only accessible inside of the class Foo:

That’ll give you a start, but you should really try to look at some tutorials. The official ones are okay.

Try this, you need to call system and Serializable or they won’t appear in the inspector:

using UnityEngine;
using System.Collections;
using System;

public class Splash : MonoBehaviour {

	public static string VersionNumber;
	public static bool  IsFullVersion;

    public Version SetVersion;

	public class Version : System.Object {
		public string VersionNumber;
		public bool  FullVersion;

	void  Awake (){
		VersionNumber = SetVersion.VersionNumber;	
		IsFullVersion = SetVersion.FullVersion;