Unity3D – JS Advanced – extends System.Object

System.Object is the class from which (generally speaking) everything in Unity is derived.
Every single other thing we build in Unity, derives from System.Object.
You can use this to display variables in the inspector similar to how a Vector3 shows up in the inspector.

Attach to an Empty Object this:


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

Inspect the Inspector!
Click the white triangle on the left of ‘Test’ to espand and see P and C var.