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.
To help users navigate the site we have posted a user guide.
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).
Answers and Comments
2 People are following this question.
quick copy transform properties into array in editor
Setting position of a transform?
How to get an array of transforms and move GameObject for certain duration to that transforms list
onclick multi parameters
Keep adding targets to a list