Foxxis
1
Well, I must be doing something insanely stupid, but I can’t see what. Basically, I’m doing something like this:
private var somearray : Array;
function Start () {
someArray = new Array();
}
function Awake () {
someArray.Push(1); //<- throws exception error.
}
“NullReferenceException: Object reference not set to an instance of an object”
However, this works fine:
private var somearray : Array;
function Start () {
someArray = new Array();
someArray.Push(1);
}
Why? 
Probably because Awake runs before Start. Or because “somearray” is not the same as “someArray”.
–Eric
Foxxis
3
The case issue was just sloppy example code. The Awake/Start order was the culprit - I did it backwards. Oops. 
Many thanks for the swift help. Going to get some espresso now to get my brain back into gear. 
Cheers,
Dan
if (espresso)
Awake();
else
rigidbody.Sleep();
Unity: It’s Not Just For Computers Anymore!™ (Hopefully this code works…I don’t actually drink coffee so I can’t test it, sorry!)
–Eric
Foxxis
5
Hehe - that about sums it up as far as this (sometimes rigid) body is concerned. 
//Dan