Array scripting issues!!! Help!!!

Hey, all,

Having a bit of a nightmare with an array-sort in my current game.

I’ve implemented an ICompare class, and that compiles fine, but when I use this line:

     Array.Sort ( PathList, myVectComparer );

The Unity compiler comes up with the following error:

The name ‘Array’ does not exist in the current context

Seriously… WTF??

It’s a system type, and it works elsewhere - I really can’t understand what the problem is!

Anyone have any ideas?

Cheers,

SB

Isn’t Array a type, and not an object of type Array ?

http://unity3d.com/support/documentation/ScriptReference/Array.Sort.html

Try System.Array.Sort(…).

2 Likes