- Home /
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.
Your answer
Follow this Question
Related Questions
EditorGUILayout Array 1 Answer
move enemy to random transform array 2 Answers
How to move along a group of waypoints at a certain speed? 2 Answers
How do I check multiple gameObjects transform positions? 3 Answers
Array? usage for multiple transforms 2 Answers