Before updating to Windows 10 you may need to return your Pro license. More information here

Undeclared transform array

I've run into a bit of trouble passing an array of transform objects to a constructor. It seems the way I've set it up its passing the correct array just empty and thats causing trouble further down the line. So here's the call to the constructor with the parameters:

 items[2] = new MenuItem(menuObjects[2].Find("Multiplayer"), [menuObjects[2].Find("Create"), menuObjects[2].Find("Join"), menuObjects[2].Find("QuickMatch")], 2);

The specific part that I believe is giving the trouble is the [menuObjects[2].Find("Create"), menuObjects[2].Find("Join"), menuObjects[2].Find("QuickMatch")] bit which is returning UnityEngine.Transform[]. I am honestly stumped, and I've tried a google search to find out a fix but I can't find a suitable alternative short of creating a variable and then storing them in there then passing them.

If anyone could help me it would be much appreciated.

more ▼

asked Nov 29, 2011 at 02:02 PM

avatar image

1 3 2 2

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Nov 29, 2011 at 02:02 PM

Seen: 784 times

Last Updated: Nov 29, 2011 at 02:02 PM