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 = new MenuItem(menuObjects.Find("Multiplayer"), [menuObjects.Find("Create"), menuObjects.Find("Join"), menuObjects.Find("QuickMatch")], 2);
The specific part that I believe is giving the trouble is the [menuObjects.Find("Create"), menuObjects.Find("Join"), menuObjects.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.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
2 People are following this question.
Instantiate from array into array?
visible public struct
Boolean a Array of Transforms
How to move a gameobject with same speed