Home>

I use Unity. I don't know how to get multiple names when the following source code is used. I would appreciate your teaching.

Applicable source code
[SerializeField] GameObject [] gename;
string a, Aa, Ab, Ba, Bb, b;
    [System.Obsolete]
    void test ()
    {
        for (int i = 0;i<= gename.Length;i ++)
        {
            // put in string order
            [a, Aa, Ab, Ba, Bb, b] = gename [i] .transform.FindChild ("Image"). GetComponent<Image>(). sprite.name;
        }
    }
Supplemental information

Although I thought about how to make a string into an array, I thought that this would be easier to see when I think about the latter.
I wrote it one by one and it became very long.