728x90
Declaration
public void SetSprite(int index, Sprite sprite);
Parameters
| index | The index of the Sprite being modified. |
| sprite | The Sprite being assigned. |
| ์์ธ | ์์ ์ค์ธ ์คํ๋ผ์ดํธ์ ์ธ๋ฑ์ค์ ๋๋ค. |
| ํ ๋น๋๋ ์คํ๋ผ์ดํธ. |
์ง์ ๋ ์ธ๋ฑ์ค์์ ์คํ๋ผ์ดํธ๋ฅผ ์ค์ ํฉ๋๋ค.
์ฝ๋ ์์:
for (int i = 0; i < block.Length; i++)
{
SetSprite(block[i].transform, item[i]);
}
728x90
'Unity > Unity(๊ธฐ์ด)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| unity ์ํ์ข์ฐ ์ฝ๋ 2๊ฐ์ง Input.GetKey vs Input.GetAxis ๊ทธ๋ฆฌ๊ณ Translate() ํจ์์ ํ์ฉ (0) | 2021.08.12 |
|---|---|
| ์ ๋ํฐ Quaternion (0) | 2021.06.05 |
| [์ ๋ํฐ] get set ํ๋กํผํฐ Property(์์ฑ) (0) | 2021.05.23 |
| [์ ๋ํฐ] Debug.Log์ Debug.LogFormat ํ์ฉ. ์ด๋ค ๊ฒ์ ์จ์ผํ ๊น? (0) | 2021.05.22 |
| ์ ๋ํฐ ์ฝ๋ฃจํด Coroutine (0) | 2021.05.19 |