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.
-
Answer # 1
Related articles
- i want to pass the structure secured in c # to c ++
- c # - i want to put a thread to sleep for a long time
- c # - i want to run storyboard from viewmodel
- c # - how do i turn on setactive in unity?
- c # - i want to replace a file with the same name in asset
- ruby - i want to display the name of the poster
- c # - i want to read an xml file and display it on the datagrid
- c # - i want to know the intent of mvvm "viewmodel must not know view"
- c # - i want to dynamically generate tags in aspx
- i want to get the name of the laravel php zip file
- c # - i want to read a large excel file with npoi
- c # - i want to play animator every time i tap
- c # - i want to get a datatable with linq and then outer join
- c # - i want to do something like log output in wpf
- android - i want to turn on the led with a smartphone application
- c # - i want to update the value
- python - i want to turn on the leds randomly on the raspberry pi
- linux - i want to set a timeout for each task in ansible
- i want to get the name of name with vba
- ruby - i want to set the name to "up to 25 characters"
Related questions
- c # - player production in unity (shooting game)
- c # - please tell me how to use the additional components of unity's volunteer production
- c # - conversion from enum type to enum type
- c # - missingreferenceexception occurs even though there is a reference
- c # - i want to update the value
- c # - i want the camera to follow the player character in a tps game, but if i make multiple players in multiplayer, the camera
- c # - [unity] even though "has exit time" of animator is specified, it will transition to another state earlier than t
- c # - == becomes false even though the strings are equal
- c # - how to use start () in unity
- c # - in a script? error cs1056: unexpected character'?' is displayed even though there is no
If it is new C #, you can write a similar way by using tuples,
Since Unity's C # is old, it can't be written for now.
In the first place, the design is bad.
If you don't make it an array, each variable will be used for a different purpose.
The part that specifies it should also be a separate variable.
If you don't, it's hard to know where to put what you set up on Unity.