x


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 '11 at 02:02 PM

Glucose gravatar image

Glucose
1 1 1 1

(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

By RSS:

Answers

Answers and Comments

Topics:

x1888
x1886
x83
x46

asked: Nov 29 '11 at 02:02 PM

Seen: 650 times

Last Updated: Nov 29 '11 at 02:02 PM