728x90 ๋ฐ์ํ ์ ๋๋ฉ์ด์ 2 [Unity]2D๊ฒ์๋ง๋ค๊ธฐ #4_ ํ๋ ์ด์ด ์ ํ ๊ตฌํ ๋ฌผ๋ฆฌ๋ ฅ์ ์ํ ์ ํ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 public class PlayerMove : MonoBehaviour { public float maxSpeed; public float jumpPower; Rigidbody2D rigid; SpriteRenderer spriteRenderer; Animator anim; void Awake() { rigid = GetComponent(); rigid.freezeRotation = true; spriteRenderer = GetComponent (); anim = GetComponent(); } // ํค๋ณด๋์์ ์์ ๋์ ๋ ์์ stop -->๋ฉ์ถ ๋ ์๋ p.. 2021. 9. 26. [Unity]2D๊ฒ์ ๋ง๋ค๊ธฐ #2 _์ํ๋ผ์ค/์ ๋๋ฉ์ด์ ์ํ๋ผ์ค ์ ๋ํฐ์์ '์ํ๋ผ์ค'๋ ์ฌ๋ฌ ๊ฐ์ ์คํ๋ผ์ดํธ(Sprite)๋ฅผ ํ ์ฅ์ ํฐ ํ ์ค์ณ์ ๋ชจ์๋์ ๊ฒ์ด๋ผ๊ณ ๋ณผ ์ ์๋ค. ์ฝ๊ฒ ์ค๋ช ํ์๋ฉด, ์์ ์คํ ์ด์์ Sprites๋ฅผ ๋ค์ด ๋ฐ๊ณ ๋์ ์ ์ฌ์ง์ฒ๋ผ ์ด๋ฏธ์ง๋ฅผ ๋๋ธํด๋ฆญํ๋ฉด ์ฌ๋ฌ๊ฐ์ ์ด๋ฏธ์ง๊ฐ ์กฐ๊ฐ๋์ ๋ ๋ํ๋๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ์ด๊ฑธ ํ๋๋ก ๋ฌถ์ด์ค๊ฒ ์ํ๋ผ์ค์ด๋ค! ํนํ ๋ชจ๋ฐ์ผ์ ๊ฒฝ์ฐ ์ํ๋ผ์ค๋ฅผ ์ฌ์ฉํด์ค์ผ Batch๋ฅผ ์ค์ฌ์ค๋ค +)Batch : ๊ทธ๋ํฝ์ ๊ทธ๋ฆฌ๊ธฐ ์ํด ๋ฉ๋ชจ๋ฆฌ์ CPU๋ฅผ ์ฌ์ฉํ ํ์ https://skuld2000.tistory.com/28 [Unity] ์ด์ Sprite Packer ๋ ๊ทธ๋ง. Sprite Atlas ๋ฅผ ์ฌ์ฉํ์. ์ ๋ํฐ์์ ์ํ๋ผ์ค(Atlas) ๋ ์ฌ๋ฌ ๊ฐ์ ์คํ๋ผ์ดํธ(Sprite)๋ฅผ ํ ์ฅ์ ํฐ ํ ์ค์ณ์ ๋ชจ์๋์ ๊ฒ์ด.. 2021. 8. 24. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ