๋ง์ฝ ๋ถ๋ชจ ์ค๋ธ์ ํธ๋ ํ๋ฆฌํน์ผ๋ก ๋ง๋ค์ด์ ์ธ์คํดํธํ ๋ ค๋ฉด ์ด์ฐํด์ผํจ? public์ผ๋ก asset ์์ ๋ถ๋ชจ prefab์ Game๋ก ์ง์ ํด๋จ๋๋ฐ ๋ถ๋ชจ prefab์ clone์ ์์์ผ๋ก ์๋ค์ด๊ฐ์ง
Tranform.SetParent (๋ถ๋ชจ.Transform)
GameObject child = Instantiate(destroy_b[units], spawnPoint, Quaternion.identity); child.transform.SetParent(parent.transform); ์ด์ผํ๋๋ฐ ์๋ผ์ ํ...
var myNewSmoke = Instantiate (poisonSmoke, Vector3(transform.position.x,transform.position.y, transform.position.z) , Quaternion.identity);
myNewSmoke.transform.parent = gameObject.transform;
https://answers.unity.com/questions/260100/instantiate-as-a-child-of-the-parent.html
์ง๊ธ ๋ณด๋ด์ค๊ฑธ ๋งจ์ฒ์์ ํด๋ดค์๋๋ฐ ์๋ผ์ child.transform.parent = parent.transform; .... ํ์ด์ด๋ผํค์ ์์ฑ๋์ด์๋ ์ค๋ธ์ ํธ๋ฅผ ๋ถ๋ชจ ์ค๋ธ์ ํธ๋ก ์ง์ ํ์๋ ๋์๋๋ฐ ใ ใ
๊ทธ๊ฑฐ ํ์ด์ด๋ผํค ๊ฑธ ๋ฃ์ง๋ง๊ณ ํ๋ก์ ํธ ํด๋์์ ํ๋ฆฌํน ๊บผ๋ด์ ์ธ์คํํฐ์ ๊ฝ์๋ณด๋ฉด ๋์ง ์์๊น