// ์คํํฑ ํด๋์ค๋ก ๋ญํ๋ ๋์ถฉ ๋ง๋ค๊ณ ~ย
public static class ExtensionMethodย
{ย
// ์๋ ์น๋ฉด ๋จ.ย
// transformย
public static void SetTag_AllChildren(this Transform a_objParent, string a_strTag)ย
{ย
ย a_objParent.tag = a_strTag;ย
if( a_objParent.childCount > 0 )ย
{ย
foreach( Transform t in a_objParent ) { SetTag_AllChildren(t, a_strTag); } }ย
}ย
}ย
// ์ค์ ์ฌ์ฉ ์ // gameObject.transform.SetTag_AllChildren("Wall");
// ๋ด ๋ธ๋ก๊ทธ
// https://blog.naver.com/azulionet/221261165620
// ํ์ฅ ๋ฉ์๋ ์ฐ๋ฉด ํธํด์~
// ์คํํฑ ํด๋์ค๋ก public ํจ์๋ก ๋ง๋ค๊ณ , this ํค์๋๋ก ๋ถ์ด๋ฉด ๋
๋๊ธ 0