How to get getcomponent transform from an array element (for example, i)?
1 answer
Transform[] tempTransform = new Transform[MainArray.length]; for (int i = 0; i < MainArray.length; i++) { tempTransform[i] = MainArray.transform; } This example creates an array of all the Transform components of your MainArray array.
That is, MainArray [i] .transform is the acquisition of the Transform component of the element i in the array.
|
GetComponents()(notGetComponent()) or do you create the array manually? - KingPeas